hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
75 stars 112 forks source link

Handshake Error (amazon ebs) #386

Closed msuzoagu closed 1 year ago

msuzoagu commented 1 year ago

Overview of the Issue

When attempting to build ami, provisioning step fails with error message failed to handshake even though ssh connection has been made.

Reproduction Steps

Plugin and Packer version

Simplified Packer Buildfile

Operating system and Environment details

Local Machine: macOS Ventura

Remote:

Log Fragments and crash.log files

msuzoagu commented 1 year ago

see workaround

lbajolet-hashicorp commented 1 year ago

Hi @msuzoagu,

I can't access your gist for the template you're trying to run this build on, could you double check/re-share it?

From the logs it looks like you're using a proxy for Ansible to communicate with the instance, is that right? From what I can see, since your instance has a public IP, you probably don't need to, as the provisioner should be able to use that IP/Port to connect to your instance directly, could you try setting use_proxy = false in your Ansible config?

I'm not yet super familiar with the proxy adapter for Ansible, so I'd need to dig a bit deeper into this to understand what's happening here exactly, but I'll keep this updated.

lbajolet-hashicorp commented 1 year ago

Closing as duplicate of https://github.com/hashicorp/packer/issues/12416