hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder

Home Page:https://www.packer.io/docs/builders/amazon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handshake Error (amazon ebs)

msuzoagu opened this issue · comments

commented

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

  • 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

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