Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30593

Unable to connect to WebSphere 8.5 when credentials are supplied

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins ver. 1.628, running directly as a Windows Service
      hosted on Windows Server 2008
      WebSphere ver. 8.5
      WebSphere Deployer Plugin ver. 1.3.4

      When configuring my Jenkins build to deploy to WebSphere, the connection test will succeed if I do not provide credentials (user / pw fields are blank). If I enter credentials, it will continue to succeed, but deployments fail with the error

      Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException: Could not determine if artifact 'patient-portal-schedule-ear' is installed: ADMA0089E: The AppManagement MBean is not found.
      

      If I then restart Jenkins, any connection test done with credentials provided fails with the error

      Error opening socket: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext); targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)] 
      

      If I clear the user / pw fields again, the connection test will succeed again, and continue to until I restart Jenkins again.

      I realize probably need to go back and make sure that I've imported the (self-signed) certificate for the websphere host everywhere it needs to be, but this behavior seemed odd.

          [JENKINS-30593] Unable to connect to WebSphere 8.5 when credentials are supplied

          Nick Harvey added a comment -

          FWIW, I also get the warning

          WARNING: ADMC0046W: The system failed to load properties from com.ibm.SOAP.configURL: file:null/properties/soap.client.props

          in jenkins.err.log every time I test the connection (failure or successful test), not sure if that's relevant though.

          Nick Harvey added a comment - FWIW, I also get the warning WARNING: ADMC0046W: The system failed to load properties from com.ibm.SOAP.configURL: file: null /properties/soap.client.props in jenkins.err.log every time I test the connection (failure or successful test), not sure if that's relevant though.

          Greg Peters added a comment -

          Nick,

          First, the 'configURL: file: null/properties/soap.client.props' error can safely be ignored. Unless you want to use soap specific configurations when connecting to WebSphere. Most organizations normally don't use this (When I say 'Most', I mean practically all).

          Secondly, this plugin will only work on the Jenkins Master node and not on Jenkins Slaves.

          Thirdly, The AppManagement Bean is missing. This likely means you don't have the appropriate required jars in the Jenkins classpath.

          Lastly, If your flavor of WebSphere has global security turned on, you'll need to copy of the SSL cert from the admin console to your Jenkins Master server and import it into the cacerts file for the JVM where Jenkins Master is running under.

          -Greg

          Greg Peters added a comment - Nick, First, the 'configURL: file: null/properties/soap.client.props' error can safely be ignored. Unless you want to use soap specific configurations when connecting to WebSphere. Most organizations normally don't use this (When I say 'Most', I mean practically all). Secondly, this plugin will only work on the Jenkins Master node and not on Jenkins Slaves. Thirdly, The AppManagement Bean is missing. This likely means you don't have the appropriate required jars in the Jenkins classpath. Lastly, If your flavor of WebSphere has global security turned on, you'll need to copy of the SSL cert from the admin console to your Jenkins Master server and import it into the cacerts file for the JVM where Jenkins Master is running under. -Greg

          Nick Harvey added a comment -

          Thanks for the info Greg. I didn't mention it specifically in the original post, but I did follow the setup instructions (to the best of my ability, though I may have missed something), copying com.ibm.ws.admin.client_8.5.0.jar and com.ibm.ws.orb_8.5.0.jar to plugins\websphere-deployer\WEB-INF\lib. I am currently running the deploy jobs from only the master node. And I also imported the cert from the WAS box to Jenkin's internal JRE cacerts file.

          In any case, the behavior I was asking about was that the connection test fails when valid credentials are supplied, then "succeeds" (false positive) when the user/pw fields are cleared. If the credentials are then repopulated, the connection test continues to "succeed" until Jenkins is restarted.

          Nick Harvey added a comment - Thanks for the info Greg. I didn't mention it specifically in the original post, but I did follow the setup instructions (to the best of my ability, though I may have missed something), copying com.ibm.ws.admin.client_8.5.0.jar and com.ibm.ws.orb_8.5.0.jar to plugins\websphere-deployer\WEB-INF\lib. I am currently running the deploy jobs from only the master node. And I also imported the cert from the WAS box to Jenkin's internal JRE cacerts file. In any case, the behavior I was asking about was that the connection test fails when valid credentials are supplied, then "succeeds" (false positive) when the user/pw fields are cleared. If the credentials are then repopulated, the connection test continues to "succeed" until Jenkins is restarted.

          Ashwani Raj added a comment -

          Hi gpeters,

          I am also getting the same error mentioned in first comment. Can you please help me in understanding second point of your reply:

          Secondly, this plugin will only work on the Jenkins Master node and not on Jenkins Slaves.

          I don't know how to resolve this. Is it that we need to have WAS and Jenkins on same machine to connect?

          Thanks

          Ashwani Raj added a comment - Hi gpeters , I am also getting the same error mentioned in first comment. Can you please help me in understanding second point of your reply: Secondly, this plugin will only work on the Jenkins Master node and not on Jenkins Slaves. I don't know how to resolve this. Is it that we need to have WAS and Jenkins on same machine to connect? Thanks

          Greg Peters added a comment -

          ashwaniraj90

          1) If you're using WAS ND, you must point the plugin configuration to the Deployment Manager SOAP port and not the instance of a particular app server instance.
          2) WAS can be on any remote(or local) machine but this plugin will only work on a Jenkins Master node.
          3) WAS and Jenkins don't have to be installed on the same machine for this to work.

          -Greg

          Greg Peters added a comment - ashwaniraj90 1) If you're using WAS ND, you must point the plugin configuration to the Deployment Manager SOAP port and not the instance of a particular app server instance. 2) WAS can be on any remote(or local) machine but this plugin will only work on a Jenkins Master node. 3) WAS and Jenkins don't have to be installed on the same machine for this to work. -Greg

            Unassigned Unassigned
            nick_harvey Nick Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: