[JIRA] [ec2-plugin] (JENKINS-34610) Windows AMI in endless loop

634 views
Skip to first unread message

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 3:45:03 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart created an issue
 
Jenkins / Bug JENKINS-34610
Windows AMI in endless loop
Issue Type: Bug Bug
Assignee: Francis Upton
Attachments: JenkinsEC2Setup1.png, JenkinsEC2Setup2.png
Components: ec2-plugin
Created: 2016/May/04 7:44 PM
Environment: Jenkins 2.1, Windows Server 2012 R2, EC2 version 1.31.
Priority: Critical Critical
Reporter: Brendan Stewart

Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in the :

Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....

I know WinRM is setup and working correctly, i've run the commands suggested from the plugin:

winrm quickconfig
winrm set winrm/config/service/Auth @

{Basic="true"}

winrm set winrm/config/service @

{AllowUnencrypted="true"}

winrm set winrm/config/winrs @

{MaxMemoryPerShellMB="1024"}

I'm using a service user like BLA.AWS\svcService, which is an admin on the box and can log into any slave AMI. Could this possibly be the reason for this issue?

Otherwise i'm at a loss. I've configured this thing like mad and i'm starting to rip out my hair.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 3:46:01 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Change By: Brendan Stewart

{code:java}
Hello All,



I've been trying to run this plugin with Windows 2012 and i'm stuck in the :
{code:java}

Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>


May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
{code}

I know WinRM is setup and working correctly, i've run the commands suggested from the plugin:

winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}

I'm using a service user like BLA.AWS\svcService, which is an admin on the box and can log into any slave AMI. Could this possibly be the reason for this issue?

Otherwise i'm at a loss. I've configured this thing like mad and i'm starting to rip out my hair.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 3:46:02 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue

{code:java}
Hello All,



I've been trying to run this plugin with Windows 2012 and i'm stuck in the :

{code:java}

Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
{code}

I know WinRM is setup and working correctly, i've run the commands suggested from the plugin:

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I'm using a service user like BLA.AWS\svcService, which is an admin on the box and can log into any slave AMI. Could this possibly be the reason for this issue?

Otherwise i'm at a loss. I've configured this thing like mad and i'm starting to rip out my hair.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 3:51:03 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in
 some WinRM loop where it cannot connect. I tried setting  the  delay up to 360 seconds to ensure my instance is up before trying any WinRM commands. No luck. Here is what i'm seeing  :


{code:java}
Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
{code}

I know WinRM is setup and working correctly, i  can connect over Telnet. And I 've run the commands suggested from the plugin:


{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I 'm using  do have  a  service user like BLA.AWS\svcService, which is an admin on  question in addition to  the  box  bug  and  can log into any slave AMI. Could this possibly be the reason for this issue  that is: *Do we just need to specify and administrative user, not precisely "Administrator" ? *

Otherwise i'm at a loss.  I've  configured  spent the entire day working on  this  thing like mad  and  i  I 'm  starting to rip  simply  out  my hair  of options .

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 3:51:05 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in some WinRM loop where it cannot connect. I tried setting the
 launch  delay up to  360  600  seconds to ensure my instance is up before trying any WinRM commands. No luck. Here is what i'm seeing:


{code:java}
Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
{code}

I know WinRM is setup and working correctly, i can connect over Telnet. And I've run the commands suggested from the plugin:

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I do have a question in addition to the bug and that is: *Do we just need to specify and administrative user, not precisely "Administrator" ?*

I've spent the entire day working on this and I'm simply out of options.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:19:02 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in some WinRM loop where it cannot connect. I tried setting the launch delay up to 600 seconds to ensure my instance is up before trying any WinRM commands. No luck. Here is what i'm seeing:


{code:java}
Request:
POST http://172.16.0.255:5985/wsman
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.16.0.252:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:24BD995E-DFCC-4B42-AF00-E5C85B66445B</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
Waiting for WinRM to come up. Sleeping 10s.
etc
etc
{code}

I know WinRM is setup and working correctly, i can connect over Telnet. And I've run the commands suggested from the plugin:

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I do have a question in addition to the bug and that is: *Do we just need to specify and administrative user, not precisely "Administrator" ?*

I've spent the entire day working on this and I'm simply out of options.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:42:01 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart commented on Bug JENKINS-34610
 
Re: Windows AMI in endless loop

Let me answer part of my own question, i tried the AMI with the administrator user. No difference. So this is surely a bug.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:45:02 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Change By: Brendan Stewart
Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in some WinRM loop where it cannot connect. I tried setting the launch delay up to 600 seconds to ensure my instance is up before trying any WinRM commands. No luck. Here is what i'm seeing:

{code:java}
May 04, 2016 4:42:34 PM FINE hudson.plugins.ec2.win.winrm.WinRMClient
opening winrm shell to: http://172.31.202.208:5985/wsman
May 04, 2016 4:42:34 PM FINEST hudson.plugins.ec2.win.winrm.WinRMClient
Request:
POST http://172.
16 31 . 0 202 . 255 208 :5985/wsman

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172. 16 31 . 0 202 . 252 208 :5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid: 24BD995E D6FA9229 - DFCC 05D6 - 4B42 4199 - AF00 B7B6 - E5C85B66445B ACFA6D195CBE </a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>
May 04, 2016 4:42:35 PM FINEST hudson.plugins.ec2.win.winrm.WinRMClient
Response:

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xml:lang="en-US"><s:Header><a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action><a:MessageID>uuid:792A9FDE-030D-4646-89A5-8432A425C947</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:D6FA9229-05D6-4199-B7B6-ACFA6D195CBE</a:RelatesTo></s:Header><s:Body><x:ResourceCreated><a:Address>http://172.31.202.208:5985/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:SelectorSet><w:Selector Name="ShellId">96758FBF-0CF8-4E59-9E41-FF96E16903AC</w:Selector></w:SelectorSet></a:ReferenceParameters></x:ResourceCreated><rsp:Shell><rsp:ShellId>96758FBF-0CF8-4E59-9E41-FF96E16903AC</rsp:ShellId><rsp:ResourceUri>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</rsp:ResourceUri><rsp:Owner>JENKINSSLAVE\Administrator</rsp:Owner><rsp:ClientIP>172.31.202.242</rsp:ClientIP><rsp:IdleTimeOut>PT7200.000S</rsp:IdleTimeOut><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams><rsp:ShellRunTime>P0DT0H0M0S</rsp:ShellRunTime><rsp:ShellInactivity>P0DT0H0M0S</rsp:ShellInactivity></rsp:Shell></s:Body></s:Envelope>
May  04, 2016  4 :42:35 PM FINER hudson.plugins.ec2.win.winrm.WinRMClient
shellid: 96758FBF-0CF8-4E59-9E41-FF96E16903AC
May 04
, 2016 4: 42:35 PM FINE hudson.plugins.ec2.win.winrm.WinRMClient
closing winrm shell 96758FBF-0CF8-4E59-9E41-FF96E16903AC

May 4, 2016 4:
20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest


winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
Waiting for WinRM to come up. Sleeping 10s.
etc
etc
{code}

I know WinRM is setup and working correctly, i can connect over Telnet. And I've run the commands suggested from the plugin:

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I do have a question in addition to the bug and that is: *Do we just need to specify and administrative user, not precisely "Administrator" ?*

I've spent the entire day working on this and I'm simply out of options.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:46:01 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Hello All,

I've been trying to run this plugin with Windows 2012 and i'm stuck in some WinRM loop where it cannot connect. I tried setting the launch delay up to 600 seconds to ensure my instance is up before trying any WinRM commands. No luck. Here is what i'm seeing:

{code:java}
May 04, 2016 4:42:34 PM FINE hudson.plugins.ec2.win.winrm.WinRMClient
opening winrm shell to: http://172.31.202.208:5985/wsman
May 04, 2016 4:42:34 PM FINEST hudson.plugins.ec2.win.winrm.WinRMClient
Request:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><env:Header><a:To>http://172.31.202.208:5985/wsman</a:To><a:ReplyTo><a:Address mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:MaxEnvelopeSize mustUnderstand="true">153600</w:MaxEnvelopeSize><a:MessageID>uuid:D6FA9229-05D6-4199-B7B6-ACFA6D195CBE</a:MessageID><w:Locale mustUnderstand="false" xml:lang="en-US"/><p:DataLocale mustUnderstand="false" xml:lang="en-US"/><w:OperationTimeout>PT60S</w:OperationTimeout><a:Action mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><w:ResourceURI mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:OptionSet><w:Option Name="WINRS_NOPROFILE">FALSE</w:Option><w:Option Name="WINRS_CODEPAGE">437</w:Option></w:OptionSet></env:Header><env:Body><rsp:Shell><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams></rsp:Shell></env:Body></env:Envelope>

May 04, 2016 4:42:35 PM FINEST hudson.plugins.ec2.win.winrm.WinRMClient
Response:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xml:lang="en-US"><s:Header><a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action><a:MessageID>uuid:792A9FDE-030D-4646-89A5-8432A425C947</a:MessageID><a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To><a:RelatesTo>uuid:D6FA9229-05D6-4199-B7B6-ACFA6D195CBE</a:RelatesTo></s:Header><s:Body><x:ResourceCreated><a:Address>http://172.31.202.208:5985/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI><w:SelectorSet><w:Selector Name="ShellId">96758FBF-0CF8-4E59-9E41-FF96E16903AC</w:Selector></w:SelectorSet></a:ReferenceParameters></x:ResourceCreated><rsp:Shell><rsp:ShellId>96758FBF-0CF8-4E59-9E41-FF96E16903AC</rsp:ShellId><rsp:ResourceUri>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</rsp:ResourceUri><rsp:Owner>JENKINSSLAVE\Administrator</rsp:Owner><rsp:ClientIP>172.31.202. 242 241 </rsp:ClientIP><rsp:IdleTimeOut>PT7200.000S</rsp:IdleTimeOut><rsp:InputStreams>stdin</rsp:InputStreams><rsp:OutputStreams>stdout stderr</rsp:OutputStreams><rsp:ShellRunTime>P0DT0H0M0S</rsp:ShellRunTime><rsp:ShellInactivity>P0DT0H0M0S</rsp:ShellInactivity></rsp:Shell></s:Body></s:Envelope>

May 04, 2016 4:42:35 PM FINER hudson.plugins.ec2.win.winrm.WinRMClient
shellid: 96758FBF-0CF8-4E59-9E41-FF96E16903AC
May 04, 2016 4:42:35 PM FINE hudson.plugins.ec2.win.winrm.WinRMClient

closing winrm shell 96758FBF-0CF8-4E59-9E41-FF96E16903AC

May 4, 2016 4:20:46 PM WARNING hudson.plugins.ec2.win.winrm.WinRMClient sendRequest

winrm returned 401 - shouldn't happen though - retrying in 2 minutes

Waiting for WinRM to come up. Sleeping 10s.
Connecting to ec2-windows-host.compute-1.amazonaws.com(<<host ip>>) with WinRM as svc....
Waiting for WinRM to come up. Sleeping 10s.
etc
etc
{code}

I know WinRM is setup and working correctly, i can connect over Telnet. And I've run the commands suggested from the plugin:

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
{code}

I do have a question in addition to the bug and that is: *Do we just need to specify and administrative user, not precisely "Administrator" ?*

I've spent the entire day working on this and I'm simply out of options.

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:54:01 PM5/4/16
to jenkinsc...@googlegroups.com
Brendan Stewart updated an issue
Change By: Brendan Stewart
Attachment: EC2-gpedit2.png
Attachment: EC2-gpedit1.png

bstewart@novetta.com (JIRA)

unread,
May 4, 2016, 4:57:02 PM5/4/16
to jenkinsc...@googlegroups.com
 
Re: Windows AMI in endless loop

Update! Use the two EC2-gpedit.png files for reference. Group Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Windows Remote Management -> Client & Server. (See screenshot for each.)

I did this, restarted and it worked. Why these work vs. the command line settings, i have no idea. But that's it. If you have questions post here, i can respond.

bstewart@novetta.com (JIRA)

unread,
May 5, 2016, 10:38:01 AM5/5/16
to jenkinsc...@googlegroups.com

Never mind. It's somehow come back. There is something at play here that i can't locate.

bstewart@novetta.com (JIRA)

unread,
May 5, 2016, 1:37:01 PM5/5/16
to jenkinsc...@googlegroups.com

Ok long story short, for those following along, yes, those GP settings i set earlier along with using Administrator (Has to be the Administrator user, nothing else works even if they have administrative rights, this works

bstewart@novetta.com (JIRA)

unread,
May 5, 2016, 1:52:02 PM5/5/16
to jenkinsc...@googlegroups.com
Brendan Stewart edited a comment on Bug JENKINS-34610
*Ok long story short, for those following along, yes,  i got this to work.*

1. You have to follow
 those  GP  GPedit.msc  settings  i set earlier along with using Administrator (Has  mentioned above and in the first two sceenshots.

2. You have
 to  be  use  the  Administrator  user , nothing else works even if they have  'Administrator' by name. You can't use an  administrative  rights, this works*  user of a different name. 

Got it working. Yay.

bstewart@novetta.com (JIRA)

unread,
May 12, 2016, 1:39:01 PM5/12/16
to jenkinsc...@googlegroups.com

One last thing to note, when i got it working with a domain user, i did that by specifying a user in the format:

svc...@BLA.AWS

instead of BLAAWS\svcUser. There was some issue with the backslashes, i tired double backslash as well.

peter.backx@gmail.com (JIRA)

unread,
Dec 9, 2016, 9:19:01 AM12/9/16
to jenkinsc...@googlegroups.com

Thank you Brendan for this information.

I also found another cause of connection issues: the Windows 10 server AMIs on Amazon will block incoming WinRM traffic from the public network by default (I think this is the default setting in Windows). This needs to be changed in the firewall rules.

(BTW I would suggest to only allow traffic from the Jenkins master IP, either through the Windows firewall or the Amazon security group or both)

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bstewart@novetta.com (JIRA)

unread,
Dec 9, 2016, 9:22:01 AM12/9/16
to jenkinsc...@googlegroups.com

Ultimately, opposite of my previous comment, we ended up giving up on this plugin for various reasons.

But, we did enable all WinRm ports, including secure as well. That wasn't the cause of this issue. Thank you for getting back though.

We hope to try and use it again in the future. But for our configuration it just wasn't up to the task. Perhaps it is today though, through bug fixing.

james.mk.green@gmail.com (JIRA)

unread,
Jun 12, 2018, 10:54:03 AM6/12/18
to jenkinsc...@googlegroups.com

Some observations having spent the past few days swearing lots to get this reliably working:

  1. It may be necessary to create a WinRMRemoteWMIUsers__ group - this persists across instance launches
  2. Any winrm configuration commands given when creating your AMI may be missing on new instance launch. I've added into the "User Data" section the following text which seems to contribute to overcoming the reported problems in connecting:
    <script>
    winrm quickconfig -q

  1. winrm set winrm/config/service/Auth @{Basic="true"}
    winrm set winrm/config/service @{AllowUnencrypted="true"}
  1. </script>
    However I have noticed that even these instructions can be ignored on next instance boot and I am not convinced they are needed - they got thrown into the configuration along with these other points and left there
  2. winrm (which is used under the hood) is extremely slow. I mean so slow you think it has broken. I've observed `httpRequest` calls taking multiple minutes - when executing the same thing on the slave instance through Chrome has worked instantly. Subsequent builds on the same instance appear much faster to operate.
  3. The Jenkins master can in a muddle when instances are rebooted (for instance to create a new AMI image) which results in high load on the master and in one case two consecutive builds failed when trying to issue a command-line instruction during the build sequence. Rebooting the master resulted in no errors the next attempt.

In short, this appears to be an unreliable means to operate a Windows server, and perhaps not the fault of this plugin author or even the winrm plugin's author. It may be wise to consider launching a Windows slave agent with a Jenkins service instead, not something we want to do but there may no other tenable way forward.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

ataylor@cloudbees.com (JIRA)

unread,
May 13, 2019, 9:15:04 AM5/13/19
to jenkinsc...@googlegroups.com
Alex Taylor updated an issue
 
Change By: Alex Taylor
Attachment: Screenshot 2019-05-09 11.58.27.png
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ataylor@cloudbees.com (JIRA)

unread,
May 13, 2019, 9:16:09 AM5/13/19
to jenkinsc...@googlegroups.com
Alex Taylor commented on Bug JENKINS-34610
 
Re: Windows AMI in endless loop

We were able to get the windows agent to run by setting the "Allow remote server management through WinRM" IP settings to "*". Screenshot attached.

We also had to run the below commands.

winrm quickconfig
winrm set winrm/config/service/Auth @

{Basic="true"}


winrm set winrm/config/service @

{AllowUnencrypted="true"}


winrm set winrm/config/winrs @

{MaxMemoryPerShellMB="10240"}

Should this exist on the wiki page Francis Upton? I was thinking there is not much "official troubleshooting" for windows EC2 connections and it seems lots of people are having troubles.

ataylor@cloudbees.com (JIRA)

unread,
May 13, 2019, 9:16:11 AM5/13/19
to jenkinsc...@googlegroups.com
Alex Taylor edited a comment on Bug JENKINS-34610
We were able to get the windows agent to run by setting the "Allow remote server management through WinRM" IP settings to "*". Screenshot attached.

We also had to run the below commands. !Screenshot 2019-05-09 11.58.27.png|thumbnail!

{code:java}
winrm quickconfig
winrm set winrm/config/service/Auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="10240"}
{code}

Should this exist on the wiki page [~francisu]? I was thinking there is not much "official troubleshooting" for windows EC2 connections and it seems lots of people are having troubles.

!Screenshot 2019-05-09 11.58.27.png|thumbnail!

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 7:39:03 PM11/25/19
to jenkinsc...@googlegroups.com

I am facing the same issue I have tried what Alex Taylor has suggested but the master is still logging the same error:

`EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator


Waiting for WinRM to come up. Sleeping 10s.

Waiting for WinRM to come up. Sleeping 10s.`

However, I can telnet the slave on the 5985 port and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 7:52:04 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what Alex Taylor has suggested but the master is still logging the same error:

`EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.`

However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?


Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:09:03 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what Alex Taylor has and [Brendan Stewart |https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=mumbles76]have suggested but the master is still logging the same error:


`EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.`

However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 9:10:03 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what  [ Alex Taylor |https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=ataylor and [Brendan Stewart   |https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=mumbles76]have suggested but the master is still logging the same error:


`EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.`

However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 10:40:04 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what [Alex Taylor|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=ataylor] and [Brendan Stewart|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=mumbles76] have suggested but the master is still logging the same error:

` {code:java}
EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.
`
{code}


However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 25, 2019, 10:40:04 PM11/25/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what [Alex Taylor|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=ataylor] and [Brendan Stewart|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=mumbles76] have suggested (all the settings for WinRM and everything else) but the master is still logging the same error:


{code:java}
EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.
{code}


However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 26, 2019, 4:26:04 AM11/26/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I am facing the same issue I have tried what [Alex Taylor|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=ataylor] and [Brendan Stewart|https://issues.jenkins-ci.org/secure/ViewProfile.jspa?name=mumbles76] have suggested (all the settings for WinRM and everything else) but the master is still logging the same error:

{code:java}
EC2 (AWS ID account_id) - windows slave (sir-31i1js7h) booted at 1574726631000
Connecting to (17.30.6.34) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Waiting for WinRM to come up. Sleeping 10s.
{code}


However, I can telnet the slave on the 5985 port from master jenkins server and it connects. Does it mean it can't pass authentication or there's something else going won when the plugin is trying to connect via WinRM?

The plugin doc is saying "By default, the plugin connects to the slave agent using an in-process Java SSH client.". What is the port is using the connect to this in-process ssh client?

Any other ideas what should I try here? I've lost already two days to get this to work.

Thank you

ovidiuc@gmail.com (JIRA)

unread,
Nov 26, 2019, 6:47:02 AM11/26/19
to jenkinsc...@googlegroups.com

I have managed to fix it, the culprit: port 445 need to be opened on the slave machines. More details here: https://stackoverflow.com/questions/38011683/how-to-run-windows-instance-on-ec2-from-jenkins

ovidiuc@gmail.com (JIRA)

unread,
Nov 26, 2019, 6:48:02 AM11/26/19
to jenkinsc...@googlegroups.com
ovi craciun edited a comment on Bug JENKINS-34610
I have managed to fix it, the culprit: port 445 need needs to be opened on the slave machines. More details here: https://stackoverflow.com/questions/38011683/how-to-run-windows-instance-on-ec2-from-jenkins

pkrunalb888@gmail.com (JIRA)

unread,
Dec 29, 2019, 2:08:03 AM12/29/19
to jenkinsc...@googlegroups.com

I was facing same problem, I solved it by mentioning Remote user as "administrator" and then specifying admin password. Also make sure that SMB port 445 and Winrm port 5985(for http) or else winrm port 5986( in case you are using https) must allow incoming connections to it.

Reply all
Reply to author
Forward
0 new messages