org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available

Jenkins JIRA | Oded Arbel | 12 months ago
  1. 0

    When running a local build (on the master), the build fails to load the ssh-agent: {code} Started by an SCM change Building in workspace /var/jenkins_home/workspace/production - client (prod3) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Unable to read key: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available at org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source) at org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source) at org.bouncycastle.openssl.jcajce.PEMUtilities.crypt(Unknown Source) at org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder$1$1.decrypt(Unknown Source) at org.bouncycastle.openssl.PEMEncryptedKeyPair.decryptKeyPair(Unknown Source) at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.addIdentity(JNRRemoteAgent.java:98) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.add(SSHAgentBuildWrapper.java:388) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:227) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.security.NoSuchAlgorithmException: PBKDF-OpenSSL SecretKeyFactory not available at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121) at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:159) at org.bouncycastle.jcajce.util.DefaultJcaJceHelper.createSecretKeyFactory(Unknown Source) ... 14 more [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) {code} Then the build looks like its continuing normally, but the ssh key was not actually loaded and as a result the build fails: {code} + ssh -o StrictHostKeyChecking=no deploy@xxx.xxx.xxx some command Permission denied (publickey). + ... + exit 5 + exit 5 Build step 'Execute shell' marked build as failure [ssh-agent] Stopped. {code} Running the same job on a slave works fine: {code} Started by user Oded Arbel Building remotely on trusty (i-5827fe82) (trusty docker) in workspace /srv/build/workspace/production - client (prod3) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) {code} Downgrading the ssh-agent plugin to version 1.8 worked around the problem. After downgrade: {code} Started by user Oded Arbel Building in workspace /var/jenkins_home/workspace/production - client (prodhk) [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. {code} Also see here: https://www.botbot.me/freenode/jenkins/2015-12-16/?msg=56268453&page=4

    Jenkins JIRA | 12 months ago | Oded Arbel
    org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available
  2. 0

    When running a local build (on the master), the build fails to load the ssh-agent: {code} Started by an SCM change Building in workspace /var/jenkins_home/workspace/production - client (prod3) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Unable to read key: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available at org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source) at org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source) at org.bouncycastle.openssl.jcajce.PEMUtilities.crypt(Unknown Source) at org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder$1$1.decrypt(Unknown Source) at org.bouncycastle.openssl.PEMEncryptedKeyPair.decryptKeyPair(Unknown Source) at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.addIdentity(JNRRemoteAgent.java:98) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.add(SSHAgentBuildWrapper.java:388) at com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:227) at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.security.NoSuchAlgorithmException: PBKDF-OpenSSL SecretKeyFactory not available at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121) at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:159) at org.bouncycastle.jcajce.util.DefaultJcaJceHelper.createSecretKeyFactory(Unknown Source) ... 14 more [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) {code} Then the build looks like its continuing normally, but the ssh key was not actually loaded and as a result the build fails: {code} + ssh -o StrictHostKeyChecking=no deploy@xxx.xxx.xxx some command Permission denied (publickey). + ... + exit 5 + exit 5 Build step 'Execute shell' marked build as failure [ssh-agent] Stopped. {code} Running the same job on a slave works fine: {code} Started by user Oded Arbel Building remotely on trusty (i-5827fe82) (trusty docker) in workspace /srv/build/workspace/production - client (prod3) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) {code} Downgrading the ssh-agent plugin to version 1.8 worked around the problem. After downgrade: {code} Started by user Oded Arbel Building in workspace /var/jenkins_home/workspace/production - client (prodhk) [ssh-agent] Using credentials git (Bitbucket checkout) [ssh-agent] Using credentials deploy (Deployment key to work with Minion Master) [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Started. {code} Also see here: https://www.botbot.me/freenode/jenkins/2015-12-16/?msg=56268453&page=4

    Jenkins JIRA | 12 months ago | Oded Arbel
    org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available
  3. 0

    [JIRA] [ssh-agent-plugin] (JENKINS-32120) With ssh-agent 1.9, local builds fail with "Unable to create OpenSSL PBDKF"

    Google Groups | 12 months ago | od...@geek.co.il (JIRA)
    org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [git-client-plugin] (JENKINS-32834) Failed to connect to repository with password-protected ssh key

    Google Groups | 10 months ago | argrico@gmail.com (JIRA)
    org.bouncycastle.openssl.PEMException: Unable to create OpenSSL PBDKF: PBKDF-OpenSSL SecretKeyFactory not available

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.NoSuchAlgorithmException

      PBKDF-OpenSSL SecretKeyFactory not available

      at javax.crypto.SecretKeyFactory.<init>()
    2. Android Platform
      SecretKeyFactory.getInstance
      1. javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
      2. javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:159)
      2 frames
    3. Bouncy Castle Provider
      DefaultJcaJceHelper.createSecretKeyFactory
      1. org.bouncycastle.jcajce.util.DefaultJcaJceHelper.createSecretKeyFactory(Unknown Source)
      1 frame
    4. Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs
      JcePEMDecryptorProviderBuilder$1$1.decrypt
      1. org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source)
      2. org.bouncycastle.openssl.jcajce.PEMUtilities.getKey(Unknown Source)
      3. org.bouncycastle.openssl.jcajce.PEMUtilities.crypt(Unknown Source)
      4. org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder$1$1.decrypt(Unknown Source)
      4 frames
    5. BouncyCastle
      PEMEncryptedKeyPair.decryptKeyPair
      1. org.bouncycastle.openssl.PEMEncryptedKeyPair.decryptKeyPair(Unknown Source)
      1 frame
    6. com.cloudbees.jenkins
      SSHAgentBuildWrapper.preCheckout
      1. com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.addIdentity(JNRRemoteAgent.java:98)
      2. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.add(SSHAgentBuildWrapper.java:388)
      3. com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.preCheckout(SSHAgentBuildWrapper.java:227)
      3 frames
    7. jenkins.scm
      SCMCheckoutStrategy.preCheckout
      1. jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
      1 frame
    8. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
      2. hudson.model.Run.execute(Run.java:1738)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:98)
      5. hudson.model.Executor.run(Executor.java:410)
      5 frames