Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-17131

Checkout from git via SSH fails with NoClassDefFoundError

    XMLWordPrintable

    Details

      Description

      Summary

      SSH checkout does not work in Bamboo 5.9.9

      Steps to Reproduce

      1. Add a Git repository with SSH clone URL
      2. Use ssh private key for authentication (or use user/password authentication)
      3. Create a plan and use the created repository
      4. Start the plan

      Expected Results

      The plan should complete successfully with the SSH checkout passing

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      2016-01-21 04:18:36,233 INFO [10-BAM::PlanExec:pool-17-thread-2] [DefaultErrorHandler] Recording an error: Unable to detect changes : TP-TP : com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/local/bin/git ls-remote ssh://1e9360ab-6bd0-48bf-95b5-b7f9f2accb1d@127.0.0.1:47121/foo/bar.git failed with code 128. Working directory was [.]., stderr:
      Authenticating remote session failed
      stdout:
      [Warning: Permanently added '[127.0.0.1]:47121' (RSA) to the list of known hosts., BAMBOO-SSH-PROXY: [While connecting to [git@bitbucket.org/104.192.143.3:22]: Authenticating remote session failed: Session is closed], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.]
      2016-01-21 04:18:48,140 INFO [13-BAM::Default Agent::Agent:pool-28-thread-1] [BuildAgentControllerImpl] Agent 131073 checking build queue for executables...
      2016-01-21 04:18:49,353 WARN [PluginSchedulerTask-com.atlassian.bamboo.analytics.basedata.collector.CollectionJob:job] [AuthorizationLoggerListener] Credentials not found: org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext; secure object: ReflectiveMethodInvocation: public abstract java.util.List com.atlassian.bamboo.plan.PlanManager.getAllPlans(java.lang.Class); target is of class [com.atlassian.bamboo.plan.PlanManagerImpl]; configuration attributes: [ROLE_USER, ROLE_ANONYMOUS, AFTER_ACL_COLLECTION_READ]
      2016-01-21 04:21:32,799 WARN [sshd-SshClient[4772488e]-nio2-thread-2] [ClientSessionImpl] Exception caught
      java.lang.NoClassDefFoundError: com/jcraft/jzlib/ZStream
      	at org.apache.sshd.common.compression.CompressionZlib.init(CompressionZlib.java:67)
      	at org.apache.sshd.common.session.AbstractSession.receiveNewKeys(AbstractSession.java:1000)
      	at org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:366)
      	at org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:295)
      	at org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:256)
      	at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:731)
      	at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:277)
      	at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
      	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:187)
      	at org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:173)
      	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)
      	at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
      	at sun.nio.ch.Invoker$2.run(Invoker.java:218)
      	at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Workaround

      As a workaround, download the attached jzlib-1.1.3.jar and place it in the <BambooInstallationDir>/atlassian-bamboo/WEB-INF/lib (on Linux) or <BambooInstallationDir>\atlassian-bamboo\WEB-INF\lib (on Windows) directory and restart Bamboo.

      Alternatively you can also upgrade to Bamboo 5.10.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dlee@atlassian.com Deric Lee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: