rundeck-plugins / rundeck-winrm-plugin

UNMAINTAINED - Rundeck WinRM Node Executor plugin
Other
56 stars 28 forks source link

Update for Rundeck 1.6.0 #3

Closed kyruie closed 11 years ago

kyruie commented 11 years ago

There's a plugin compatibility problem between rundeck-winrm-plugin-1.1 (winrm plugin for rundeck 1.5) & rundeck 1.6.0.

Here's the error log.

18:57:16 RUNDECK [workflow] Begin execution: rundeck-workflow-node-first context: null 18:57:16 preparing for sequential execution on 1 nodes 18:57:16 Executing command on node: node01, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=rundeck@test.local, osVersion=6.1, osArch=amd64, description=windows node 01, hostname=node01.test.local, nodename=node01, osName=Windows Server 2008 R2}, project='null'} 18:57:16 NodeSet: MultiNodeSelector{nodenames=[node01]} 18:57:16 Workflow: com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy$stepFirstWrapper@4f17b6fd 18:57:16 data context: {node={tags=, username=rundeck@test.local, os-version=6.1, description=windows node 01, name=node01, os-arch=amd64, hostname=node01.test.local, os-name=Windows Server 2008 R2, os-family=windows}, job={id=f3807592-0182-455f-9629-8e04918cfb3e, project=test, loglevel=DEBUG, username=admin, user.name=admin, name=test, serverUUID=null, group=null, url=http://RUNDECK:4440/execution/follow/8, serverUrl=http://RUNDECK:4440/, execid=8}, option={}} 18:57:16 Step 1 [workflow] Begin step: 1,NodeDispatch 18:57:16 1: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@a52a72a 18:57:16 preparing for sequential execution on 1 nodes 18:57:16 Executing command on node: node01, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=rundeck@test.local, osVersion=6.1, osArch=amd64, description=windows node 01, hostname=node01.test.local, nodename=node01, osName=Windows Server 2008 R2}, project='null'} 18:57:16 node01 Step 1 [workflow] beginExecuteNodeStep(node01): NodeDispatch: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@a52a72a 18:57:16 SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6] 18:57:16 SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. 18:57:16 RUNDECK Step 1 [workflow] finishExecuteNodeStep(node01): NodeDispatch: null 18:57:16 [workflow] Finish execution: rundeck-workflow-node-first: null 18:57:16 java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of com/dtolabs/rundeck/core/plugins/LocalFirstClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature 18:57:16 at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:284) 18:57:16 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252) 18:57:16 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265) 18:57:16 at com.xebialabs.overthere.spi.BaseOverthereConnection.(BaseOverthereConnection.java:395) 18:57:16 at com.xebialabs.overthere.cifs.CifsConnectionBuilder.(CifsConnectionBuilder.java:224) 18:57:16 at com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor.executeCommand(OTWinRMNodeExecutor.java:145) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:296) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:270) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ExecNodeStepExecutor.executeNodeStep(ExecNodeStepExecutor.java:53) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:150) 18:57:16 at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:127) 18:57:16 at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:63) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:172) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor.executeWorkflowStep(NodeDispatchStepExecutor.java:66) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:117) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWFItem(BaseWorkflowStrategy.java:162) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:221) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:189) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy.executeWorkflowImpl(StepFirstWorkflowStrategy.java:71) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:120) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy$DispatchedWorkflow.dispatch(NodeFirstWorkflowStrategy.java:353) 18:57:16 at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:129) 18:57:16 at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:69) 18:57:16 at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:191) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWFSectionNodeDispatch(NodeFirstWorkflowStrategy.java:170) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWorkflowImpl(NodeFirstWorkflowStrategy.java:106) 18:57:16 at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:120) 18:57:16 at com.dtolabs.rundeck.core.execution.WorkflowExecutionServiceThread.run(WorkflowExecutionServiceThread.java:55) 18:57:16 loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of com/dtolabs/rundeck/core/plugins/LocalFirstClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature .
.
.
P.S. No errors anymore after deleting slf4j-api-1.6.3, jcl-over-slf4j-1.6.3 & dom4j-1.6.1.

kcd83 commented 11 years ago

I'm trying to resolve the same issue. I deleted the three conflicting files too but now get this error:

loader constraint violation: when resolving interface method "org.dom4j.XPath.setNamespaceContext(Lorg/jaxen/NamespaceContext;)V" the class loader (instance of com/dtolabs/rundeck/core/plugins/LocalFirstClassLoader) of the current class, com/xebialabs/overthere/cifs/winrm/ResponseExtractor, and the class loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) for resolved class, org/dom4j/XPath, have different Class objects for the type ext used in the signature

Any tips?

gschueler commented 11 years ago

hi kcd83, there is a change in rundeck 1.6 in the way it loads jars dependencies embedded in plugins.

I think it might be the same as this: https://github.com/gschueler/rundeck-ec2-nodes-plugin/issues/9

kcd83 commented 11 years ago

Many thanks for responding to this, I finally found time to make the following change and rebuild it.

https://github.com/dtolabs/rundeck-winrm-plugin/blob/issue/2-rundeck15/build.gradle line 63: appended 'Rundeck-Plugin-Libs-Load-First':'true'

This had no effect on rundeck 1.6.1 I get the same issue. I don't know much/anything about gradle but I think I've done all that is required. Is there anything I can do to check the attribute was correctly picked up before concluding it didn't work?

Unfortunately this is a road block for us upgrading. Is the issue that the new rundeck 1.6 bundles this library as does the plugin which is causing the version conflict. i.e. It has nothing to do with the underlying java environment I am running.

gschueler commented 11 years ago

I'm working on updating the plugin right now

kcd83 commented 11 years ago

Excellent! Thanks again

treeves commented 11 years ago

I'm running into the same ec2-user log4j issue on Rundeck 1.6.1, and like kcd83 I don't know too much on Gradle - so don't know how to build it properly independent of your releases. So - like @kcd83, am eagerly awaiting your release!

gschueler commented 11 years ago

it's not complete, but if you want to try the branch on pull request #4

prelegalwonder commented 11 years ago

I built the plugin from the issue/rundeck16 git branch and have my job in debug mode but don't get much other then failure. Is there a way to get more trace level of whats being returned from the WinRM serivce?

18:14:33 builder.zz.com [workflow] Begin execution: rundeck-workflow-node-first context: null 18:14:33 preparing for sequential execution on 1 nodes 18:14:33 Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'} 18:14:33 NodeSet: MultiNodeSelector{nodenames=[SERVER02.mydomain.com]} 18:14:33 Workflow: com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy$stepFirstWrapper@1cae5aa4 18:14:33 data context: {node={tags=, username=mydomain\jlopez, os-version=6.1.7601, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, name=SERVER02.mydomain.com, os-arch=x86_64, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, osServicePack=Service Pack 1, os-name=, os-family=windows}, job={id=0a9e047d-791e-4b28-b01d-003224f6d92b, project=mydomain, loglevel=DEBUG, username=admin, user.name=admin, name=get hostname, serverUUID=null, group=null, url=http://old-style.wks.mydomain.com:4440/execution/follow/71, serverUrl=http://old-style.wks.mydomain.com:4440/, execid=71}, secureOption={winrmPassword=B@f|0tzr}, option={winrmPassword=B@f|0tzr}} 18:14:33 Step 1 [workflow] Begin step: 1,NodeDispatch 18:14:33 1: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@13fce3 18:14:33 preparing for sequential execution on 1 nodes 18:14:33 Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'} 18:14:33 SERVER02.mydomain.com Step 1 [workflow] beginExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@13fce3 18:14:33 builder.mydomain.com Step 1 [workflow] finishExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: null 18:14:33 [workflow] Finish execution: rundeck-workflow-node-first: [Workflow , Node failures: {SERVER02.mydomain.com=[]}] 18:14:33 [Workflow , Node failures: {SERVER02.mydomain.com=[]}] 18:14:33 Execution failed: 71: [Workflow , Node failures: {SERVER02.mydomain.com=[]}]

gschueler commented 11 years ago

Are you running 1.6.2? It should produce more error info

Greg

On Sep 20, 2013, at 4:38 PM, Andrew Replogle notifications@github.com wrote:

I built the plugin from the issue/rundeck16 git branch and have my job in debug mode but don't get much other then failure. Is there a way to get more trace level of whats being returned from the WinRM serivce?

18:14:33 builder.zz.com [workflow] Begin execution: rundeck-workflow-node-first context: null 18:14:33 preparing for sequential execution on 1 nodes 18:14:33 Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'} 18:14:33 NodeSet: MultiNodeSelector{nodenames=[SERVER02.mydomain.com]} 18:14:33 Workflow: com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy$stepFirstWrapper@1cae5aa4 18:14:33 data context: {node={tags=, username=mydomain\jlopez, os-version=6.1.7601, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, name=SERVER02.mydomain.com, os-arch=x86_64, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, osServicePack=Service Pack 1, os-name=, os-family=windows}, job={id=0a9e047d-791e-4b28-b01d-003224f6d92b, project=mydomain, loglevel=DEBUG, username=admin, user.name=admin, name=get hostname, serverUUID=null, group=null, url=http://old-style.wks.mydomain.com:4440/execution/follow/71, serverUrl=http://old-style.wks.mydomain.com:4440/, execid=71}, secureOption={winrmPassword=B@ f|0tzr}, option={winrmPassword=B@f|0tzr}} 18:14:33 Step 1 [workflow] Begin step: 1,NodeDispatch 18:14:33 1: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@13fce3 18:14:33 preparing for sequential execution on 1 nodes 18:14:33 Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'} 18:14:33 SERVER02.mydomain.com Step 1 [workflow] beginExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@13fce3 18:14:33 builder.mydomain.com Step 1 [workflow] finishExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: null 18:14:33 [workflow] Finish execution: rundeck-workflow-node-first: [Workflow , Node failures: {SERVER02.mydomain.com=[]}] 18:14:33 [Workflow , Node failures: {SERVER02.mydomain.com=[]}] 18:14:33 Execution failed: 71: [Workflow , Node failures: {SERVER02.mydomain.com=[]}]

— Reply to this email directly or view it on GitHub.

prelegalwonder commented 11 years ago

Updating to 1.6.2 worked, thank you very much :)

prelegalwonder commented 11 years ago

So the exception we're receiving is: Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set

We've got both winrmPassword and winrm-password-option set as Secure options in the job with default values set. Any suggestions on how we might trace the values getting passed in? (or am I misunderstanding the documentation on the keynames to be set?).

gschueler commented 11 years ago

If you set winrm-password-option it should be something like "option.name". If unset it defaults to "option.winrmPassword". You should then have a secure option named "winrmPassword" or whatever name you set.

Greg

On Sep 21, 2013, at 12:46 PM, Andrew Replogle notifications@github.com wrote:

So the exception we're receiving is: Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set

We've got both winrmPassword and winrm-password-option set as Secure options in the job with default values set. Any suggestions on how we might trace the values getting passed in? (or am I misunderstanding the documentation on the keynames to be set?).

— Reply to this email directly or view it on GitHub.

gschueler commented 11 years ago

@prelegalwonder let me know if it's still not working. I've successfully executed against local or kerberos authentication using this branch

prelegalwonder commented 11 years ago

Thanks, I think I understand your wording above. To clarify, if we stick it in the project or job properties, then we do like option.winrmPassword= but if we're setting it in the job itself, just create an option called "winrmPassword" with the password.

We're attempting the later but the exception is still saying "Password was not set".

I'll take a look at trying it in the properties. Are my assumptions above correct?

gschueler commented 11 years ago

Sorry, let me clarify: You need to create a secure authentication option in a job, to prompt the user to enter the password. The name of this option by default just needs to be "winrmPassword". You can change this name if you want, by setting an attribute on the Node named "winrm-password-option" and a value like "option.myPasswordOption". In that case the secure authentication option for your job would be called "myPasswordOption".

The simplest thing is to use the default.

example job.xml context section:

  <context>
      <project>test</project>
      <options>
        <option required='true' name='winrmPassword' secure='true'>
          <description>password</description>
        </option>
      </options>
    </context>

If you want to change the option name, you would do it like this resources.xml:

<node name="mynode" ... winrm-password-option="option.myPassword"/>
prelegalwonder commented 11 years ago

Greg,

Thanks for that clarification. I guess we're running into some issues still. If you happen to see anything amiss here, as always, any direction or ideas are appreciated :)

--our job--
<joblist>
  <job>
    <id>0a9e047d-791e-4b28-b01d-003224f6d92b</id>
    <loglevel>DEBUG</loglevel>
    <sequence keepgoing='false' strategy='node-first'>
      <command>
        <exec>hostname</exec>
      </command>
    </sequence>
    <description></description>
    <name>get hostname</name>
    <context>
      <project>CNXUAT</project>
      <options>
        <option required='true' name='winrmPassword' valueExposed='true' secure='true'>
          <description>winrm password</description>
        </option>
      </options>
    </context>
    <dispatch>
      <threadcount>1</threadcount>
      <keepgoing>false</keepgoing>
      <excludePrecedence>true</excludePrecedence>
      <rankOrder>ascending</rankOrder>
    </dispatch>
    <uuid>0a9e047d-791e-4b28-b01d-003224f6d92b</uuid>
    <nodefilters>
      <include>
        <name>SERVER02*.*</name>
      </include>
    </nodefilters>
  </job>
</joblist>
---------------

---execution error---
    10:54:26    rundeck.mydomain.com      [workflow] Begin execution: rundeck-workflow-node-first context: null
    10:54:26            preparing for sequential execution on 1 nodes
    10:54:26            Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'}
    10:54:26            NodeSet: MultiNodeSelector{nodenames=[SERVER02.mydomain.com]}
    10:54:26            Workflow: com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy$stepFirstWrapper@e3b4574a
    10:54:26            data context:  {node={tags=, username=mydomain\jlopez, os-version=6.1.7601, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, name=SERVER02.mydomain.com, os-arch=x86_64, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, osServicePack=Service Pack 1, os-name=, os-family=windows}, job={id=0a9e047d-791e-4b28-b01d-003224f6d92b, project=mydomain, loglevel=DEBUG, username=admin, user.name=admin, name=get hostname, serverUUID=null, group=null, url=http://old-style.wks.mydomain.com:4440/execution/follow/140, serverUrl=http://old-style.wks.mydomain.com:4440/, execid=140}, secureOption={winrmPassword=****}, option={winrmPassword=****}}
    10:54:26        Step 1  [workflow] Begin step: 1,NodeDispatch
    10:54:26            1: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@41b1fd
    10:54:26            preparing for sequential execution on 1 nodes
    10:54:26            Executing command on node: SERVER02.mydomain.com, NodeEntryImpl{tags=[], attributes={tags=, osFamily=windows, username=mydomain\jlopez, osVersion=6.1.7601, osArch=x86_64, description=[, servicePrincipalName=SMTPSVC/SERVER02.mydomain.com, SMTPSVC/SERVER02, WSMAN/SERVER02, WSMAN/SERVER02.mydomain.com, TERMSRV/SERVER02.mydomain.com, TERMSRV/SERVER02, RestrictedKrbHost/SERVER02, HOST/SERVER02, RestrictedKrbHost/SERVER02.mydomain.com, HOST/SERVER02.mydomain.com, node-executor=overthere-winrm, hostname=SERVER02.mydomain.com, nodename=SERVER02.mydomain.com, osServicePack=Service Pack 1}, project='null'}
    10:54:26    SERVER02.mydomain.com  Step 1  [workflow] beginExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: com.dtolabs.rundeck.execution.ExecutionItemFactory$4@41b1fd
    10:54:26    rundeck.mydomain.com  Step 1  [workflow] finishExecuteNodeStep(SERVER02.mydomain.com): NodeDispatch: null
    10:54:26            com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set
    10:54:26                at com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConnectionOptionsrundeck.build(OTWinRMNodeExecutor.java:390)
    10:54:26                at com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor.executeCommand(OTWinRMNodeExecutor.java:145)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:324)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:298)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ExecNodeStepExecutor.executeNodeStep(ExecNodeStepExecutor.java:53)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:146)
    10:54:26                at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:120)
    10:54:26                at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:58)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:168)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor.executeWorkflowStep(NodeDispatchStepExecutor.java:66)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:113)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWFItem(BaseWorkflowStrategy.java:162)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:221)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:189)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy.executeWorkflowImpl(StepFirstWorkflowStrategy.java:79)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:120)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy$DispatchedWorkflow.dispatch(NodeFirstWorkflowStrategy.java:369)
    10:54:26                at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:122)
    10:54:26                at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:64)
    10:54:26                at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:187)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWFSectionNodeDispatch(NodeFirstWorkflowStrategy.java:176)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWorkflowImpl(NodeFirstWorkflowStrategy.java:106)
    10:54:26                at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:120)
    10:54:26                at com.dtolabs.rundeck.core.execution.WorkflowExecutionServiceThread.run(WorkflowExecutionServiceThread.java:55)
    10:54:26            Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set
    10:54:26            [workflow] Finish execution:  rundeck-workflow-node-first: [Workflow step failures: {0=Dispatch failed on 1 nodes: [SERVER02.mydomain.com: WorkflowSequenceFailures: Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set]}, Node failures: {SERVER02.mydomain.com=[]}]
    10:54:26            [Workflow step failures: {0=Dispatch failed on 1 nodes: [SERVER02.mydomain.com: WorkflowSequenceFailures: Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set]}, Node failures: {SERVER02.mydomain.com=[]}]
    10:54:26            Execution failed: 140: [Workflow step failures: {0=Dispatch failed on 1 nodes: [SERVER02.mydomain.com: WorkflowSequenceFailures: Exception: class com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConfigurationException: Password was not set]}, Node failures: {SERVER02.mydomain.com=[]}]
---------
gschueler commented 11 years ago

Hi, change valueExposed='true' to valueExposed='false', (or remove valueExposed).

That flag is used to define a "Secure Authentication" (valueExposed=false) vs "Secure" (valueExposed=true) option.

When valueExposed=true, the secure value is available in scripts, environment variables, etc. It is simply displayed in the GUI as a password field.

When valueExposed=false, the secure value cannot be used by scripts, and is only available to plugins such as Winrm plugin for authentication purposes.

prelegalwonder commented 11 years ago

Thanks Greg! That did it :)

FYI, I originally created the job through the UI and by default it adds valueExposed='true' to the definition when you create a secure option.

To get around this, I did the following:

Thanks very much for your help :)

gschueler commented 11 years ago

Ok, there should be a radio button for "Secure Authentication" option, instead of just "Secure" option, perhaps it was not very clear in the gui

stagrlee commented 11 years ago

I have a pull request in and a SNAPSHOT deployed https://oss.sonatype.org/content/repositories/snapshots/org/rundeck-plugins/rundeck-winrm-plugin/

It ads the maven central repo changes as well as fixing a NPE you hit when you enable HTTPS