An error occurred in the underlying ssh library that vagrant uses

#Vagrant 1.8.6 Mac OSX 10.11.6 VB - 5.1.8 Guest box - ubuntu/trusty64 (up to date) Vagrantfile - https://gist.github.com/neilgee/3be45289c845133a321f5a7087281da0#file-vagrant-file-txt This error ju...

I’ve been experiencing the following issues for the past few days.

Here a rundown of my set up and the issues.

Operating System:

macOS High Sierra Version 10.13.6

Current Virtual Machine Setup:

VirtualBox Version 5.2.18 (running Ubuntu 16.04.3)
VirtualBox Networking Settings
NAT with port forwarding: SSH, Host Port: 2020, Guest Port: 22
Vagrant 2.1.2 (latest version)

The Issues:

Issue #1: When I run ‘vagrant up’ I get the following error:

Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Issue #2: When I run ‘vagrant provision’ I get the following error message:

An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.

If the problem persists, please report a bug to the net-ssh project.

timeout during server version negotiating

I’ve tried the above and have reviewed the following but have not been able to resolve the issue(s).

#5732

Thanks in advance.

I get this errormessage:

An error occurred in the underlying SSH library that Vagrant uses. The
error message is shown below. In many cases, errors from this library
are caused by ssh-agent issues. Try disabling your SSH agent or
removing some keys and try again.

It is my first time with vagrant.

I took a tour through this tutorial.

Setting up a WordPress VVV2 Vagrant Workflow

I’ve windows 10, vagrant 1.8.5, Oracle VM newest version.

I read a lot about this issue but nothing helps me.

Maybe somebody knows a solution.

asked Aug 8, 2016 at 8:39

cgee's user avatar

4

Please try this command
vagrant halt
from inside your homestead directory
I had the same issue and this resolved my issue

answered Jul 26, 2018 at 3:10

Mohammad Anas's user avatar

1

Have you ever encountered this error?

Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

Or this?

An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.
If the problem persists, please report a bug to the net-ssh project.
timeout during server version negotiating

There could be multiple reasons this is happening, and I’ll walk through some steps to help diagnose and resolve the problem.

Vagrant v2

Hashicorp rewrote vagrants internals in version 2, so that errors like this happen less often, and when they do happen, they give better error messages. So if you see this issue, upgrade to version 2 of vagrant

Why Does It Happen?

When Vagrant v1 provisions, it tries to SSH into the virtual machine so that it can change things. It’s this attempt to connect to the VM that’s failing and generating the error. The Net SSH library used by Vagrant fails, causing the second error that mentions SSH Agents, and the longer error is Vagrants response.

The Vagrant SSH Key

Vagrant tries to authenticate its SSH connection using an insecure private key, but this can go wrong in several ways:

  • The virtual machine is still booting
    Running vagrant halt;vagrant up might fix this, or increasing the timeout
  • The current SSH Agent can interfere with the process
    Run export SSH_AUTH_SOCK="" to disable the SSH agent for the current session and retry
  • The public key never makes it into the VM’s authorised list, and the VM rejects the insecure private keys attempt to connect
    If you can run vagrant ssh you can add the public key manually to the authorised keys list e.g. `
echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > .ssh/authorized_keysBe sure to use the official public key available from Vagrant themselves

If all else fails

Update Guest Additions

There’s a vagrant plugin to do this. When the additions are updated, you’ll need to turn the box off and on else you’ll get cryptic errors mounting filesystems. To install it, run:

vagrant plugin install vagrant-vbguest

A number of Vagrant boxes int eh WordPress world and beyond rely on these plugins:

vagrant plugin install vagrant-hostsupdatervagrant plugin install vagrant-triggersvagrant plugin install vagrant-vbguest

While not free, it is more reliable than Virtualbox

Verify VirtualBox and Vagrant are up to date

Eliminate old bugs as a problem by updating to the latest versions of both. Be sure to check the Virtualbox guest additions are the latest version

Run Vagrant in Debug mode

Most messages are hidden from view, and that might include vital information. Use this command to provision Vagrant with a full verbose log file:

vagrant halt;vagrant up --provision --debug  &> vagrant.log

Use User/Password Auth Instead

You can configure Vagrant to use user pass authentication instead of SSH key auth. If you receive these errors but can still SSH into the VM then this may work for you

 config.ssh.insert_key = false config.ssh.paranoid = false config.ssh.keys_only = false config.ssh.username = "vagrant" # change as appropriate config.ssh.password = "vagrant"

If you’re a fan of going nuclear, these commands will destroy your VM, and the base box, then reprovision twice:

vagrant destroyvagrant box remove precise32vagrant plugin install vagrant-hostsupdatervagrant plugin install vagrant-triggersvagrant plugin install vagrant-vbguestvagrant up --provisionvagrant reload --provision

Содержание

  1. NetSSHException: An error occurred in the underlying SSH library that Vagrant uses. #8136
  2. Comments
  3. Virtualbox
  4. Vagrant version
  5. Host operating system
  6. Guest operating system
  7. Vagrantfileu
  8. Debug output
  9. Expected behavior
  10. Actual behavior
  11. Steps to reproduce
  12. Command ‘vagrant up’ fails with ‘An error occurred in the underlying SSH library’ #11702
  13. Comments
  14. Vagrant version
  15. Host operating system
  16. Guest operating system
  17. Vagrantfile
  18. Debug output
  19. Expected behavior
  20. Actual behavior
  21. Steps to reproduce
  22. References
  23. An error occurred in the underlying SSH library that Vagrant uses. #7965
  24. Comments
  25. References
  26. ssh-agent issues: timeout waiting for next packet #11225
  27. Comments
  28. Vagrant version
  29. Host operating system
  30. Guest operating system
  31. Vagrantfile
  32. Debug output
  33. Expected behavior
  34. Actual behavior
  35. References
  36. Footer

NetSSHException: An error occurred in the underlying SSH library that Vagrant uses. #8136

Virtualbox

Vagrant version

Host operating system

Xubuntu 16.10 (xfce)

Guest operating system

Vagrantfileu

Debug output

INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO ssh: Attempting SSH connection.
INFO ssh: Attempting to connect to SSH.
INFO ssh: — Host: 127.0.0.1
INFO ssh: — Port: 2222
INFO ssh: — Username: ubuntu
INFO ssh: — Password? true
INFO ssh: — Key Path: []
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «4cab0d16-105a-4512-93ba-60c898c9ba3f», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO ssh: SSH not ready: #

Expected behavior

INFO ssh: Attempting SSH connection.
INFO ssh: Attempting to connect to SSH.
INFO ssh: — Host: 127.0.0.1
INFO ssh: — Port: 2222
INFO ssh: — Username: ubuntu
INFO ssh: — Password? true
INFO ssh: — Key Path: []
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «9927de0f-8d56-4c35-9e4c-e1ad7d59f044», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «9927de0f-8d56-4c35-9e4c-e1ad7d59f044», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «9927de0f-8d56-4c35-9e4c-e1ad7d59f044», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO subprocess: Starting process: [«/usr/bin/VBoxManage», «showvminfo», «9927de0f-8d56-4c35-9e4c-e1ad7d59f044», «—machinereadable»]
INFO subprocess: Command not in installer, restoring original environment.
INFO ssh: SSH is ready!
INFO ssh: Execute: (sudo=false)

Actual behavior

Reconnecting to ssh over 5-6 minutes.

Steps to reproduce

Killing the ssh-agent ( $ killall gnome-keyring-daemon && ssh-agent -k ) do nothing.

The text was updated successfully, but these errors were encountered:

Источник

Command ‘vagrant up’ fails with ‘An error occurred in the underlying SSH library’ #11702

Vagrant version

Host operating system

Guest operating system

Vagrantfile

Debug output

Expected behavior

Command «vagrant up» should start the virtual machine.

Actual behavior

Running «vagrant up» hangs on «SSH auth method: private key» for a long time and eventually gives the following error:

«Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured («config.vm.boot_timeout» value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout («config.vm.boot_timeout») value.»

After that, running «vagrant up» again gives the following error:

«An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.

If the problem persists, please report a bug to the net-ssh project.

timeout during server version negotiating»

The error occurs with combination:

Manjaro 20.0.3
vagrant —version
Vagrant 2.2.9
vboxmanage —version
6.1.8r137981

However, when downgrading the virtualbox 6.1.8. —> 6.1.6. everything works ok. So the following combination works:

Manjaro 20.0.3
vagrant —version
Vagrant 2.2.9
vboxmanage —version
6.1.6r137129

Steps to reproduce

  1. git clone https://github.com/Seravo/wordpress.git
  2. cd wordpress
  3. git checkout beta
  4. vagrant up

References

The text was updated successfully, but these errors were encountered:

Источник

An error occurred in the underlying SSH library that Vagrant uses. #7965

#Vagrant 1.8.6
Mac OSX 10.11.6
VB — 5.1.8
Guest box — ubuntu/trusty64 (up to date)

This error just started happening for me, to my knowledge nothing changed in my local environment and I updated Vagrant & VB to latest to see if it would fix the issue (it didn’t).

The error on vagrant up

The error on vagrant halt is also ssh related

And trying vagrant ssh

References

I tried uninstalling and installing vagrant-vbguest which had been suggested — but didn’t work for me.

The text was updated successfully, but these errors were encountered:

@neilgee Are you still experiencing this issue?

Never resolved it, lost the MySQL db’s, had to recreate new local environment.

This isn’t something I’m able to reproduce locally and seems like an issue within the VM itself. If it does happen again and can be easily reproduced, please reopen this issue or create a new one. Thanks!

Having the same issue here. Have looked for solutions all over the place including #6812, net-ssh/net-ssh#301, https://tomjn.com/2016/08/03/vagrant-provision-timeouts/, #7306, geerlingguy/drupal-vm#509, Varying-Vagrant-Vagrants/VVV#375, #6854, vagrant-libvirt/vagrant-libvirt#452, vagrant-libvirt/vagrant-libvirt#452. I’m at a complete loss, and I not ready to risk losing all my dev sites/DBs by wiping/reinstalling. Would love any/all input/help.

I was prompted to update SHH and now I’m getting these same errors. I’m new to Vagrant and have already wasted days trying it get it to work. SSH was getting closed during pushes so I thought up[dating could help. Not it’s worse.

@LoreleiAurora walked me through getting my data backed up, wiping out the machine and reinstalling it. It turns out https://github.com/Varying-Vagrant-Vagrants/VVV keeps backups of the DB data on the host system, so I could just destroy it and reinstall it. If i’m wrong, I’m sure @LoreleiAurora will correct any of the wrong statements I’ve made. 🙂

Do you mean the dbs in VVV/database/backups/*sql

These are done via triggers and I find not always the latest especially if your VVV has been running for a while.

Would be great to get a mini documentation on how the issue was resolved.

@neilgee no, I mean the VVV/database/data/ files. Basically, we copied that directory out, then destroyed it all, re-upped, then put that data files back and re-provisioned. That’s the super basic version.

@jsternberg ok thanks will try that if it happens again, btw I only have a text file in VVV/database/data/

@neilgee I think the key is this bit in the Vagrantfile :

@jtsternberg Ok cool I see — will give it a spin on a test environment — was pulling my hair out when this happened to me and having to start again was a royal pain.

@neilgee I’m surprised I have any hair left after the last couple days. But more importantly, I have my data ha ha.

Maybe someone found a solution?
VB 5.1
Vagrant 1.9.2

what worked for me was:

If you’re not able to use vagrant halt you can power down the box itself via VirtualBox, then run vagrant up —provision

I’ve been experiencing the following issues for the past few days.

Here a rundown of my set up and the issues.

macOS High Sierra Version 10.13.6

Current Virtual Machine Setup:

VirtualBox Version 5.2.18 (running Ubuntu 16.04.3)
VirtualBox Networking Settings
NAT with port forwarding: SSH, Host Port: 2020, Guest Port: 22
Vagrant 2.1.2 (latest version)

Issue #1: When I run ‘vagrant up’ I get the following error:

Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Issue #2: When I run ‘vagrant provision’ I get the following error message:

An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.

If the problem persists, please report a bug to the net-ssh project.

timeout during server version negotiating

I’ve tried the above and have reviewed the following but have not been able to resolve the issue(s).

Источник

ssh-agent issues: timeout waiting for next packet #11225

Vagrant version

Host operating system

Guest operating system

Vagrantfile

Debug output

In most cases the error I’m getting is:

Expected behavior

Provisioning or starting the box to work consistently. Same Vagrant configuration is working fine on osx.

Actual behavior

After a couple of tries, usually 4-8, provisioning the box will succeed. The config is very similar to the docs: https://www.vagrantup.com/docs/synced-folders/basic_usage.html

References

There are similar issues here and there.

Have tried most workarounds: Destroying the machine. Halting it first. Deleting the vagrant.d folder etc. but nothing seems to help

The text was updated successfully, but these errors were encountered:

Hello @kongeor! Thanks for opening an issue. When opening a new issue on the Vagrant project, we ask that everyone provide a gist containing the behavior you’re seeing with the —debug flag included. This helps us figure out what’s actually going on. Thanks!

Thanks @kongeor ! I assume this timeout doesn’t happen with other Vagrant boxes. And also could you provide us with a reproducible Vagrantfile? Thanks!

@briancain I have added the entire Vagrantfile. No, other boxes work fine. What’s also interesting is that this Vagrantfile is working fine on osx machines. Thanks!

Any update on this? Thanks!

@kongeor Have you tried what the error mentioned? i.e. Try disabling your SSH
agent or removing some keys and try again.
? I have yet to reproduce this issue, and I think generally it is probably mostly an issue with the underlying ssh agent on your linux system for the guest you are using. 🤔 The error itself is coming from the net-ssh library reading the packet stream. and considering it only seems to happen with that specific box, I imagine it’s probably an issue with ssh on there rather than something Vagrant is doing.

You (and Vagrant) were right!

It looks like the problem has to do with the Gnome Keyring. Not sure why it was working sometimes. 🤔

I disabled the Gnome Keyring and switched to SSH agent as described here: https://wiki.archlinux.org/index.php/SSH_keys#SSH_agents
and I had no issues on my last two starts.

Sounds good @kongeor ! Glad it is working then. Sometimes tools Vagrant uses can be a bit finiky, but there’s not much we can do if that’s the case 😄 I’ll go ahead and close this since it’s working now! 🎉

Sorry @briancain but I think I rushed coming to conclusions.

I’m having exactly the same errors as before :/

Any progress on solving this issue? it seems a blocker for many vagrant users, I am having exactly the same issue with version 2.2.4 / Ubuntu 16.04 and LXC containers, I’m stuck and unable to deploy my containers on local machines, it seems to be a vagrant issue as 4 different machines are getting the same, two with ubuntu 16 and two with 18, the ssh_exception «timeout waiting for next packet» is too broad and can lead to many, many different reasons, I tried all the possible workaround by changing ssh configuration, stopping ssh-agent, increasing timeout, disabling many others things over ssh/sshd and I could even break my system, but I always get the same thing, if you guys could test mote and find out, it took 17 seconds to failure after start Setting hostname,
my machine is Ubuntu 16.04, my vagrant_box is centos7.4, my provider is lxc

thx and advance for any guidance that could help me fix this issue

I’m going to lock this issue because it has been closed for 30 days ⏳ . This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Hi,

I am a complete newbie in the RHEL world. I just setup on system with a developer subscription to try and prep for the RHCSA exam.

I am trying to install virtual box and vagrant on top of my RHEL system.

Here are the errors that I get:


[tkhara@localhost server1]$ vagrant up --provider=virtualbox The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below: VirtualBox is complaining that the kernel module is not loaded. Please run `VBoxManage --version` or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error. [tkhara@localhost server1]$ VBoxManage --version WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.18.0-240.10.1.el8_3.x86_64) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed. 6.1.16r140961 [tkhara@localhost server1]$ sudo /sbin/vboxconfig [sudo] password for tkhara: vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong. There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

Please do let me know if this is not the right forum to post such issues. Otherwise, any guidance to get this setup would be appreciated.

Thank you.

Like this post? Please share to your friends:
  • An error occurred during the installation of assembly component msxml
  • An error occurred during the installation of assembly component 74974f83
  • An error occurred during the installation of assembly component 0x800736fd
  • An error occurred during the installation of assembly component 0x80070490
  • An error occurred in the application you were using