Skip to content

SCP did not finish successfully (channel closed before end of transmission) #295

@UriZafrir

Description

@UriZafrir

Hi
on macbook,
if I have one vm in Vagrantfile I don't get the error,
however when I try two vms I get :

The capability 'public_address' could not be found.

I get it for the second vm:


An unexpected error occurred when executing the action on the
'node02' machine. Please report this as a bug:

SCP did not finish successfully (channel closed before end of transmission)

/opt/vagrant/embedded/gems/gems/net-scp-4.1.0/lib/net/scp.rb:374:in `block (3 levels) in start_command'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/channel.rb:614:in `do_close'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:573:in `channel_closed'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:564:in `block in force_channel_cleanup_on_close'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:563:in `each'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:563:in `force_channel_cleanup_on_close'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:228:in `rescue in process'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:225:in `process'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:179:in `block in loop'
<internal:kernel>:187:in `loop'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:179:in `loop'
/opt/vagrant/embedded/gems/gems/net-ssh-7.3.0/lib/net/ssh/connection/channel.rb:272:in `wait'
/opt/vagrant/embedded/gems/gems/net-scp-4.1.0/lib/net/scp.rb:321:in `download!'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/plugins/communicators/ssh/communicator.rb:343:in `block in download'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/plugins/communicators/ssh/communicator.rb:794:in `block in scp_connect'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/plugins/communicators/ssh/communicator.rb:450:in `connect'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/plugins/communicators/ssh/communicator.rb:792:in `scp_connect'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/plugins/communicators/ssh/communicator.rb:342:in `download'
/Users/urizafrir/.vagrant.d/gems/3.3.8/gems/vagrant-hostmanager-1.8.10/lib/vagrant-hostmanager/hosts_file/updater.rb:37:in `update_guest'
/Users/urizafrir/.vagrant.d/gems/3.3.8/gems/vagrant-hostmanager-1.8.10/lib/vagrant-hostmanager/action/update_all.rb:37:in `block in call'
/Users/urizafrir/.vagrant.d/gems/3.3.8/gems/vagrant-hostmanager-1.8.10/lib/vagrant-hostmanager/action/update_all.rb:32:in `each'
/Users/urizafrir/.vagrant.d/gems/3.3.8/gems/vagrant-hostmanager-1.8.10/lib/vagrant-hostmanager/action/update_all.rb:32:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/config_validate.rb:28:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/provision.rb:83:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builder.rb:183:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/util/busy.rb:22:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/call.rb:56:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/Users/urizafrir/.vagrant.d/gems/3.3.8/gems/vagrant-qemu-0.3.9/lib/vagrant-qemu/action/import.rb:86:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builder.rb:183:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/util/busy.rb:22:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/call.rb:56:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/box_check_outdated.rb:98:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/config_validate.rb:28:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builtin/handle_box.rb:58:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/warden.rb:38:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/builder.rb:183:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/util/busy.rb:22:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/action/runner.rb:104:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/machine.rb:244:in `action_raw'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/machine.rb:213:in `block in action'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/environment.rb:647:in `lock'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/machine.rb:199:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/machine.rb:199:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-2.4.5/lib/vagrant/batch_action.rb:88:in `block (2 levels) in run'

this is my vagrantfile:

require './vagrant.rb'
include VagrantVars

Vagrant.configure("2") do |config|
  config.vm.synced_folder ".", "/vagrant", type: "rsync"


  unless Vagrant.has_plugin?('vagrant-hostmanager')
    raise 'vagrant-hostmanager plugin is not installed! please run "sudo vagrant plugin install vagrant-hostmanager"'
  else
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.hostmanager.ignore_private_ip = false
    config.hostmanager.include_offline = true
  end

  unless Vagrant.has_plugin?('vagrant-address')
    raise 'vagrant-address plugin is not installed! please run "sudo vagrant plugin install vagrant-address"'
  end
  
  # Define the box to use
  config.vm.box = "bento/ubuntu-22.04"

  config.vm.define "node01" do |node01|
    node01.vm.hostname = "node01"
    node01.vm.provider "qemu" do |v|
      v.name = "Node01"
      v.memory = 2048
      v.arch = "x86_64"
      v.machine = "q35"
      v.net_device = "virtio-net-pci"
      v.cpu = "qemu64"
      v.ssh_auto_correct = true
    end
  end

  #Configure node02
  config.vm.define "node02" do |node02|
    node02.vm.hostname = "node02"
    node02.vm.provider "qemu" do |v|
      v.name = "Node02"
      v.memory = 2048
      v.arch = "x86_64"
      v.machine = "q35"
      v.net_device = "virtio-net-pci"
      v.cpu = "qemu64"
      v.ssh_auto_correct = true
    end
  end
end

please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions