Waiting for SSH - it appears the SSH connect/retry loop is not behaving properly

453 views
Skip to first unread message

Kevin Hannan

unread,
Jul 3, 2018, 10:31:04 AM7/3/18
to Packer


Here is a link to a Gist that contains the packer template, vars file, kickstart, console and debug log.


Thanks for the extra pair of eyes on this.

Kevin

----
This is a portion of the packer debug log for a run I just made.  Notice the 'Attempt SSH connection....' tries about every 7 seconds for 7 attempts then hangs.
Connection attempts are made from 10:07:19 to 10:08:32 then no more.

The SSH timeout is 7 minutes..  I stopped the log tail at 10:14:40 which was past the 7 minutes.  Packer should have terminated the connection loop at 7 minutes and failed the build.  But packer is blocked at this point.  I checked again at 10:23:17 just in case the initial check was too close to the 7 minute mark.  Even 15 minutes later it was still blocked.

The full log in the gist above shows the connection attempt was made only once before blocking.  Note the last log entry was 00:44:19 while I terminated the log tail at 09:10:53 - which is well beyond the 7 minute mark.


2018/07/03 10:07:19 packer-builder-virtualbox-iso: 2018/07/03 10:07:19 [INFO] Waiting for SSH, up to timeout: 7m0s

2018/07/03 10:07:19 ui: ==> virtualbox-iso: Waiting for SSH to become available...

2018/07/03 10:07:19 packer-builder-virtualbox-iso: 2018/07/03 10:07:19 [INFO] Attempting SSH connection...

2018/07/03 10:07:19 packer-builder-virtualbox-iso: 2018/07/03 10:07:19 reconnecting to TCP connection for SSH

2018/07/03 10:07:19 packer-builder-virtualbox-iso: 2018/07/03 10:07:19 handshaking with SSH

2018/07/03 10:07:50 packer-builder-virtualbox-iso: 2018/07/03 10:07:50 handshake error: ssh: handshake failed: EOF

2018/07/03 10:07:50 packer-builder-virtualbox-iso: 2018/07/03 10:07:50 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:07:57 packer-builder-virtualbox-iso: 2018/07/03 10:07:57 [INFO] Attempting SSH connection...

2018/07/03 10:07:57 packer-builder-virtualbox-iso: 2018/07/03 10:07:57 reconnecting to TCP connection for SSH

2018/07/03 10:07:57 packer-builder-virtualbox-iso: 2018/07/03 10:07:57 handshaking with SSH

2018/07/03 10:07:57 packer-builder-virtualbox-iso: 2018/07/03 10:07:57 handshake error: ssh: handshake failed: EOF

2018/07/03 10:07:57 packer-builder-virtualbox-iso: 2018/07/03 10:07:57 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:08:04 packer-builder-virtualbox-iso: 2018/07/03 10:08:04 [INFO] Attempting SSH connection...

2018/07/03 10:08:04 packer-builder-virtualbox-iso: 2018/07/03 10:08:04 reconnecting to TCP connection for SSH

2018/07/03 10:08:04 packer-builder-virtualbox-iso: 2018/07/03 10:08:04 handshaking with SSH

2018/07/03 10:08:04 packer-builder-virtualbox-iso: 2018/07/03 10:08:04 handshake error: ssh: handshake failed: EOF

2018/07/03 10:08:04 packer-builder-virtualbox-iso: 2018/07/03 10:08:04 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:08:11 packer-builder-virtualbox-iso: 2018/07/03 10:08:11 [INFO] Attempting SSH connection...

2018/07/03 10:08:11 packer-builder-virtualbox-iso: 2018/07/03 10:08:11 reconnecting to TCP connection for SSH

2018/07/03 10:08:11 packer-builder-virtualbox-iso: 2018/07/03 10:08:11 handshaking with SSH

2018/07/03 10:08:11 packer-builder-virtualbox-iso: 2018/07/03 10:08:11 handshake error: ssh: handshake failed: EOF

2018/07/03 10:08:11 packer-builder-virtualbox-iso: 2018/07/03 10:08:11 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:08:18 packer-builder-virtualbox-iso: 2018/07/03 10:08:18 [INFO] Attempting SSH connection...

2018/07/03 10:08:18 packer-builder-virtualbox-iso: 2018/07/03 10:08:18 reconnecting to TCP connection for SSH

2018/07/03 10:08:18 packer-builder-virtualbox-iso: 2018/07/03 10:08:18 handshaking with SSH

2018/07/03 10:08:18 packer-builder-virtualbox-iso: 2018/07/03 10:08:18 handshake error: ssh: handshake failed: EOF

2018/07/03 10:08:18 packer-builder-virtualbox-iso: 2018/07/03 10:08:18 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:08:25 packer-builder-virtualbox-iso: 2018/07/03 10:08:25 [INFO] Attempting SSH connection...

2018/07/03 10:08:25 packer-builder-virtualbox-iso: 2018/07/03 10:08:25 reconnecting to TCP connection for SSH

2018/07/03 10:08:25 packer-builder-virtualbox-iso: 2018/07/03 10:08:25 handshaking with SSH

2018/07/03 10:08:25 packer-builder-virtualbox-iso: 2018/07/03 10:08:25 handshake error: ssh: handshake failed: EOF

2018/07/03 10:08:25 packer-builder-virtualbox-iso: 2018/07/03 10:08:25 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

2018/07/03 10:08:32 packer-builder-virtualbox-iso: 2018/07/03 10:08:32 [INFO] Attempting SSH connection...

2018/07/03 10:08:32 packer-builder-virtualbox-iso: 2018/07/03 10:08:32 reconnecting to TCP connection for SSH

2018/07/03 10:08:32 packer-builder-virtualbox-iso: 2018/07/03 10:08:32 handshaking with SSH

2018/07/03 10:08:32 packer-builder-virtualbox-iso: 2018/07/03 10:08:32 handshake error: ssh: handshake failed: EOF

2018/07/03 10:08:32 packer-builder-virtualbox-iso: 2018/07/03 10:08:32 [DEBUG] SSH handshake err: ssh: handshake failed: EOF

^C

✘-INT ~/projects/container/OpenLCB-container/packer [initial-setup L|✚ 9…10

10:14 $ date

Tue Jul  3 10:14:40 EDT 2018

Rickard von Essen

unread,
Jul 3, 2018, 10:48:04 AM7/3/18
to packe...@googlegroups.com
Your install is broken. Remove your current install directory and
reinstall from https://www.packer.io/downloads.html. Be sure to read
the note about upgrading from < 0.9.0.

See https://github.com/hashicorp/packer/commit/1994793126f948dd99c8acdd35f999df0c6ab342
> --
> This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/b89c6db8-c275-40a4-9582-44deb3a20508%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Kevin Hannan

unread,
Jul 4, 2018, 11:40:19 AM7/4/18
to packe...@googlegroups.com
Thanks Rickard that fixed it. I guess I missed the note about removing the plugins... I upgraded from something like 0.8.12 all the way to current. Must have skipped the notes at 0.9...

Thanks again,
Kevin P. Hannan
Marietta, GA
> To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt8KnSdnTS7yqsDrXZQwCZj92m%2B0e5DfrzDmCJ9g%3Dyjrng%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages