-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ssh timeout Remote command exited without exit status or exit signal.
#12263
Comments
Workaround: force kill provisioner "shell" {
# https://github.com/hashicorp/packer/issues/354#issuecomment-23615630
inline = ["ps aux | grep sshd | grep -v grep | awk '{print $2}' | xargs kill && reboot"]
execute_command = "echo 'ubuntu' | sudo -S sh -c '{{ .Vars }} {{ .Path }}'"
expect_disconnect = true
pause_after = "120s"
} |
for what it's worth I have the same issue and the workaround does not work for me. Happens while attempting to reboot on AL2. |
I am experiencing this issue on AWS as well. The provisioning process just randomly hangs and after ~20 minutes I get the same error:
|
Just started building al2023 and seeing this same issue. Anyone ever solve for it? Using packer 1.11.1 |
FYI: I ran into this issue while running some intensive stages that took a long time to complete. Breaking the stages up into shorter running steps overcame this problem. |
I ended up using retry on the shell provisioner and letting it run over again. It doesn't always occur, its perhaps a 50% chance it disconnects. Theres a few more mods i need to make to get it more "idempotent" but most of the things can re-run and just eats up more time... |
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
When building ubuntu 20.04 images on GCP, packer always errors with the following message
Note that this does not happen with ubuntu 18.04 or ubuntu 22.04 images, nor does it happen with 20.04 images on AWS or Azure.
Reproduction Steps
The error messages have been brought up before in the following issues:
Those issues were closed due to being unable to reproduce. The following packer code reproduces the error 100% of the time.
Packer version
1.8.5
Log Fragments and crash.log files
https://gist.github.com/spencer-cdw/af6d980d91b2d156f96d1a9c9b1485ac
The text was updated successfully, but these errors were encountered: