Hello, I have been trying to setup a TeamCity Server and Agent on a mac mini running Sierra through Docker.
I installed the official containers for server and agent:
https://hub.docker.com/r/jetbrains/teamcity-agent/
https://hub.docker.com/r/jetbrains/teamcity-server/
The first time I tried the agent successfully registered. But when restarting my machine the agent container disappeared.
Now after fetching the agent container again and trying to run the agent it can't connect to the server:
[2017-02-02 10:16:33,945] INFO - buildServer.AGENT.registration - Registering on server via URL http://localhost:32775.
AgentDetails{Name='', AgentId=null, BuildId=null, AgentOwnAddress='http://localhost:32784',
AlternativeAddresses=[172.17.0.3], Port=9090, Version='42538', PluginsVersion='NA', AvailableRunners=[],
AvailableVcs=[], AuthorizationToken='', PingCode='DXMQRAdOkr1LqNhl18DUHPnzn4xFYsdV'}
[2017-02-02 10:16:33,945] WARN - buildServer.AGENT.registration - Error while asking server for the communication protocols via URL http://localhost:32775/app/agents/protocols.
Will try all protocols: java.net.ConnectException: Connection refused (enable debug to see stacktrace)
[2017-02-02 10:16:33,945] INFO - buildServer.AGENT.registration - Trying to register on server using 'polling' protocol.
[2017-02-02 10:16:33,947] INFO - buildServer.AGENT.registration -
Registration using 'polling' protocol failed: java.net.ConnectException: Connection refused (enable debug to see stacktrace)
[2017-02-02 10:16:33,947] INFO - buildServer.AGENT.registration - Trying to register on server using 'xml-rpc' protocol.
[2017-02-02 10:16:33,947] INFO - buildServer.AGENT.registration - Registration using 'xml-rpc' protocol failed: java.net.ConnectException: Connection refused (enable debug to see stacktrace)
[2017-02-02 10:16:33,948] WARN - buildServer.AGENT.registration - Error registering on the server via URL http://localhost:32775.
Will continue repeating connection attempts.
But I can't see any log files anywhere.
any ideas? (I did upgrade ruby between successful and failed attempts if that make a difference)
Thanks
Hello Christian,
You need to specify full URL for TeamCity server, accessible by the agent. Please check whether server is accessible by the agent. "localhost" will not generally work as that will refer to the "localhost" inside the container.
THANKYOU! Had to use my machine's IP address
Sometimes you need to ensure that DNS Resolution is actually working for the address it is unable to resolve. If you still get issues after upgrading successfully.
the only solution that worked is from Grezgorz : https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206223609-Remote-agent-doesn-t-connect-to-server
OK, I've found solution to my problem.
I've to specify in file buildAgent.properies my IP address:
ownAddress=193.168.1.103