Unable to download remote agent jar on Bamboo 4.3
Asked by Jan Swaelens:

Hello,

On our bamboo 4.3 instance we get an error when we try to download the remote agent jar:

```
Caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: java.io.FileNotFoundException: /tmp/jarClassPath9174692559081110970.jar (No such file or directory)	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)	at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)	at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:89)	at com.atlassian.bamboo.agent.classserver.AgentClassServerImpl.getSystemClasspathZip(AgentClassServerImpl.java:189)	at com.atlassian.bamboo.agent.classserver.AgentInstallerServlet$1.create(AgentInstallerServlet.java:45)	at com.atlassian.bamboo.agent.classserver.AgentInstallerServlet$1.create(AgentInstallerServlet.java:41)	at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:143)	at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:326)	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146)	... 79 moreCaused by: java.io.FileNotFoundException: /tmp/jarClassPath9174692559081110970.jar (No such file or directory)	at java.io.FileInputStream.open(Native Method)	at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:120)	at com.atlassian.bamboo.io.FileInputSupplier.getInput(FileInputSupplier.java:34)	at com.atlassian.bamboo.io.FileInputSupplier.getInput(FileInputSupplier.java:14)	at com.atlassian.bamboo.agent.classserver.JarDescriptor.getInputStream(JarDescriptor.java:97)	at com.atlassian.bamboo.agent.classserver.AgentClassServerImpl.writeClasspathToOutputStream(AgentClassServerImpl.java:274)	at com.atlassian.bamboo.agent.classserver.AgentClassServerImpl.access$200(AgentClassServerImpl.java:45)	at com.atlassian.bamboo.agent.classserver.AgentClassServerImpl$3.create(AgentClassServerImpl.java:105)	at com.atlassian.bamboo.agent.classserver.AgentClassServerImpl$3.create(AgentClassServerImpl.java:84)	at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:143)	at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:326)	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146)	... 87 more
```

What could be going wrong here?


Answers:
author: Jan Swaelens
body: I managed to get around this by restarting bamboo. Could it be that that jar file is generated once and assumed to stay there forever? I can imagine that the tmp folder of an OS gets cleared from time to time which makes this approach a bit dangerous in my eyes. Could this be fixed by re-creating the jar when its not found?

comments: author: Przemek Bruski
body: Yes, that's exactly the problem. We have an issue open for it: <https://jira.atlassian.com/browse/BAM-12801> , watch and vote.


author: Jan Swaelens
body: Just noticed that it has been fixed in 4.4.3, many thanks!


author: Jan Swaelens
body: I just had another case of this issue. It is actually quite problematic because it causes the remote agents to become unable to restart (we brought them down for os reboot). This means that the master bamboo instance needs to be brought down and back up before the agents can access the new temporary jar hosted at the server to allow full startup.

As you can imagine it is not always easy to bring down a CI Server instance, it is usually quite bussy with its daily business causing lots of grief for the developers and quality folks.

Thanks for having another look at this.


author: Przemek Bruski
body: Which operating system is this?

comments: author: Jan Swaelens
body: Its a CentOs 5.8 instance.