Bamboo Remote Agent Problem: URI has an authority component
Asked by Robin Gau?:

I have a problem with one of my remote agents. When starting the agent I see the following errors in the log file:

```
Exiting due to fatal exception.java.lang.IllegalArgumentException: URI has an authority component   at java.io.File.&lt;init&gt;(Unknown Source)   at com.atlassian.bamboo.agent.bootstrap.BootstrapUpdater.ensureLatestBootstrap(BootstrapUpdater.java:36)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.updateBootstrapIfNecessary(AgentContext.java:203)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:104)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:94)   at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:95)   at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:41)   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 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)   at java.lang.Thread.run(Unknown Source)FATAL [WrapperSimpleAppMain] [AgentBootstrap] Exiting due to fatal exception.java.lang.IllegalArgumentException: URI has an authority component   at java.io.File.&lt;init&gt;(Unknown Source)   at com.atlassian.bamboo.agent.bootstrap.BootstrapUpdater.ensureLatestBootstrap(BootstrapUpdater.java:36)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.updateBootstrapIfNecessary(AgentContext.java:203)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:104)   at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:94)   at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:95)   at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:41)   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 org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)   at java.lang.Thread.run(Unknown Source)JVM exited while starting the application.
```

I checked the Java version and architecture, the config file for the wrapper and the agent and couldn't find any difference to the other Remote Agents that I use. The system Path variable looks good as well.

Remote Agent Infos:  
OS: Windows 7 x64  
Jdk: 1.8_60 x64 by Oracle  
Wrapper / Remote Agent Version: Version 3.2.3-atlassian-1

Bamboo Version: 5.9.4  

Any help is highly appreciated.  


Answers:
author: Robin Gau?
body: I found it out myself.

The problem was caused by a network share of the standard installation path. The path was shared before the bamboo agent got installed. Somehow the installation batch for the service used the UNC path for the call of the agent rather than the local path. It worked after removing the share of the folder and reinstalling the whole agent.  
Make sure to check the "Path to executable" in the Windows service if you run into a similar problem.


author: Przemek Bruski
body: What is the full path of your atlassian-bamboo-agent-bootstrap.jar ?

comments: author: Robin Gau?
body: I guess you mean the bamboo-agent-bootstrap.jarFull path:C:\\Users\\\[UserID\]\\bamboo-agent-home\\lib\\bamboo-agent-bootstrap.jarThe UserID contains no blanks or special characters it's like abc123.


author: rsperafico
body: Hello Robin,The file requested is "atlassian-bamboo-agent-bootstrap-5.9.4.jar":\* under "\<bamboo-install\>/atlassian-bamboo/WEB-INF/lib"\* under "\<bamboo-agent-home\>/classpath"---Kind regards,Rafael P. SperaficoAtlassian Support


author: Robin Gau?
body: Alright, the paths are:E:\\Atlassian\\Bamboo\\atlassian-bamboo\\WEB-INF\\lib\\atlassian-bamboo-agent-bootstrap-5.9.4.jaror\\\\\[Hostname\]\\Atlassian\\Bamboo\\atlassian-bamboo\\WEB-INF\\lib\\atlassian-bamboo-agent-bootstrap-5.9.4.jarandC:\\Users\\\[UserID\]\\bamboo-agent-home\\classpath\\atlassian-bamboo-agent-core-5.9.4.jar


author: Przemek Bruski
body: How do you start your agent?


author: Robin Gau?
body: I used the included batches to create a Windows service.Something strange happened today. After reinstalling the whole agent, the process agent that got started by the installation process was working correct. The service that I installed afterwards failed again with the same error like before. So I guess it has something to do with the service.The service is set up to use the account of the main PC user which also has local admin rights on the machine and can write to the user directory where the builds are happening. Maybe this has something to do with it?This setup is also used on the other 3 remote agents that are working with no problem. But maybe I missed something.


author: Przemek Bruski
body: What I think happens is that for some reason the agent determines its location using an UNC path and that does not work.


Tags: bamboo-administration