Agent Already Registered??

I have a agent running via a startup script, ie - not as a windows service, because I need to run selenium automation tests and obviously interact with web browsers.  

This agent cmd window is throwing the following warning:

[2016-11-30 10:44:01,775]   WARN - buildServer.AGENT.registration - Agent id=null. Another agent with name "ctrhwsdev01"(id=2) is registered on the server. Please check you do not have two agents with the same name. 

So for some reason, it's trying to register with a NULL agent id.  It shouldn't be trying to register at all.

The server, shows the following:

[2016-11-30 10:47:09,527]   WARN -    jetbrains.buildServer.AGENT - Unable to register agent ["ctrhwsdev01" {id=0}]: another agent ["ctrhwsdev01" {id=0}] with the same authorization token is already registering 

So those ID's don't even line up.  If I execute the following URL:

http://ctrhsvdevtc01/httpAuth/app/rest/agents

I see:

<agents count="3" href="/httpAuth/app/rest/agents">
<agent id="1" name="CTRHSVDEVTC01" typeId="1" href="/httpAuth/app/rest/agents/id:1"/>
<agent id="2" name="ctrhwsdev01" typeId="2" href="/httpAuth/app/rest/agents/id:2"/>
<agent id="4" name="ctrhwsdev02" typeId="4" href="/httpAuth/app/rest/agents/id:4"/>
</agents>
 
So at least that ID matches with the agent's log.  But not the server's log.
 
Based on the logs, this worked up until yesterday.  I didn't upgrade.  I've been running things like this for a couple of months.
 
Any idea's what's going on???

 

 

0
3 comments

Hello Jason,

Sorry for delay. Is the problem still actual? If agent connects to the server for the first time, it has id=null. The following warning

[2016-11-30 10:47:09,527]   WARN -    jetbrains.buildServer.AGENT - Unable to register agent ["ctrhwsdev01" {id=0}]: another agent ["ctrhwsdev01" {id=0}] with the same authorization token is already registering 

is reported if there were several new agents (with null id) started at the same time. Are you sure that you haven't started the same agent several times? 

0
Avatar
Permanently deleted user

Hi,

 

I have same problem, What would be solution for this.

This is happening when we restart the server.

1
Avatar
Permanently deleted user

This has never been answered so I'm submitting my solution.

Basically this just means you disconnected your agent without telling the service.

So you have to stop the service first, then you can reconnect with that agent again.

I just run this as Administrator on Windows startup:

service.stop.bat
agent.bat start

0

Please sign in to leave a comment.