Unable to start Bamboo Remote Agent 3.4.3 as Windows Service upon install (java.io.EOFException: Unexpected end of ZLIB input stream on classpath.zip)

We are moving from .bat file to start the bamboo agent. And I have successfully installed Bamboo Remote Agent 3.4.3 as Windows Service.

java -Dbamboo.home=%RemoteAgentHome% -jar atlassian-bamboo-agent-installer-3.4.3.jar http://bamboo.dev.e2open.com/agentServer/ installntservice

Upon trying to "Start" I'm getting the following exception (java.io.EOFException: Unexpected end of ZLIB input stream on classpath.zip):

INFO | jvm 5 | 2012/11/06 21:15:57 | Requesting fingerprint, url: http://bamboo.dev.e2open.com:8085/agentServer/GetFingerprint.action?hostName=build32.corp.e2open.com&version=3&agentUuid=f6eb67f9-6293-4c92-8a71-9ee66f1b8cfb
INFO | jvm 5 | 2012/11/06 21:15:57 | 271 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.AgentContext - Successfully authenticated with Bamboo server at http://bamboo.dev.e2open.com:8085/agentServer/
INFO | jvm 5 | 2012/11/06 21:15:57 | 285 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.BootstrapUpdater - Checking if bootstrap C:\agent\build32\lib\bamboo-agent-bootstrap.jar is up to date, using url: http://bamboo.dev.e2open.com:8085/agentServer/GetJar.action?name=bootstrap-with-deps&checksum=1637819227&fingerprint=-6649605686686372460
INFO | jvm 5 | 2012/11/06 21:15:57 | 293 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.BootstrapUpdater - Existing bootstrap is up to date.
INFO | jvm 5 | 2012/11/06 21:15:57 | 293 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.RemoteAgentHomeLocatorForBootstrap - Agent home located at 'c:\agent\build32'
INFO | jvm 5 | 2012/11/06 21:15:57 | 297 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder - Downloading resource: http://bamboo.dev.e2open.com:8085/agentServer/classpath.zip?fingerprint=-6649605686686372460
INFO | jvm 5 | 2012/11/06 21:15:57 | 302 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder - Generating a list of jars locally available in [c:\agent\build32\classpath]
INFO | jvm 5 | 2012/11/06 21:15:57 | 714 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder - 252 file(s) locally available.
INFO | jvm 5 | 2012/11/06 21:15:57 | 831 [WrapperSimpleAppMain] INFO com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder - Finished downloading resource 'http://bamboo.dev.e2open.com:8085/agentServer/classpath.zip?fingerprint=-6649605686686372460'
INFO | jvm 5 | 2012/11/06 21:15:57 | Exiting due to fatal exception.
INFO | jvm 5 | 2012/11/06 21:15:57 | java.io.EOFException: Unexpected end of ZLIB input stream
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.InflaterInputStream.fill(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.InflaterInputStream.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.ZipInputStream.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.InputStreamReader.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.fill(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.readLine(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.readLine(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClassServerManifestReader.read(ClassServerManifestReader.java:47)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.extractZipFile(ClasspathBuilder.java:193)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.getRemoteResources(ClasspathBuilder.java:141)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.build(ClasspathBuilder.java:62)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.getClassLoader(AgentContext.java:362)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:114)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:103)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:82)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:34)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | 836 [WrapperSimpleAppMain] FATAL com.atlassian.bamboo.agent.bootstrap.AgentBootstrap - Exiting due to fatal exception.
INFO | jvm 5 | 2012/11/06 21:15:57 | java.io.EOFException: Unexpected end of ZLIB input stream
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.InflaterInputStream.fill(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.InflaterInputStream.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.util.zip.ZipInputStream.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.nio.cs.StreamDecoder.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.InputStreamReader.read(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.fill(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.readLine(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.io.BufferedReader.readLine(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClassServerManifestReader.read(ClassServerManifestReader.java:47)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.extractZipFile(ClasspathBuilder.java:193)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.getRemoteResources(ClasspathBuilder.java:141)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.build(ClasspathBuilder.java:62)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.getClassLoader(AgentContext.java:362)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:114)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:103)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:82)
INFO | jvm 5 | 2012/11/06 21:15:57 | at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:34)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 5 | 2012/11/06 21:15:57 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
INFO | jvm 5 | 2012/11/06 21:15:57 | at java.lang.Thread.run(Unknown Source)
ERROR | wrapper | 2012/11/06 21:15:57 | JVM exited while starting the application.
FATAL | wrapper | 2012/11/06 21:15:57 | There were 5 failed launches in a row, each lasting less than 3 seconds. Giving up.
FATAL | wrapper | 2012/11/06 21:15:57 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2012/11/06 21:15:58 | <-- Wrapper Stopped

5 answers

I have also actually had several internal users complain about this exact same issue (java.io.EOFException: Unexpected end of ZLIB input stream on classpath.zip) when trying to install and get remote agents working. This has occurred on both windows and Linux operating systems and we have not yet figured out what is causing it. If anyone resolves this or finds an actual cause I would be interested in seeing the answer posted here.

Very interesting Adam - have you been able to see anything in the logs? Would be great if you could open a support case for this.

Sadly the issue has not happened to me directly so I haven't filed support cases. The internal users did not share the logs and the issue either cleared itself up or they uninstalled/reinstalled the agent. I've had this happen several times and am waiting for it to happen again at which point I'll grab the logs. In one case where it happened the user supposedly had 2 agents on 2 machines. I had installed fine, the other threw the ZLIB error after starting up post-install. He claimed he copied all the JAR files in the lib directory of the WORKING agent into the NON-working agent and it solved the problem. This would almost seem to indicate some sort of corruption of the JAR files extracted during install or a network issue downloading the agent installer, but I haven't nailed it down yet. Strange it has happened several times to different users with different VMs attempting to run agents (Bamboo 3.4.4).

Sounds like it could be an issue downloading a valid zip from the server. Do you have apache or anything else proxying in front of Bamboo?

Yes, we reverse proxy Bamboo using Apache HTTPD 2.x. From Jacob's URL above there is no port in it so I'm assuming they are proxying it as well. I've downloaded the agent installer several times from the same proxied URL as my users so I'm surprised I have not run into the issue myself.

Thats certainly stange that the problem seems to be intermittent for you. Keep me posted if you find anything (as being one of our most busy issue filers, I'm sure you will ;) )

Hi Jacob,

One thing to try when moving from .bat to a service is to rename or delete the old bamboo-agent-home directory completely before starting the agent. Windows is very picky about where windows services are allowed to write to on the file system for security purposes. If that does not work, please contact support.

Thanks
James

What specific version of Windows are you installing on, also what specific JDK (Oracle vs OpenJDK and version) ?

Hi Jacob, could you open up a support case with both your bamboo server logs and agent logs attached? We can get someone to look at it ASAP.

Our original bamboo remote agent that used to work with .bat file is now corrupted and not working.

I have tried deleting c:\Users\<user>\bamboo-agent-home directory and fresh new install .jar installation for running as service, but that doesn't work either. Same ZLIP issue.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

27 views 0 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you