Handshake Error (amazon ebs)
msuzoagu opened this issue · comments
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
- PACKER_LOG=1 packer build simple packer template
Plugin and Packer version
- Packer v1.8.7
- Packer-Plugin-Amazon v1.2.5
Simplified Packer Buildfile
Operating system and Environment details
Local Machine: macOS Ventura
Remote:
aws_name = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20230325"
ami_id = "ami-0a695f0d95cefc163"
ami_owners = ["099720109477"]
ssh_username = "ubuntu"
Log Fragments and crash.log files
see workaround
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.
Closing as duplicate of hashicorp/packer#12416