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

Invalid login error on revert snapshot operation

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • vsphere-cloud-plugin
    • jenkins : 2.277.4.3-rolling
      vsphere plugin : 2.25
      Pipeline: Basic Steps 2,23
      Folders 6,15
      Command Agent Launcher 1,5
      Credentials 2,3,15,1
      Node Iterator API 1,5,0
      SSH Build Agents ≥1,31,5

      Hello,

      We are facing a blocking issue :
      the core problem is described in this pipeline :

      pipeline {
        agent any
          stages {
            stage('Hello') {
              steps

      {                     vSphere buildStep: [$class: 'RevertToSnapshot', snapshotName: 'CLEAN_VM', vm:        'srdspiccloudxx '], serverName: 'Vcenter'                 }

            }
        }
      }

       

       

      the revert often fails with this message :

      10:29:32 Running on srdspiccloudxx in C:\CI\workspace\ic\poc\sylv1\reverttest
      {{ 10:29:32 [Pipeline] {}}
      {{ 10:29:32 [Pipeline] stage}}
      {{ 10:29:32 [Pipeline] { (Hello)}}
      {{ 10:29:32 [Pipeline] retry}}
      {{ 10:29:32 [Pipeline] {}}
      {{ 10:29:32 [Pipeline] timeout}}
      {{ 10:29:32 Timeout set to expire in 5 min 0 sec}}
      {{ 10:29:32 [Pipeline]}}{{

      { 10:29:32 [Pipeline] vSphere 10:29:32 [vSphere] 10:29:32 [vSphere] Performing vSphere build step: "Revert to Snapshot" 10:29:32 [vSphere] Attempting to use server configuration: "Vcenter" 10:29:32 [Pipeline] }

      }}10:29:33 [Pipeline] // timeout
      {{ 10:29:33 [Pipeline] echo}}
      {{ 10:29:33 com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password.}}
      {{ 10:29:33 [Pipeline] error}}
      {{ 10:29:33 [Pipeline] }}}
      {{ 10:29:33 ERROR: Timeout}}

      a more complete stack can be obtained using URL <jenkins server>/configureClouds/ and pressing button "Test Connection" multiple times :

      com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password.

      at sun.reflect.GeneratedConstructorAccessor2783.newInstance(Unknown Source)

      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

      at java.lang.Class.newInstance(Class.java:442)

      at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:253)

      at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:151)

      at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:109)

      at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:253)

      at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:96)

          [JENKINS-65803] Invalid login error on revert snapshot operation

          Ian added a comment -

          We are seeing the same issue. It happens for a different vSphere step (destroy VM) and it happens intermittently but it is definitely a blocker for us. 1.24 version did not have this problem but we can't revert to that as it has a UI issue meaning we can't edit jobs.

          We're also seeing the same issue creating and destroying vSphere template clones (also intermittently). The following exception appears in the logs:

          2021-06-11 06:36:14.973+0000 [id=24] WARNING hudson.slaves.NodeProvisioner#lambda$update$6: Unexpected exception encountered while provisioning agent v5_lite_atf9i9cb4wcrh11vyjfj4w4j41yb
          com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password.
          at sun.reflect.GeneratedConstructorAccessor1186.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at java.lang.Class.newInstance(Class.java:442)
          at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:253)
          at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:151)
          at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:109)
          at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:253)
          at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:96)
          at com.vmware.vim25.ws.VimStub.login(VimStub.java:1732)
          at com.vmware.vim25.mo.SessionManager.login(SessionManager.java:153)
          at com.vmware.vim25.mo.ServiceInstance.login(ServiceInstance.java:238)
          at com.vmware.vim25.mo.ServiceInstance.constructServiceInstance(ServiceInstance.java:131)
          at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:79)
          at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69)
          at org.jenkinsci.plugins.vsphere.tools.VSphere.<init>(VSphere.java:75)
          Caused: org.jenkinsci.plugins.vsphere.tools.VSphereException
          at org.jenkinsci.plugins.vsphere.tools.VSphere.<init>(VSphere.java:79)
          at org.jenkinsci.plugins.vsphere.tools.VSphere.connect(VSphere.java:98)
          at org.jenkinsci.plugins.vSphereCloud.vSphereInstance(vSphereCloud.java:302)
          at org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:400)
          at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.provisionNewNode(vSphereCloud.java:534)
          at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.access$100(vSphereCloud.java:496)
          at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:510)
          at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:506)
          at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
          at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)

           

          We're running Jenkins 2.277.4 - stable release and vSphere plugin 2.25.

          Ian added a comment - We are seeing the same issue. It happens for a different vSphere step (destroy VM) and it happens intermittently but it is definitely a blocker for us. 1.24 version did not have this problem but we can't revert to that as it has a UI issue meaning we can't edit jobs. We're also seeing the same issue creating and destroying vSphere template clones (also intermittently). The following exception appears in the logs: 2021-06-11 06:36:14.973+0000 [id=24] WARNING hudson.slaves.NodeProvisioner#lambda$update$6: Unexpected exception encountered while provisioning agent v5_lite_atf9i9cb4wcrh11vyjfj4w4j41yb com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password. at sun.reflect.GeneratedConstructorAccessor1186.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:253) at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:151) at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:109) at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:253) at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:96) at com.vmware.vim25.ws.VimStub.login(VimStub.java:1732) at com.vmware.vim25.mo.SessionManager.login(SessionManager.java:153) at com.vmware.vim25.mo.ServiceInstance.login(ServiceInstance.java:238) at com.vmware.vim25.mo.ServiceInstance.constructServiceInstance(ServiceInstance.java:131) at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:79) at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69) at org.jenkinsci.plugins.vsphere.tools.VSphere.<init>(VSphere.java:75) Caused: org.jenkinsci.plugins.vsphere.tools.VSphereException at org.jenkinsci.plugins.vsphere.tools.VSphere.<init>(VSphere.java:79) at org.jenkinsci.plugins.vsphere.tools.VSphere.connect(VSphere.java:98) at org.jenkinsci.plugins.vSphereCloud.vSphereInstance(vSphereCloud.java:302) at org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:400) at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.provisionNewNode(vSphereCloud.java:534) at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode.access$100(vSphereCloud.java:496) at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:510) at org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1.call(vSphereCloud.java:506) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)   We're running Jenkins 2.277.4 - stable release and vSphere plugin 2.25.

          Chris N. added a comment -

          To upgrade VMs, I have renamed all vSphere VM nodes into Jenkins (Name, Virtual Machine Name, and Snapshot Name), so I was absolutely sure that Jenkins (thru vSphere) won't revert nor power off the node I was working on).

          When completed; I set back all nodes with the previous settings. Then from the /configureClouds page, I re-check the connection to vSphere: Same error message:

          com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password.

          The jenkins credential did not change, the account used does to connect with vSphere does not seems to be locked (I has been locked during the same afternoon, 1h+ ago from this test).

          Tested with Jenkins 2.263.4 and vSpeher plugin 2.25.

          Chris N. added a comment - To upgrade VMs, I have renamed all vSphere VM nodes into Jenkins (Name, Virtual Machine Name, and Snapshot Name), so I was absolutely sure that Jenkins (thru vSphere) won't revert nor power off the node I was working on). When completed; I set back all nodes with the previous settings. Then from the /configureClouds page, I re-check the connection to vSphere: Same error message: com.vmware.vim25.InvalidLogin: Cannot complete login due to an incorrect user name or password. The jenkins credential did not change, the account used does to connect with vSphere does not seems to be locked (I has been locked during the same afternoon, 1h+ ago from this test). Tested with Jenkins 2.263.4 and vSpeher plugin 2.25.

          Kamil Hawdziejuk added a comment - - edited

          I faced the same issue and found out that even though previous credential is working in other areas and did not change, somehow stopped working (expired for the plugin?) and stopped connecting to vsphere server. To truly check it one can go to the dedicated page for configuration of the plugin:
          http://JENKINSADDRESS:port/configureClouds/
          and click the "TEST CONNECTION" button to find out that logging is failing.
          FYI: In our case, the solution was to add a new credential on that window that passed "TEST CONNECTION"!

          Notes:
          Jenkins version: 2.219
          vSphere plugin version: 2.21
          Java version: 11

          Kamil Hawdziejuk added a comment - - edited I faced the same issue and found out that even though previous credential is working in other areas and did not change, somehow stopped working (expired for the plugin?) and stopped connecting to vsphere server. To truly check it one can go to the dedicated page for configuration of the plugin: http://JENKINSADDRESS:port/configureClouds/ and click the "TEST CONNECTION" button to find out that logging is failing. FYI: In our case, the solution was to add a new credential on that window that passed "TEST CONNECTION"! Notes: Jenkins version: 2.219 vSphere plugin version: 2.21 Java version: 11

            Unassigned Unassigned
            romain romain suire
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: