Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a new teamcity build agent machine, which when started up tries to connect to the build server and fails. It never shows up in the connected, disconnected or unauthorised agents tabs of the build server web interface. The logs on the build agent show that it fails to connect with a 504 gateway timeout.

This is from teamcity-agent.log

[2012-09-04 15:34:59,776]   INFO - buildServer.AGENT.registration 
    - Registering on server http://10.0.10.16, AgentDetails{Name='my-local', AgentId=null, BuildId=null, AgentOwnAddress='10.0.1.14', AlternativeAddresses=[10.0.10.32], Port=8080, 
     Version='21424', PluginsVersion='21424-md5-somechecksum', AvailableRunners=[ABunchOfPlugins], AvailableVcs=[SomeRunners], AuthorizationToken='sometoken'} 
[2012-09-04 15:35:53,606]   WARN - buildServer.AGENT.registration 
    - Call http://10.0.10.16/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcClientException: 
    Server returned incorrect status code: 504 Gateway Time-out
[2012-09-04 15:35:53,606]   WARN - buildServer.AGENT.registration 
    - Connection to TeamCity server is probably lost. Will be trying to restore it. Take a look at logs/teamcity-agent.log for details (unless you're using custom logging).

(I have edited some identifying data out of this log excerpt)

But I can reach the build server. In fact, tracert shows that it is very nearby.

Tracing route to TEAMCITYSERVER [10.0.10.16]
over a maximum of 30 hops:
  1    <1 ms    <1 ms    <1 ms  10.0.2.1 
  2    <1 ms    <1 ms    <1 ms  TEAMCITYSERVER [10.0.10.16] 
Trace complete.

I can see a teamcity login page if I hit http://10.0.10.16 in the browser. The teamcity service is logging in as the same (local administrator) account as I used to log in and test the network.

The build agent is a windows 2008 server VM hosted on Ubuntu 12.04 under Oracle VirtualBox. I have disabled firewalls on both the Windows and Ubuntu machines. Other VMS with similar configuration can connect fine and do not report this error.

What can possibly be preventing this connection?

share|improve this question

1 Answer 1

It's working now. My guess as to what fixed it is:

1) Shut down the VM and check the settings in VirtualBox|Settings|Network|Adapter 1. Set the "Attached to" to "Bridged adapter", Name "eth0", and if these settings are copied from another machine, generate a new mac address.

2) After rebooting the VM, check the IP address with ipconfig. Find and update the build agent config file (installdir)\conf\buildAgent.properties - set the ownAddress=1.2.3.4 line to the new ip address.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.