Open regenyn opened 6 years ago
I was getting the same error until I set the correct username/pass variables in the project default config. I don't think the per-node resources.xml settings are being honored.
That said, it still doesn't work since we get an "unexpected http response" (401)
@thomsonac Did you get this to work?
I am getting the same error message when I run my job where the job itself is executed on another node.
@mcgurksean yes, though it was extremely painful. The short version is that this plugin seems more-or-less abandoned so I'm going back to the drawing board to see if we can use SSH to Windows boxes. Pretty disappointed and this will probably drive us away from fully embracing Rundeck, let alone paying for it. Here is an example of a server of ours that is working via winRM (change the username/hostname/etc)
I can't promise that all of the server config settings below are required but it took soooooo much trial and error, this seems to (usually) work. I wrote out the commands to keep it easy (note the reboots!)
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f shutdown -r -f -t 1 $serverName = (Get-WmiObject win32_computersystem).DNSHostName+"."+(Get-WmiObject win32_computersystem).Domain $cert = New-SelfSignedCertificate -DnsName $serverName -CertStoreLocation Cert:\LocalMachine\My New-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{Address="";Transport="HTTPS"} -ValueSet @{Hostname=$serverName;CertificateThumbprint=$cert.Thumbprint} set-WSManInstance -ResourceURI winrm/config/service -ValueSet @{AllowUnencrypted="true"} set-WSManInstance -ResourceURI winrm/config/client -ValueSet @{AllowUnencrypted="true"} Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value "" -Force Restart-service winrm
@mcgurksean I should add that the 1.3.4 (and up?) plugin has a bug. We dropped down to 1.3.2 and 1.3.3 (I think) which allows you to use per-resource users in resources.xml vs. the project defaults
said, it still doesn't work since we get an "unexpecte
@thomsonac I get the same error. How did you add the configuration? project.plugin.NodeExecutor.username && project.plugin.NodeExecutor.password ? Still the same issue. Any other plugin for winrm?
The passwords are stored inside the key store and the location referenced in the above resources.xml config
There is a missing parameter description in the documentation. You have to add a"winrm-cmd" parameter in your node configuration. The two available values are "CMD" and "PowerShell".
Hi, got error message:
Failed dispatching to node testwinpc: java.lang.IllegalArgumentException: No value specified for required connection option winrm-cmd
Can't find such option in "Configure The Plugin". What I am missing?
resource.xml: `
`
Job contains: option= "winrmPassword" default_value = "userpassword" shell_command = "ipconfig"
Using: Rundeck 2.11.4-1 rundeck-winrm-plugin-1.3.4.jar Debian 9