I've been working on setting up an Amazon Windows AMI and was getting similar issues to here and here.

      The ec2plugin gets into an infinite loop because it unregisters the httpclient for SPNEGO and thus Microsoft Negotiate. Then the httpclient was throwing an exception because negotiate was not supported. This exception was caught silently, making it look like the plugin was still pinging when it actually wasn't.

      Commenting out "httpclient.getAuthSchemes().unregister(AuthPolicy.SPNEGO);" allowed me to connect to WinRM on the AMI just fine. However, I have no idea what unregistering for SPNEGO was needed for in the first place and what side effects that would cause. It looks like it's been there since it was originally written, and I can't find any information on it otherwise. Hopefully someone who knows better can comment.

          [JENKINS-27260] SPNEGO for Windows in the EC2 Plugin

          Code changed in jenkins
          User: Jason Mittertreiner
          Path:
          src/main/java/hudson/plugins/ec2/win/EC2WindowsLauncher.java
          src/main/java/hudson/plugins/ec2/win/winrm/WinRMClient.java
          http://jenkins-ci.org/commit/ec2-plugin/0e840f7129b91af5101cb8f08f938743dc188ff9
          Log:
          JENKINS-27260 SPNEGO for Windows in EC2 Plugin

          Fixed the Windows temp directory getting set to ""
          Enabled SPNEGO authentication

          JENKINS-25385 and JENKINS-4995 both have comments complaining about
          infinite loops when creating Windows slaves. Because SPNEGO is
          unregistered for, the httpclient throws and exception that is silently
          caught and causes the infinite loop.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jason Mittertreiner Path: src/main/java/hudson/plugins/ec2/win/EC2WindowsLauncher.java src/main/java/hudson/plugins/ec2/win/winrm/WinRMClient.java http://jenkins-ci.org/commit/ec2-plugin/0e840f7129b91af5101cb8f08f938743dc188ff9 Log: JENKINS-27260 SPNEGO for Windows in EC2 Plugin Fixed the Windows temp directory getting set to "" Enabled SPNEGO authentication JENKINS-25385 and JENKINS-4995 both have comments complaining about infinite loops when creating Windows slaves. Because SPNEGO is unregistered for, the httpclient throws and exception that is silently caught and causes the infinite loop.

          Code changed in jenkins
          User: Francis Upton
          Path:
          src/main/java/hudson/plugins/ec2/win/EC2WindowsLauncher.java
          src/main/java/hudson/plugins/ec2/win/winrm/WinRMClient.java
          http://jenkins-ci.org/commit/ec2-plugin/1ba2206f4345d08de2c8dc4261b52bef206f0010
          Log:
          Merge pull request #138 from jmittert/JENKINS-27260

          JENKINS-27260 SPNEGO for Windows in EC2 Plugin

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/8a4454a1d30a...1ba2206f4345

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton Path: src/main/java/hudson/plugins/ec2/win/EC2WindowsLauncher.java src/main/java/hudson/plugins/ec2/win/winrm/WinRMClient.java http://jenkins-ci.org/commit/ec2-plugin/1ba2206f4345d08de2c8dc4261b52bef206f0010 Log: Merge pull request #138 from jmittert/ JENKINS-27260 JENKINS-27260 SPNEGO for Windows in EC2 Plugin Compare: https://github.com/jenkinsci/ec2-plugin/compare/8a4454a1d30a...1ba2206f4345

            jmittertreiner Jason Mittertreiner
            jmittertreiner Jason Mittertreiner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: