jakobadam / packer-qemu-templates

Packer qemu templates
Mozilla Public License 2.0
331 stars 175 forks source link

Waiting for ssh to become available #34

Open karthikprabhu17 opened 6 years ago

karthikprabhu17 commented 6 years ago

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 commented 6 years ago

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

jakobadam commented 6 years ago

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

karthikprabhu17 commented 6 years ago

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

jakobadam commented 6 years ago

Works for me. Can you try without headless?

mikonoid commented 6 years ago

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

Data-drone commented 6 years ago

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...

justinhauer commented 4 years ago

@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 commented 4 years ago

@jakobadam

aviadtamir commented 3 years ago

having the same issue both on mac and ubuntu server 18.04