Error registering on the server via URL http://172.17.0.3. Will continue repeating connection attempts.
I run teamcity-agent by docker image on 172.17.0.3, and I run teamcity-agent by docker image to with
```
docker run -itd -name tc-agent -e SERVER_URL="172.17.0.3:8111" \
-v /www/wwwroot/teamcity/data/teamcity_agent/conf:/data/teamcity_agent/conf \
jetbrains/teamcity-agent
```
then it can't connect teamcity-server.
here's log:
buildServer.AGENT.registration - Registering on server via URL "http://172.17.0.3": AgentDetails{Name='', AgentId=null, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[], Port=9090, Version='99542', PluginsVersion='99542-md5-a28fa1110ef18117786482b6c2def8aa', AvailableRunners=[Ant, cargo-deploy-runner, csharpScript, DockerCommand, dotnet, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, gradle-runner, Inspection, jetbrains_powershell, JPS, kotlinScript, Maven2, nodejs-runner, python-runner, rake-runner, SBT, simpleRunner, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner], AvailableVcs=[tfs, cvs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='', PingCode='3BvcSsVk7H43y0SmIQJZdYXxhJksGtZK'}
[2022-02-14 02:38:34,344] WARN - buildServer.AGENT.registration - Error while asking server for the communication protocols via URL http://172.17.0.3/app/agents/protocols. Will try later: java.net.ConnectException: Connection refused (Connection refused) (enable debug to see stacktrace)
[2022-02-14 02:38:34,344] WARN - buildServer.AGENT.registration - Error registering on the server via URL http://172.17.0.3. Will continue repeating connection attempts.
[2022-02-14 02:38:34,350] INFO - jetbrains.buildServer.AGENT - Build agent started
[2022-02-14 02:38:34,426] INFO - jetbrains.buildServer.AGENT - CPU benchmark index is set to 682
[2022-02-14 02:38:34,810] INFO - r.artifacts.impl.HttpDiskCache - Cleaning up items with life time in cache greater than 172800 seconds
[2022-02-14 02:38:34,811] INFO - r.artifacts.impl.HttpDiskCache - Finished cleaning up expired items, 0 items removed
[2022-02-14 02:38:34,897] INFO - dDirectoryBasedCleanupRegistry - Removing files from /opt/buildagent/temp/.old
[2022-02-14 02:38:34,897] INFO - dDirectoryBasedCleanupRegistry - Removing files from /opt/buildagent/work/.old
[2022-02-14 02:38:34,932] INFO - l.directories.DirectoryMapImpl - Cleaning up old checkout directories. Default lifetime = 192 hour(s)
ifconfig:

| name | image | IP | port | |||
|---|---|---|---|---|---|---|
| tc-agent |
jetbrains/teamcity-agent
|
172.17.0.4 | ||||
| tc-server |
jetbrains/teamcity-server
|
172.17.0.3 | 8111 |
Please sign in to leave a comment.
Hi,
Can you verify the command used to start the jetbrains/teamcity-server container? Are you able to access the server from your web browser? Also, have you completed the TeamCity Server startup and accepted the license agreement?
It is fairly typical to use a command like the below to start the TeamCity server container:
Then you would use the Host IP address and port for the server url on the TeamCity agent: