NetDocuments-Archive / rd-winrm-plugin

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

Error: Could not find 'winrm' #40

Closed digitalray closed 7 years ago

digitalray commented 7 years ago

I am getting after trying to execute a command in rundeck.

SYS INFO: CentOS release 6.8 (Final) Rundeck 2.7.3-1 rvm 1.29.1 (latest) ruby-2.4.0 [ x86_64 ] winrm (1.8.1) winrm-fs (0.4.3) /var/lib/rundeck/libext/rd-winrm-plugin-1.5.1.zip

ERROR: /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/dependency.rb:308:in to_specs': Could not find 'winrm' (= 1.8.1) among 18 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/.gem/ruby/2.4.0:/usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/gems/2.4.0', executegem envfor more information from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/dependency.rb:320:into_spec' from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_gem.rb:65:in gem' from /var/lib/rundeck/libext/cache/rd-winrm-plugin-1.5.1/winrmexe.rb:2:in

' Failed: NonZeroResultCode: [WinRMexe] Result code: 1 Execution failed: 2 in project Test: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [sarkistest: NonZeroResultCode: [WinRMexe] Result code: 1]}, Node failures: {sarkistest=[NonZeroResultCode: [WinRMexe] Result code: 1]}, status: failed]

gem env output RubyGems Environment:

  • RUBYGEMS VERSION: 2.6.11
  • RUBY VERSION: 2.4.0 (2016-12-24 patchlevel 0) [x86_64-linux]
  • INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.4.0
  • USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.4.0
  • RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.4.0/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.4.0/bin
  • SPEC CACHE DIRECTORY: /root/.gem/specs
  • SYSTEM CONFIGURATION DIRECTORY: /usr/local/rvm/rubies/ruby-2.4.0/etc
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /usr/local/rvm/gems/ruby-2.4.0
    • /usr/local/rvm/gems/ruby-2.4.0@global
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:
  • SHELL PATH:
    • /usr/local/rvm/gems/ruby-2.4.0/bin
    • /usr/local/rvm/gems/ruby-2.4.0@global/bin
    • /usr/local/rvm/rubies/ruby-2.4.0/bin
    • /usr/local/rvm/gems/ruby-2.4.0/bin
    • /usr/local/rvm/gems/ruby-2.4.0@global/bin
    • /usr/local/rvm/rubies/ruby-2.4.0/bin
    • /usr/local/sbin
    • /usr/local/bin
    • /sbin
    • /bin
    • /usr/sbin
    • /usr/bin
    • /usr/local/rvm/bin
    • /root/bin
spuder commented 7 years ago

Sorry, I don't know how much help I can be since we aren't activly using this plugin at the moment. I suspect it might be a problem with ruby 2.4.0. Perhaps try and older version of ruby?

digitalray commented 7 years ago

Unfortunately the older version of Ruby did not help

digitalray commented 7 years ago

Ended up using https://github.com/rundeck-plugins/rundeck-winrm-plugin/releases/tag/v1.3.3 Thanks @spuder for your hlep!