Skip to content

Instantly share code, notes, and snippets.

@luxio
Created December 14, 2018 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxio/71732d89eda03fcdd00911f839853e7d to your computer and use it in GitHub Desktop.
Save luxio/71732d89eda03fcdd00911f839853e7d to your computer and use it in GitHub Desktop.
SCP fails with Return Code 126 (host-only network)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
/opt/vagrant/embedded/gems/2.2.2/gems/net-scp-1.2.1/lib/net/scp.rb:365:in `block (3 levels) in start_command': SCP did not finish successfully (126): (Net::SCP::Error)
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/channel.rb:610:in `do_close'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:573:in `channel_closed'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:682:in `channel_close'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:549:in `dispatch_incoming_packets'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:249:in `ev_preprocess'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/event_loop.rb:101:in `each'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/event_loop.rb:101:in `ev_preprocess'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/event_loop.rb:29:in `process'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:228:in `process'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:181:in `block in loop'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:181:in `loop'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/session.rb:181:in `loop'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-ssh-5.0.2/lib/net/ssh/connection/channel.rb:272:in `wait'
from /opt/vagrant/embedded/gems/2.2.2/gems/net-scp-1.2.1/lib/net/scp.rb:284:in `upload!'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/communicators/ssh/communicator.rb:299:in `block in upload'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/communicators/ssh/communicator.rb:701:in `block in scp_connect'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/communicators/ssh/communicator.rb:349:in `connect'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/communicators/ssh/communicator.rb:699:in `scp_connect'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/communicators/ssh/communicator.rb:293:in `upload'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/guests/debian/cap/configure_networks.rb:182:in `block in upload_tmp_file'
from /opt/vagrant/embedded/lib/ruby/2.4.0/tempfile.rb:295:in `open'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/guests/debian/cap/configure_networks.rb:177:in `upload_tmp_file'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/guests/debian/cap/configure_networks.rb:136:in `configure_nettools'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/guests/debian/cap/configure_networks.rb:31:in `configure_networks'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/capability_host.rb:111:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/capability_host.rb:111:in `capability'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/guest.rb:43:in `capability'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/network.rb:134:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/set_default_nic_type.rb:64:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:19:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:49:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/provision.rb:80:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/box_check_outdated.rb:23:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/machine.rb:239:in `action_raw'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/machine.rb:208:in `block in action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/environment.rb:614:in `lock'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/machine.rb:194:in `call'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/machine.rb:194:in `action'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment