SSH connection is closed when using same base box in parallel

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SSH connection is closed when using same base box in parallel

Alex Rodionov
I have two jobs on CI server with separate workspaces but sharing the same base box. 
Each job generally just runs specs.

When I start both jobs concurrently, after the first one is finished, second crashes with SSH read error:

/opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/ruby_compat.rb:30:in `select': closed stream (IOError)
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/ruby_compat.rb:30:in `io_select'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/transport/packet_stream.rb:73:in `available_for_read?'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/transport/packet_stream.rb:85:in `next_packet'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:172:in `block in poll_message'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:167:in `loop'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:167:in `poll_message'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:454:in `dispatch_incoming_packets'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:216:in `preprocess'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:200:in `process'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `block in loop'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
  from /opt/vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/connection/channel.rb:269:in `wait'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/communicators/ssh/communicator.rb:310:in `shell_execute'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/communicators/ssh/communicator.rb:61:in `block in execute'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/communicators/ssh/communicator.rb:243:in `connect'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/communicators/ssh/communicator.rb:60:in `execute'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/lib/vagrant/action/builtin/ssh_run.rb:20:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/lib/vagrant/action/warden.rb:34:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/providers/virtualbox/action/check_running.rb:16:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/lib/vagrant/action/warden.rb:34:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/lib/vagrant/action/warden.rb:34:in `call'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.2.1/plugins/providers/virtualbox/action/check_created.rb:16:in `call'

Forwarded SSH ports collisions are handled correctly (i.e. first job starts with 2222 port, second - 2200).

Should I somehow tweak SSH settings for Vagrant?

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.