NetDocuments-Archive / rd-winrm-plugin

Allows rundeck to execute commands with powershell
Apache License 2.0
31 stars 19 forks source link

Error when using Script #11

Closed esoc24 closed 8 years ago

esoc24 commented 8 years ago

I am getting an error when using scripts, and it says that I am unable to connect.

Error:

/home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:43: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :kerberos, realm: realm)
10:34:57                                                                    ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:45: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :plaintext, user: user, pass: pass, disable_sspi: true)
10:34:57                                                                    ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:45: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :plaintext, user: user, pass: pass, disable_sspi: true)
10:34:57                                                                                ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:45: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :plaintext, user: user, pass: pass, disable_sspi: true)
10:34:57                                                                                                    ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:47: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :ssl, user: user, pass: pass, disable_sspi: true)
10:34:57                                                              ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:47: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :ssl, user: user, pass: pass, disable_sspi: true)
10:34:57                                                                          ^
10:34:57    /home/rundeck/libext/cache/rd-winrm-plugin-1.3.2/winrmcp.rb:47: syntax error
10:34:57      winrm = WinRM::WinRMWebService.new(endpoint, :ssl, user: user, pass: pass, disable_sspi: true)
10:34:57                                                                                              ^

Here are my settings:

project.plugin.FileCopier.WinRMcp.allowoverride=all
project.plugin.FileCopier.WinRMcp.authtype=plaintext
project.plugin.FileCopier.WinRMcp.pass=*****
project.plugin.FileCopier.WinRMcp.shell=cmd
project.plugin.FileCopier.WinRMcp.user=RunDeck
project.plugin.FileCopier.WinRMcp.winrmport=5986
project.plugin.NodeExecutor.WinRMexe.allowoverride=all
project.plugin.NodeExecutor.WinRMexe.authtype=plaintext
project.plugin.NodeExecutor.WinRMexe.krb5_realm=wdw.disney.com
project.plugin.NodeExecutor.WinRMexe.pass=*****
project.plugin.NodeExecutor.WinRMexe.shell=cmd
project.plugin.NodeExecutor.WinRMexe.user=RunDeck
project.plugin.NodeExecutor.WinRMexe.winrmport=5986

Can someone help me resolve this issue?

Thanks, Eric

spuder commented 8 years ago

Thanks for letting us know that there is a problem with the plugin. The main author will be out of town for a bit, so it might take some time before we are able to dive deep into this.

I notice that you are using 'cmd'. Do you get the same result when using 'powershell' ?

esoc24 commented 8 years ago

@spuder Hello, I tried powershell and got the same result. I am able to connect manually via knife winrm on 5986 and -t ssl though.

vvchik commented 8 years ago

@esoc24 are you trying to use knife from linux or from windows computer?

esoc24 commented 8 years ago

@vvchik Currently RunDeck is running on a linux server, but I can run it through bash/cmd line on linux/windows manually.

vvchik commented 8 years ago

question is: are you able to connect via knife from linux?

vvchik commented 8 years ago

One more question which version of ruby do you use?

vvchik commented 8 years ago

Closed due no answering from issuer