Agent won't start: "Server url was not set"

I'm having trouble with a windows agent extracted from a zip (trying to silently install therefore I'm not using the msi). I've created the buildAgent.properties file in the conf directory and whether I install and start service or run it from a command prompt, I get this:


[2013-05-25 12:17:58,974]  ERROR - s.buildServer.agent.AgentMain2 - Failed to start build agent. Server url was not set. Please check 'serverUrl' key in buildAgent.properties file
[2013-05-25 12:17:58,974]  DEBUG - s.buildServer.agent.AgentMain2 - Failed to start build agent. Server url was not set. Please check 'serverUrl' key in buildAgent.properties file
jetbrains.buildServer.agent.impl.BuildAgentStartFailedException: Server url was not set. Please check 'serverUrl' key in buildAgent.properties file
    at jetbrains.buildServer.agent.impl.config.BuildAgentConfigurationImpl.validateParameters(BuildAgentConfigurationImpl.java:165)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl.init(BuildAgentImpl.java:628)
    at jetbrains.buildServer.agent.AgentMain2.startAgent(AgentMain2.java:159)
    at jetbrains.buildServer.agent.AgentMain2.main(AgentMain2.java:40)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:41)

It most definitely is set and I have even done a file comparison of the entire BuildAgent directory to that of a working agent and there is literally nothing of relevance I can see that's different. I even ran process monitor to see what files are being accessed in case it was looking for the file in some other location, but I didn't see anything wrong there either.

What would cause this error to occur if the value is in fact set?

Edit: I didn't see the "mark this as a question" option until I clicked post. I don't see a way to edit the thread and mark it as a question after the fact. :(

4 comments
Comment actions Permalink

Forgot to mention this is build 24266 of the agent.


0
Comment actions Permalink

Bump. Really need some help here!

0
Comment actions Permalink

OK, this problem is solved. The script I was using which edited the buildAgent.properties file was changing the file encoding.

1
Comment actions Permalink

Another reason for this seems to be when the buildAgent.properties file does not exist. In my case, I'd accidentally renamed it and left a space there. The agent doesn't seem to complain that the file doesn't exist or that it's not readable.

0

Please sign in to leave a comment.