packer-qemu-templates icon indicating copy to clipboard operation
packer-qemu-templates copied to clipboard

Waiting for ssh to become available

Open karthikprabhu17 opened this issue 6 years ago • 9 comments

Host: Ubuntu Server 16.04

Ran the packer build -var-file=ubuntu1604.json -var headless=true ubuntu-vagrant.json with headless option as it was giving Qemu stderr: Could not initialize SDL(No available video device) - exiting error

But after that getting waiting for ssh to become available.

karthikprabhu17 avatar Mar 06 '18 06:03 karthikprabhu17

2018/03/06 06:42:31 packer: 2018/03/06 06:42:31 [INFO] Waiting for SSH, up to timeout: 2h46m40s 2018/03/06 06:42:31 ui: ==> qemu: Waiting for SSH to become available... ==> qemu: Waiting for SSH to become available... 2018/03/06 06:42:31 packer: 2018/03/06 06:42:31 [INFO] Attempting SSH connection... 2018/03/06 06:42:31 packer: 2018/03/06 06:42:31 reconnecting to TCP connection for SSH 2018/03/06 06:42:31 packer: 2018/03/06 06:42:31 handshaking with SSH 2018/03/06 06:43:07 packer: 2018/03/06 06:43:07 handshake error: ssh: handshake failed: read tcp 127.0.0.1:53112->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:07 packer: 2018/03/06 06:43:07 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:53112->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:14 packer: 2018/03/06 06:43:14 [INFO] Attempting SSH connection... 2018/03/06 06:43:14 packer: 2018/03/06 06:43:14 reconnecting to TCP connection for SSH 2018/03/06 06:43:14 packer: 2018/03/06 06:43:14 handshaking with SSH 2018/03/06 06:43:14 packer: 2018/03/06 06:43:14 handshake error: ssh: handshake failed: read tcp 127.0.0.1:53148->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:14 packer: 2018/03/06 06:43:14 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:53148->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:21 packer: 2018/03/06 06:43:21 [INFO] Attempting SSH connection... 2018/03/06 06:43:21 packer: 2018/03/06 06:43:21 reconnecting to TCP connection for SSH 2018/03/06 06:43:21 packer: 2018/03/06 06:43:21 handshaking with SSH 2018/03/06 06:43:21 packer: 2018/03/06 06:43:21 handshake error: ssh: handshake failed: read tcp 127.0.0.1:53156->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:21 packer: 2018/03/06 06:43:21 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:53156->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:28 packer: 2018/03/06 06:43:28 [INFO] Attempting SSH connection... 2018/03/06 06:43:28 packer: 2018/03/06 06:43:28 reconnecting to TCP connection for SSH 2018/03/06 06:43:28 packer: 2018/03/06 06:43:28 handshaking with SSH 2018/03/06 06:43:28 packer: 2018/03/06 06:43:28 handshake error: ssh: handshake failed: read tcp 127.0.0.1:53168->127.0.0.1:2923: read: connection reset by peer 2018/03/06 06:43:28 packer: 2018/03/06 06:43:28 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:53168->127.0.0.1:2923: read: connection reset by peer

karthikprabhu17 avatar Mar 06 '18 06:03 karthikprabhu17

The ISO link was broken for me. Have updated from 16.04.3 -> 16.04.4. Please try again...

jakobadam avatar Mar 06 '18 20:03 jakobadam

I pull master and tried again with headless=true. I still get the SSH handshake err: ssh: handshake mentioned in description

karthikprabhu17 avatar Mar 07 '18 01:03 karthikprabhu17

Works for me. Can you try without headless?

jakobadam avatar Mar 07 '18 11:03 jakobadam

Hello! I've got the same issue. Tried with "headless" and without, no result.

mikonoid avatar Mar 26 '18 18:03 mikonoid

seem to be getting same issue. Is it that we need to edit the sshd_config to allow for root login (PermitRootLogin)?

see: https://github.com/DOMjudge/domjudge-packaging/blob/master/live-image/preseed.cfg lines 90 and below

building on another fresh ubuntu 16.04 server worked. building on mac would cause this issue. hmm...

Data-drone avatar Apr 22 '18 10:04 Data-drone

@Data-drone @mikonoid @karthikprabhu17 I am experiencing the same issues and you all described. Were any of you able to get past this? If so please elaborate how.

justinhauer avatar Jul 29 '19 19:07 justinhauer

@jakobadam

justinhauer avatar Jul 29 '19 19:07 justinhauer

having the same issue both on mac and ubuntu server 18.04

aviadtamir avatar May 30 '21 10:05 aviadtamir