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

Login failed because the session could not be re-registered.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • vsphere-cloud-plugin
    • None
    • Jenkins version - 2.289.3 (Windows server 2019, oracle jdk version "1.8.0_212")
      vsphere-cloud-plugin plugin version - 2.25

      The plugin depends on network library yavijava
      https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96 

      The yavijava supports two types of http clients:
      CloseableHttpClient
      HttpURLConnection - is default
      The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
      https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html The major problem is that the CookieManager overlaps logic provided by [WSClient] to setup http header Cookie. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <soapenv:Body>
              <soapenv:Fault>
                  <faultcode>ServerFaultCode</faultcode>
                  <faultstring>Cannot complete login due to an incorrect user name or password.</faultstring>
                  <detail>
                      <InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin">
                          <faultMessage>
                              <key>vim.fault.InvalidLoginWithReason</key>
                              <arg>
                                  <key>1</key>
                                  <value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value>
                              </arg>
                              <message>Login failed because the session could not be re-registered.</message>
                          </faultMessage>
                      </InvalidLoginFault>
                  </detail>
              </soapenv:Fault>
          </soapenv:Body>
      </soapenv:Envelope>

      The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
      https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159 

      As workaroud we can switch to CloseableHttpClient http client.

      I have prepared draft pull request:

      https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133

      Please also pay attention to the issue in repository yavijava:

      https://github.com/yavijava/yavijava/issues/290

          [JENKINS-69999] Login failed because the session could not be re-registered.

          Nick Korsakov created issue -
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided in HttpURLConnection to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>{code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          https://github.com/yavijava/yavijava/issues/290
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided in HttpURLConnection to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided in HttpURLConnection to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided in HttpURLConnection to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided in HttpURLConnection to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Assignee New: pjdarton [ pjdarton ]
          Nick Korsakov made changes -
          Assignee Original: pjdarton [ pjdarton ]
          Nick Korsakov made changes -
          Environment Original: Jenkins version - 2.289.3 (Windows server 2019, oracle jdk version "1.8.0_212")
          Plugin version - 2.25
          New: Jenkins version - 2.289.3 (Windows server 2019, oracle jdk version "1.8.0_212")
          vsphere-cloud-plugin plugin version - 2.25
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - is default
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin do not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient network client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient http client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          Nick Korsakov made changes -
          Description Original: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:

           
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>Cannot complete login due to an incorrect user name or password.</faultstring><detail><InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin"><faultMessage><key>vim.fault.InvalidLoginWithReason</key><arg><key>1</key><value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value></arg><message>Login failed because the session could not be re-registered.</message></faultMessage></InvalidLoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> {code}
           

          The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient http client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]
          New: The plugin depends on network library yavijava
          [https://github.com/jenkinsci/vsphere-cloud-plugin/blob/master/pom.xml#L95-L96] The yavijava supports two types of http clients:
          CloseableHttpClient
          HttpURLConnection - [is default|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/ClientCreator.java#L26]
          The HttpURLConnection client's behaviour can be impacted by system-wide cookie handler CookieManager:
          [https://docs.oracle.com/javase/8/docs/api/java/net/CookieManager.html] The major problem is that the CookieManager overlaps logic provided by [WSClient|https://github.com/yavijava/yavijava/blob/gradle/src/main/java/com/vmware/vim25/ws/WSClient.java#L133] to fill http header {{{}Cookie{}}}. Global CookieManager know nothing about logic of vsphere-cloud-plugin and fill all http headers with stored cookies, as result vsphere center rejects login requests with error:
          {code:java}
          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <soapenv:Body>        <soapenv:Fault>            <faultcode>ServerFaultCode</faultcode>            <faultstring>Cannot complete login due to an incorrect user name or password.</faultstring>            <detail>                <InvalidLoginFault xmlns="urn:vim25" xsi:type="InvalidLogin">                    <faultMessage>                        <key>vim.fault.InvalidLoginWithReason</key>                        <arg>                            <key>1</key>                            <value xsi:type="xsd:string">vim.fault.InvalidLoginReasonRegisterFailed</value>                        </arg>                        <message>Login failed because the session could not be re-registered.</message>                    </faultMessage>                </InvalidLoginFault>            </detail>        </soapenv:Fault>    </soapenv:Body></soapenv:Envelope> {code}
          The vsphere-cloud-plugin does not use CookieManager, but there is no guarantee that other plugins avoid it. Example:
          [https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L158-L159

          As workaroud we can switch to CloseableHttpClient http client.

          I have prepared draft pull request:

          [https://github.com/jenkinsci/vsphere-cloud-plugin/pull/133]

          *Please also pay attention on the issue in repository yavijava:*

          [https://github.com/yavijava/yavijava/issues/290]

            Unassigned Unassigned
            lifemanship Nick Korsakov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: