rundeck-plugins / rundeck-winrm-plugin

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

NullPointerException if node username is not set #34

Open gschueler opened 9 years ago

gschueler commented 9 years ago

If the target node does not have "username" or "winrm-user" attribute, and no project or framework level username is found, it causes a NullPointerException:

Caused by: java.lang.NullPointerException
    at com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor$ConnectionOptionsBuilder.build(OTWinRMNodeExecutor.java:631)
    at com.dtolabs.rundeck.plugin.overthere.OTWinRMNodeExecutor.executeCommand(OTWinRMNodeExecutor.java:226)
    at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:333)
    at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeCommand(ExecutionServiceImpl.java:307)
    at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ExecNodeStepExecutor.executeNodeStep(ExecNodeStepExecutor.java:53)
    at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:149)
    ... 18 more

To fix: set a "username" or "winrm-user" attribute on the node