teamcity windows agent not connecting to teamcity server running in Ubuntu - teamcity

I am trying to connect teamcity server running in Ubuntu, from windows but its not working.
I changed firewall settings and opened up port 9090 and 8111.
I got these logs from windows agent
Call http://my.domain.com:8111/RPC2 buildServer.registerAgent3:
org.apache.xmlrpc.XmlRpcException:
jetbrains.buildServer.CannotPingAgentException: Unable to ping agent .
Check firewall and/or try to specify 'ownAddress' in the agent
configuration. Details: Agent '' cannot be accessed by any of the
addresses: [183.83.50.68, 192.168.1.146], (port 9090)

It means that TeamCity server can't access TeamCity agent by the specified addresses and port.
Ensure that your agent IP address is 183.83.50.68 and that incoming connections to the 9090 port are not blocked by not only firewall, but also by antivirus or similar software.
Or you can update to the TeamCity 9.1 or later - in these versions server doesn't have to be able to connect to the agent, only agent-to-server connection is necessary.

Related

How to disable selinux/iptables in MacOS to visit docker server from Host computer?

I am running a docker container of python server in my computer (MacOS Catalina, the container can connect MySQL and Redis from host computer, the server is running normally, but I can't visit server on host computer), in Linux environment, we need to disable the selinux, firewall and iptables, for example, edit /etc/selinux/config
and type as below
SELINUX=disabled
SELINUXTYPE=targeted
How to disable selinux/iptables in MacOS or how to visit docker server from the Host computer, I already tried to use host.docker.internal instead of 127.0.0.1, but it doesn't work, if I use host.docker.internal in MySQL or Redis config, also failed, I only can use the really IP such as 192.168.1.45 instead of host.docker.internal or 127.0.0.1

SonarQube server not showing in browser

I have a Linux VM running with a Jenkins, Nexus and SonarQube server on it. The IP for the VM is 192.168.56.2 and I have no trouble accessing both Jenkins and Nexus on ports 8080 and 8081 respectively. However, when I try to access 192.168.56.2:9000 for SonarQube it just says 192.168.56.2 refused to connect.
When I run systemctl status sonar in the terminal it shows that SonarQube is active and running. I have opened the firewall to port 9000 and I have not changed any of the default settings. Does anyone have any idea what might be the issue?
SonarQube will only be listening on 'loopback' rather than on all inbound IP addresses. In your server's sonar.properties file, you'll need to set the Web information in order to access the server remotely, specifically the following values:
sonar.web.host: 192.168.56.2
sonar.web.port: 80 # if you want to use a port other than 9000
Also, in the web UI's Settings, under the "General" section, set the "Server base URL" value so that links and redirects issued by SonarQube target the correct location.

How do I enable remote access/request to Elastic APM-server?

I have setup of Elastic with APM server on single machine. I've configured APM java agent to push traces to APM server on localhost. Everything works fine with localhost configuration on Windows.
Now, I'm looking to run apm java agent for application running on different machine on the same network. That is apm java agent on linux & apm server running on windows machine.
Default APM-server listen to localhost. I tried to change setting on apm-server.yml file with -
apm-server:
# Defines the host and port the server is listening on. use "unix:/path/to.sock" to listen on a unix domain socket.
host: "hot-ip:8200"
default is:
host:"localhost:8200".
After making apm-server.yml change, process explorer show apm-server.exe process listening to IP- host-ip port- 8200 protocol- TCP.
But, still http://host-ip:8200 is not accessible from other machine on network. While on the same machine (windows) http://localhost:8200 & http://host-ip:8200 works fine & give below response.
{
build_date: "2019-05-23T12:58:36Z",
build_sha: "410bf33fa1b67fa5bd02a388de17d0e30ec031da",
version: "7.1.1",
}
Thanks for help.
To listen on 0.0.0.0 try:
host: ":8200"
Is a firewall blocking the traffic (like Window's built-in one)?
10.9.21.91 is the IP that hosts are trying to reach? Just to be sure you could bind to host: "0.0.0.0:8200", which would cover all possible interfaces.
Replace "localhost:8200" with "0.0.0.0:8200" in apm-server.yml

TeamCity Build agent not connecting to TeamCity Server

I have a TeamCity Server(9.0.3 (build 32334)) on Amazon EC2 Windows Instance.
And i have another EC2 instance(Windows) for my Build Agents. I Installed a Build Agent on this new Instance on Port 9090 and it shows perfectly on the teamCity UI, however when i installed a second Agent on the same machine this time with port 9091, the new agent does not show up on the TeamCity UI(under connected/disconnected/unauthorized).
However both the Agent services are running ( verified it under Windows Services).
I followed this link for installing multiple agents :
https://confluence.jetbrains.com/display/TCD9/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-UsingLaunchDaemonsStartupFilesonMacOSx
And this is what i got from the TeamCity Agent log
buildServer.AGENT.registration - Call http://1.2.3.4/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: jetbrains.buildServer.CannotPingAgentException: Unable to ping agent BuildAgent_QANEW. Check firewall and/or try to specify 'ownAddress' in the agent configuration. Details: Agent 'BuildAgent_QANEW' cannot be accessed by any of the addresses: [1.2.3.4, 2001:0:9d38:90d7:1ca5:281b:f575:9901, 1.2.3.4], (port 9091)
It turned out to be an Firewall issue, i added a Custom TCP rule for Port 9091 for the Security group on EC2 and now the agent on port 9091 is also connecting. So whenever there is a CannotPingAgentException its most probably due to Firewall or Incorrect Agent properties.

How do I configure Hudson to run on port 80?

I'm setting up Hudson as an integration server that I expect other developers and stackholders to access. Rather than have to pass around urls with a specific port, I'd like to configure Hudson to listen on port 80.
The default port from installing Hudson as a service is 8080. I'd like to change this to 80, on a Server 2008 R2 or windows 7 machine that isn't running IIS or Apache.
Do the following to reconfigure the port :
Edit hudson.xml (found in your hudson installation directory)
change the parameter string on line 44 to reference port 80 (--httpPort=8080 to --httpPort 80)
Depending on what plugins you may have set up, there may be other references to the hudson url. Find these by doing a text search in the hudson directory on ':8080' and removing the port number.
Disable the 'World Wide Web Publishing Service' service. By default, this service consumes port 80, which is the port we want to use.
Verify that your machine is configured to accept an external connection on port 80 (ie, open a firewall port)
Restart the Hudson service.

Resources