-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 halt, freeze with SSH Sending keep alive #6207
Comments
Duplicate of #6051. Please see my solution there. Thanks! 😄 |
@sethvargo We've run into the same issue with Like in the top message, communicator is sending SSH keep-alive, so there is nothing to fix on the provider side. Should this bug be reopened or we have to file the new one? P.S. I could reproduce it only with Debian guest. Other guests (CentOS, Ubuntu) are halting fine. |
Just reporting I have this too using debian sid (latest 4.3 kernel). I'm happy to provide more logs or help further. sample vagrant parallels box is https://atlas.hashicorp.com/ideegeo/boxes/debian-sid
|
Is anyone currently looking at this? It's driving me mad and I'm stuck using Parallels currently because I need its nested virtualisation. If no-one is looking at it I'll likely take a look myself but I'm not familiar with Vagrant's source. |
I'll assume that's a no, then. |
This has also been reported in oscar-stack/vagrant-hosts#65 One thing I noticed is that some of these DEBUG traces show a PTY being allocated after a command is executed on the SSH session. Is this correct behavior? Shouldn't the PTY be allocated first? |
Hi, This issue is probably specific to Debian/Debian derivatives and limited to boxes running systemd. There is a very long running thread here where the issue is discussed in some detail! Read through for the full gory details. Long and short, I managed to prevent this behaviour with my Debian box by: 1/ Ensuring the libpam-systemd package is installed in the guest
2/ Ensuring that /etc/ssh/sshd_config has the required option set to use PAM
3/ Restarting the box - you'll have to put up with the issue one last time... CTRL-C to the rescue! Once this is taken care of issuing a Note that the libpam-systemd package is 'recommended' for installation when systemd is installed. Debian systems should install 'recommended' packages by default so any box exhibiting this behaviour has probably been built with the APT setting of Just for completeness: Host OS: OS X 10.10.5 Hope that helps. Dan |
@DanHam 's comment sums this up pretty nicely: #6207 (comment) I'm going to close this up. If the behavior is still seen with properly configured guests, please open a new issue. Thanks! |
If @DanHam's solution above does not work, try creating a oneshot systemd service that kills sshd like explained here
|
I can confirm that vdloo's solution worked for me. I'm running VirtualBox 5.2.12, Vagrant 2.1.2, and Debian 8.11. |
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. |
System: Mac OS X
Vagrant 1.7.4
VMware-Fusion 7
vagrant hangs on vagrant halt and vagrant reload.
Here is the output from vagrant halt --debug
....
DEBUG ssh: PTY stdout parsed: Debian GNU/Linux stretch/sid \n \l
INFO guest: Detected: debian!
DEBUG guest: Searching for cap: halt
DEBUG guest: Checking in: debian
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: halt in linux
INFO guest: Execute capability: halt #<Vagrant::Machine: BOXNAME (HashiCorp::VagrantVMwarefusion::Provider)>
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: shutdown -h now (sudo=true)
DEBUG ssh: pty obtained for connection
DEBUG ssh: stdout: export TERM=vt100
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
DEBUG ssh: pty obtained for connection
DEBUG ssh: stdout: export TERM=vt100
stty raw -echo
export PS1=
export PS2=
export PROMPT_COMMAND=
printf bccbb768c119429488cfd109aacea6b5-pty
echo; printf $SSH_AUTH_SOCK
exitcode=$?
printf bccbb768c119429488cfd109aacea6b5-pty
exit $exitcode
DEBUG ssh: stdout: root@kartoffel-box:/home/vagrant# export TERM=vt100
root@kartoffel-box:/home/vagrant#
DEBUG ssh: stdout: vagrant@kartoffel-box:
$ expor
$ stty rDEBUG ssh: stdout: t
DEBUG ssh: stdout: TERM=vt10
DEBUG ssh: stdout: 0
DEBUG ssh: stdout: vagrant@kartoffel-box:
DEBUG ssh: stdout: aw -
DEBUG ssh: stdout: e
DEBUG ssh: stdout: cho
DEBUG ssh: stdout: vagrant@kartoffel-box:
$
$ export TERM=vt100DEBUG ssh: stdout: bccbb768c119429488cfd109aacea6b5-pty
DEBUG ssh: stdout:
DEBUG ssh: stdout: /tmp/ssh-NytPFZbPrZ/agent.2229
DEBUG ssh: stdout: bccbb768c119429488cfd109aacea6b5-pty
DEBUG ssh: stdout: Abgemeldet
DEBUG ssh: Exit status: 0
DEBUG ssh: PTY stdout: export TERM=vt100
stty raw -echo
export PS1=
export PS2=
export PROMPT_COMMAND=
printf bccbb768c119429488cfd109aacea6b5-pty
echo; printf $SSH_AUTH_SOCK
exitcode=$?
printf bccbb768c119429488cfd109aacea6b5-pty
exit $exitcode
vagrant@kartoffel-box:
vagrant@kartoffel-box:
$ stty raw -echo$ bccbb768c119429488cfd109aacea6b5-ptyvagrant@kartoffel-box:
/tmp/ssh-NytPFZbPrZ/agent.2229bccbb768c119429488cfd109aacea6b5-ptyAbgemeldet
DEBUG ssh: PTY stdout parsed:
/tmp/ssh-NytPFZbPrZ/agent.2229
INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-NytPFZbPrZ/agent.2229
nt.2229sh: stdout: export SSH_AUTH_SOCK=/tmp/ssh-NytPFZbPrZ/age
root@kartoffel-box:/home/vagrant# stty raw -echo
DEBUG ssh: stdout: root@kartoffel-box:/home/vagrant#
DEBUG ssh: stdout: bccbb768c119429488cfd109aacea6b5-pty
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
...
The text was updated successfully, but these errors were encountered: