Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net::SSH::ChannelOpenFailed #1084

Closed
jcalonso opened this issue Jul 21, 2016 · 3 comments
Closed

Net::SSH::ChannelOpenFailed #1084

jcalonso opened this issue Jul 21, 2016 · 3 comments

Comments

@jcalonso
Copy link

jcalonso commented Jul 21, 2016

Description

I'm getting a "Net::SSH::ChannelOpenFailed" after kitchen installs ruby (when running kitchen test)

Kitchen Version

Test Kitchen version 1.10.2

ChefDK Version

Chef Development Kit Version: 0.14.25
chef-client version: 12.10.24
berks version: 4.3.3
kitchen version: 1.10.2

Ruby Version

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]

Platform Version

OSX 10.15

Replication Case

Run kitchen test with the following kitchen.yml:


---
driver:
  name: vagrant

provisioner:
  hosts: test-kitchen
  name: ansible_playbook
  ansible_verbosity: 2
  ansible_verbose: true
  require_ruby_for_busser: true
  require_chef_for_busser: false
  requirements_path: requirements.yml
  recursive_additional_copy_path:
    - "."

platforms:
  - name: ubuntu-14.04

verifier:
  ruby_bindir: '/usr/bin'

suites:
- name: default

Kitchen Output

       The following NEW packages will be installed:
         libruby1.9.1 ruby ruby1.9.1 ruby1.9.1-dev
       0 upgraded, 4 newly installed, 0 to remove and 25 not upgraded.
       Need to get 3,557 kB of archives.
       After this operation, 16.9 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main ruby all 1:1.9.3.4 [5,334 B]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main ruby1.9.1 amd64 1.9.3.484-2ubuntu1.2 [35.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libruby1.9.1 amd64 1.9.3.484-2ubuntu1.2 [2,645 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main ruby1.9.1-dev amd64 1.9.3.484-2ubuntu1.2 [871 kB]
Fetched 3,557 kB in 2s (1,227 kB/s)    
       Selecting previously unselected package ruby.
(Reading database ... 60181 files and directories currently installed.)
       Preparing to unpack .../ruby_1%3a1.9.3.4_all.deb ...
       Unpacking ruby (1:1.9.3.4) ...
       Selecting previously unselected package ruby1.9.1.
       Preparing to unpack .../ruby1.9.1_1.9.3.484-2ubuntu1.2_amd64.deb ...
       Unpacking ruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
       Selecting previously unselected package libruby1.9.1.
       Preparing to unpack .../libruby1.9.1_1.9.3.484-2ubuntu1.2_amd64.deb ...
       Unpacking libruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
       Selecting previously unselected package ruby1.9.1-dev.
       Preparing to unpack .../ruby1.9.1-dev_1.9.3.484-2ubuntu1.2_amd64.deb ...
       Unpacking ruby1.9.1-dev (1.9.3.484-2ubuntu1.2) ...
       Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
       Setting up ruby (1:1.9.3.4) ...
       Setting up ruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
       Setting up libruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
       Setting up ruby1.9.1-dev (1.9.3.484-2ubuntu1.2) ...
       Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
       bash: line 233: [: -eq: unary operator expected
       Transferring files to <default-ubuntu-1404>
/Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/channel.rb:541:in `do_open_failed': open failed (1) (Net::SSH::ChannelOpenFailed)
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:578:in `channel_open_failure'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:479:in `dispatch_incoming_packets'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:225:in `preprocess'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:206:in `process'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `block in loop'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `loop'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:170:in `loop'
        from /Library/Ruby/Gems/2.0.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:119:in `close'
        from /Library/Ruby/Gems/2.0.0/gems/test-kitchen-1.10.2/lib/kitchen/transport/ssh.rb:115:in `close'
        from /Library/Ruby/Gems/2.0.0/gems/test-kitchen-1.10.2/lib/kitchen/transport/ssh.rb:97:in `cleanup!'
        from /Library/Ruby/Gems/2.0.0/gems/test-kitchen-1.10.2/lib/kitchen/instance.rb:274:in `cleanup!'
        from /Library/Ruby/Gems/2.0.0/gems/test-kitchen-1.10.2/lib/kitchen/command.rb:209:in `run_action_in_thread'
        from /Library/Ruby/Gems/2.0.0/gems/test-kitchen-1.10.2/lib/kitchen/command.rb:173:in `block (2 levels) in run_action'
@cheeseplus
Copy link

cheeseplus commented Jul 28, 2016

In the issue you have DK versions reported but in the stacktrace it looks like you're using the built-in OSX Ruby (which is rather old to boot). Does this issue present itself when you use the built-in kitchen that is part of DK? Definitely happy to help track this down but 2.0.0 ruby is completely unsupported.

@jcalonso
Copy link
Author

jcalonso commented Aug 19, 2016

Hi @cheeseplus I'm getting the same error now on Arch Linux with ruby 2.3.1, same kitchen.yml

ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

 jcalonso kitchen --version  
Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring http_parser.rb-0.6.0 because its extensions are not built.  Try: gem pristine http_parser.rb --version 0.6.0
Ignoring oj-2.15.0 because its extensions are not built.  Try: gem pristine oj --version 2.15.0
Test Kitchen version 1.11.1

The logs: http://pastebin.com/uzqvaG2r

@jcalonso
Copy link
Author

jcalonso commented Sep 1, 2016

Indeed, the issue was related to the old version of ruby, now its working fine on OSX, I still have the problem on Linux, but need to do more testing. Closing this ticket. Thanks for the help!

@jcalonso jcalonso closed this as completed Sep 1, 2016
@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants