Packer SSH handshake failed

187 views
Skip to first unread message

dhatc...@gmail.com

unread,
Dec 12, 2018, 10:45:04 PM12/12/18
to Packer
Hi,

Im getting ssh connectivity error while building RHEL 7.5 please find the below logs. my packer vm running in vmware esxi  server. please suggest.

Packer version:
packer.io --version
1.3.3


2018/12/13 06:24:20 packer: 2018/12/13 06:24:20 [INFO] Attempting SSH connection...
2018/12/13 06:24:20 packer: 2018/12/13 06:24:20 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:24:20 packer: 2018/12/13 06:24:20 [DEBUG] handshaking with SSH
2018/12/13 06:25:20 packer: 2018/12/13 06:25:20 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:25:27 packer: 2018/12/13 06:25:27 [INFO] Attempting SSH connection...
2018/12/13 06:25:27 packer: 2018/12/13 06:25:27 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:25:27 packer: 2018/12/13 06:25:27 [DEBUG] handshaking with SSH
2018/12/13 06:26:27 packer: 2018/12/13 06:26:27 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:26:34 packer: 2018/12/13 06:26:34 [INFO] Attempting SSH connection...
2018/12/13 06:26:34 packer: 2018/12/13 06:26:34 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:26:34 packer: 2018/12/13 06:26:34 [DEBUG] handshaking with SSH
2018/12/13 06:27:34 packer: 2018/12/13 06:27:34 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:27:41 packer: 2018/12/13 06:27:41 [INFO] Attempting SSH connection...
2018/12/13 06:27:41 packer: 2018/12/13 06:27:41 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:27:41 packer: 2018/12/13 06:27:41 [DEBUG] handshaking with SSH
2018/12/13 06:28:41 packer: 2018/12/13 06:28:41 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:28:48 packer: 2018/12/13 06:28:48 [INFO] Attempting SSH connection...
2018/12/13 06:28:48 packer: 2018/12/13 06:28:48 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:28:48 packer: 2018/12/13 06:28:48 [DEBUG] handshaking with SSH
2018/12/13 06:29:48 packer: 2018/12/13 06:29:48 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:29:55 packer: 2018/12/13 06:29:55 [INFO] Attempting SSH connection...
2018/12/13 06:29:55 packer: 2018/12/13 06:29:55 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:29:55 packer: 2018/12/13 06:29:55 [DEBUG] handshaking with SSH
2018/12/13 06:30:55 packer: 2018/12/13 06:30:55 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:31:02 packer: 2018/12/13 06:31:02 [INFO] Attempting SSH connection...
2018/12/13 06:31:02 packer: 2018/12/13 06:31:02 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:31:02 packer: 2018/12/13 06:31:02 [DEBUG] handshaking with SSH
2018/12/13 06:32:02 packer: 2018/12/13 06:32:02 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:32:09 packer: 2018/12/13 06:32:09 [INFO] Attempting SSH connection...
2018/12/13 06:32:09 packer: 2018/12/13 06:32:09 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:32:09 packer: 2018/12/13 06:32:09 [DEBUG] handshaking with SSH
2018/12/13 06:33:09 packer: 2018/12/13 06:33:09 [DEBUG] SSH handshake err: Timeout during SSH handshake
2018/12/13 06:33:16 packer: 2018/12/13 06:33:16 [INFO] Attempting SSH connection...
2018/12/13 06:33:16 packer: 2018/12/13 06:33:16 [DEBUG] reconnecting to TCP connection for SSH
2018/12/13 06:33:16 packer: 2018/12/13 06:33:16 [DEBUG] handshaking with SSH
2018/12/13 06:34:16 packer: 2018/12/13 06:34:16 [DEBUG] SSH handshake err: Timeout during SSH handshake

Rickard von Essen

unread,
Dec 13, 2018, 1:13:55 AM12/13/18
to packe...@googlegroups.com
Please provide the template, Kickstart file, and scripts you are using. And the full log when running a build with PACKER_LOG=1.

What do you see if you open the VM's console in VMware while packer tries to connect? (screenshot) 

--
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/3c3b9530-743e-4253-a01f-ccf2b9526930%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dhatchinamoorthy M

unread,
Dec 13, 2018, 1:58:46 AM12/13/18
to packe...@googlegroups.com
Hi Rickard,

Please find the attached logs and templates,json.

packer_rhel.txt
rhel7-ks.cfg
RHEL75.json

Rickard von Essen

unread,
Dec 13, 2018, 7:38:11 AM12/13/18
to packe...@googlegroups.com
So you are running a VM on ESXi which run QEMU inside? Have you tried to run this on a non-virtualized system with only QEMU? What do you see in the VM console for QEMU?

Dhatchinamoorthy M

unread,
Dec 17, 2018, 3:44:06 AM12/17/18
to packe...@googlegroups.com
for with only QEMU its not working. is there any way to clear this ssh issue.



Dhatchinamoorthy M

unread,
Dec 17, 2018, 5:10:20 AM12/17/18
to packe...@googlegroups.com
While building process im getting this error this could be issue for ssh issue.
image.png

Dhatchinamoorthy M

unread,
Dec 19, 2018, 2:12:41 AM12/19/18
to packe...@googlegroups.com
Hi Rickard,

When i connect the build image through VNC its struck on operating system installation. packer not doing automatic installation.

Rickard von Essen

unread,
Dec 21, 2018, 5:05:34 PM12/21/18
to packe...@googlegroups.com
You probably need to adjust the settings in your automatic install for qemu or adjust your qemu settings. 

Dhatchinamoorthy M

unread,
Jan 16, 2019, 1:36:26 AM1/16/19
to packe...@googlegroups.com

Hi Rickard


If i create vm using kvm, im able to create it but using packer still ssh fails. could you please help on network settings in host vm(which is running in vmware esx). 



Rickard von Essen

unread,
Jan 17, 2019, 7:46:12 AM1/17/19
to packe...@googlegroups.com
Provide which steps you have taken to troubleshoot this issue. How did you check the network?

Dhatchinamoorthy M

unread,
Jan 17, 2019, 8:04:47 AM1/17/19
to packe...@googlegroups.com
Hi Rickard,

During build Qemu emulator coming up and linux services are showing stop/start but when its tries to download kickstart file which is serving by 10.0.2.2 ip not able to reach. I dont find this IP in my network by default its serving http in this address. could please tell me how to change the 10.0.2.2 ip and server http in different ips.


thanks,
Dhatchina

Alvaro Miranda Aguilera

unread,
Jan 17, 2019, 2:11:23 PM1/17/19
to packe...@googlegroups.com
i did reply in the other thread you shared

seems your host is misconfigured and its confusing packer

you have an ip 10.X in the loopback interface, that shouldn't be there

alvaro


For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages