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

vagrant up doesn't complete due to ssh auth failure, but vagrant ssh works #12840

Closed
ritterwolf opened this issue Aug 17, 2022 · 13 comments
Closed

Comments

@ritterwolf
Copy link

Vagrant version

Arch package 2.3.0, and website 2.3.0 zip.

Host operating system

Arch, up to date as of 2022-08-17 22:30 UTC

Guest operating system

Ubuntu 22.04

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/jammy64"
end

Debug output

https://gist.github.com/ritterwolf/5586448d537bcc567449bfcf8db6f81f

Expected behavior

vagrant up completes

Actual behavior

Gets stuck and repeats the following messaging until interrupted or times out:

    default: Warning: Authentication failure. Retrying...

Steps to reproduce

  1. vagrant up and wait until the authentication failure message appears
  2. In another terminal log in using vagrant ssh

References

Looks similar to #12681. Adding PubkeyAcceptedAlgorithms +ssh-rsa to /etc/sshd/sshd_config and reloading sshd as mentioned in that ticket allows it to work.

@robinportigliatti
Copy link

Hello,

I had the same problem with jammy and removing all vagrant packages and reinstall them worked for me.

@schuam
Copy link

schuam commented Aug 19, 2022

Hello,

I also had the same problem. Unfortunately after deinstalling vagrant and reinstalling it. I have a whole other issue. When running vagrant up or vagrant status or any other vagrant ... command, I get the following error:

>> vagrant status
/usr/lib/ruby/3.0.0/rubygems/specification.rb:1453:in `rescue in block in activate_dependencies': Could not find 'delegate' (>= 0) among 99 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/opt/vagrant/embedded/gems/2.3.0' at: /usr/lib/ruby/gems/3.0.0/specifications/weakref-0.1.1.gemspec, execute `gem env` for more information

The whole trace can be found here.

Any idea how to fix that?

@stjohnfinn
Copy link

stjohnfinn commented Aug 20, 2022

@schuam, I'm currently facing the same issue. Any progress?

I've tried reinstalling several times, rebooting, installing ruby separately, running gem install delegate. Nothing has worked so far.

Additionally, I'm running Arch and I'm wondering if you are too because maybe it's an issue with the version of vagrant on the pacman registry.

@schuam
Copy link

schuam commented Aug 20, 2022

@stjohnfinn: after some sleep, I did make some progress:

So first of all, I'm in fact running Arch (it's up to date), and it seems to be an issue with the version that pacman installs.

When I installed Vagrant from source (see Installing Vagrant from Source) it worked. The last step they describe (adding a link to the executable in /usr/local/bin) didn't work. Well, adding the link work, but running Vagrant by just calling vagrant did not. That yielded to some new error messages.

The downside of this installation is, that auto-completion does not work, but at least Vagrant works for now.

By the way: I also tried to install the missing gem witn gem install delegate, which didn't help at first until I realized that vagrant changes the GEM_PATH (which can be seen in the error message that I posted earlier). So I tried gem install --install-dir /opt/vagrant/embedded/gems/2.3.0 delegate, which got rid of the error message when running vagrant up, but led back to the issue described by @ritterwolf.

P.S.:
When I run Vagrant now, I get the following warning:

You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.

I think this is kind of ironic 😆 .

@stjohnfinn
Copy link

@schuam In another issue I posted about this bug, someone recommended I downgrade to ruby version 3.0.4-5 from my pacman cache. This worked for me.

pacman -U file:///var/cache/pacman/pkg/ruby-3.0.4-5-x86_64.pkg.tar.zst

@schuam
Copy link

schuam commented Aug 20, 2022

@stjohnfinn: Thanks for the update.

Just to clarify: You installed Vagrant version 2.3.0-2 and Ruby version 3.0.4-5 via pacman, and that works for you? If so, I might try that as well.

@stjohnfinn
Copy link

stjohnfinn commented Aug 21, 2022

@schuam Yes, I have Vagrant 2.3.0-2 installed and Ruby 3.0.4-5. I'm running into the same SSH error as mentioned above, but only on certain Vagrant boxes. The SSH error occurs with generic/arch, but not generic/centos7, for example.

However, everything else works. Just be careful not to accidentally update all of your packages.

@schuam
Copy link

schuam commented Aug 22, 2022

@stjohnfinn: Well, maybe I stick with my setup then for now. No problems so far. At the moment, I'm working with an archlinux/archlinux and an ubuntu/jammy64. Both work fine.

@ritterwolf
Copy link
Author

I don't know what's going on; I haven't made any changes except Arch upgrades, no box upgrades, didn't upgrade Vagrant and it started working without requiring the workaround.

To confirm I installed the Arch packaged version again and it worked as well. The true test will be what happens after rebooting.

I'm increasingly doubting my own sanity.

@schuam
Copy link

schuam commented Aug 24, 2022

Well, if you upgraded Arch via pacman, that might have updated vagrant as well. I just checked, apparently vagrant was updated in the Arch repo yesterday (see here). So maybe that update fixed the problem.

Unfortunately, I won't have time to check myself this week, but I definitely will sometime soon. It would be great to work with the official Arch package without any workaround.

@ritterwolf
Copy link
Author

That's the thing, I didn't have the Arch package installed, I was using the downloaded executable. It just started working with stuff that wasn't before. Then when I noticed it working I installed the Arch package and it works too. It's inexplicable.

@ritterwolf
Copy link
Author

That's the thing, I didn't have the Arch package installed, I was using the downloaded executable. It just started working with stuff that wasn't before. Then when I noticed it working I installed the Arch package and it works too. It's inexplicable. I've now rebooted and the Arch version is still working.

I'm going to close this issue, find a dark corner, and sob quietly to myself.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants