egregors/teamcity-docker-compose

Agent Has Unregistered ( will upgrade ) - Docker Image Agent

GokulendraPanda opened this issue ยท 9 comments

System Scenario ๐Ÿ‘

Team City Server Running on : Windows [ VM ] with Firewall & Antivirus Disabled
Tried to set up Team City Docker Image Agent on Linux [ VM ]
( with command : docker pull jetbrains/teamcity-agent
docker run -it -e SERVER_URL="http://xx.xx.xx.xx:8111/" -v /opt/:/data/teamcity_agent/conf jetbrains/teamcity-agent ]

On Team City Server UI it is showing Agent Has Unregistered ( will upgrade ) under Agents > Disconnected ]

Logs snippet :

jetbrains.buildServer.AGENT - Upgrade mode: jetbrains.buildServer.agent.impl.upgrade.modes.FullUpgradeMode
[2019-01-07 11:36:55,577] INFO - rocesses.ProcessTreeTerminator - Using jetbrains.buildServer.processes.ProcessTreeTerminatorLinux
[2019-01-07 11:36:55,578] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2019-01-07 11:36:55,607] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2019-01-07 11:36:55,628] INFO - ses.ProcessTreeTerminatorLinux - Second thread id is 3174
[2019-01-07 11:36:55,632] INFO - ses.ProcessTreeTerminatorLinux - Thread is Process thread model: false
[2019-01-07 11:36:55,632] INFO - .ProcessTreeTerminatorImplBase - Collecting processes from the current one, current process PID 3174
[2019-01-07 11:36:55,633] INFO - .ProcessTreeTerminatorImplBase - No processes to kill
[2019-01-07 11:36:55,634] INFO - jetbrains.buildServer.AGENT - Exit for upgrade
[2019-01-07 11:36:55,634] INFO - ent.impl.upgrade.AgentExitCode - Agent exited. Upgrade process
[2019-01-07 11:36:55,640] INFO - buildServer.agent.AgentMain2$2 - Closing jetbrains.buildServer.agent.AgentMain2$2@6e6c3152: startup date [Mon Jan 07 11:36:25 GMT 2019]; root of context hierarchy

@GokulendraPanda When you first time run the agent, and the agent successfully connected (but does not authorize yet) to the server, the agent needs some time to install all plugins and updates ("will upgrade"). It process depends on your connection speed and CPU (usually 5-10 mins). After updating you will find the agent in the agent's list and then you may authorize them.

No it's now over 14 Hrs . The Agent is still showing under 'Disconnected' with "
Agent has unregistered (will upgrade)"

The Agent instance continuously restarts ( which I can see in the logs ) .

Note : One thing .. The Windows VM which acts as a server and the Linux VM in which Docker Image Agent is running both are in different IP ranges but in LAN .. I can ping the Linux VM from the Windows VM and vise-versa

Hi I got the solution . Actually it is a bug in Cent OS : https://youtrack.jetbrains.com/issue/TW-51501 , But successfully done with Ubuntu....

Cent OS : 7

@GokulendraPanda glad to hear you successfully resolve the problem ๐Ÿ‘ But this is still the very unusual case (master on win host, agents on docker). Probably we should add the kind of Troubleshooting chapter in the README

Yes sure .. But We have to cover all possible combinations

So, if all works right, feel free to send PR with troubleshooting for this specific case

Sure...

Looks like this issue is not actual