Amazon builder never notices that instance is ready

38 views
Skip to first unread message

adam....@getflywheel.com

unread,
Dec 14, 2017, 4:41:17 PM12/14/17
to Packer
Hey everyone, I'm trying to get a basic packer build working and it keeps timing out waiting for the instance to become ready.

Packer: 1.1.3
OS Version: macOS 10.13.1
Go: 1.9.2 darwin/amd64

I am able to successfully SSH into the machine using the debug keypair.

Here's the config I'm using:

{
  "variables": {
    "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}"
  },
  "builders": [{
    "type": "amazon-ebs",
    "access_key": "{{user `aws_access_key`}}",
    "secret_key": "{{user `aws_secret_key`}}",
    "region": "us-east-1",
    "source_ami_filter": {
      "filters": {
        "virtualization-type": "hvm",
        "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
        "root-device-type": "ebs"
      },
      "owners": ["099720109477"],
      "most_recent": true
    },
    "instance_type": "t2.micro",
    "subnet_id": "subnet-1128b52b",
    "security_group_id": "sg-3116b34c",
    "ssh_username": "ubuntu",
    "ami_name": "redis-proxy {{timestamp}}"
  }]
}

gist of my log output: https://gist.github.com/alassek/b15a7b0e802dc628d223b569c054a6ba

Am I missing something obvious here?

Ian W

unread,
Dec 14, 2017, 11:16:56 PM12/14/17
to Packer
You are seeing the exact same thing that I am seeing. I have yet to figure out what is going on. You can see my post here. I have provided a bit more information so hopefully can get to the bottom of it. It is interesting to note that you are on macOS and I am on Ubuntu and we both see the same problem. 

Alvaro Miranda Aguilera

unread,
Dec 15, 2017, 4:27:28 AM12/15/17
to packe...@googlegroups.com
Hello Adam

Are you building from outside the AWS subnet network? ie from computer at home/work?

Does your subnet have public IPV4 on by default?



Or you can test adding: associate_public_ip_address 

Alvaro.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/389a432e-531d-4aa8-b69b-2cbc23c05b67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Rickard von Essen

unread,
Dec 15, 2017, 5:12:03 AM12/15/17
to packe...@googlegroups.com
Networking shouldn't matter since this seems to be a problem with that packer don't "see" that the instance is in running state. See the other referenced thread which contains quite much information. 

Adam Lassek

unread,
Dec 15, 2017, 11:03:57 AM12/15/17
to packe...@googlegroups.com
Yes, it has public IPv4 addresses, like I said before I can SSH into it just fine using the debug key pair.
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/WF48guOnI7Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ew_JKOxodx-6EA-Py07D8m-G9LRsU3Ek2YXUhwsg0%3DNAA%40mail.gmail.com.
ii_jb7pkfhn0_160597e30e0c64e3

Matthew Hooker

unread,
Dec 15, 2017, 2:35:41 PM12/15/17
to packe...@googlegroups.com
cross-posting from the other thread:

Thanks for the report. We recently changed how we wait for instances to become ready, and I think this is related to that. This will be fixed in the next version of packer. In the meantime, can you use 1.1.2? If there's a feature in 1.1.3 that you need, I think I can probably provide a patch that should fix this for you. Tracking here https://github.com/hashicorp/packer/issues/5705#issuecomment-352082197

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

--
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 a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/WF48guOnI7Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.

--
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/CABbGsNDtxiD7fzwjeF7Rix3LYOSxQpQhxxoEeWNWw3JPqjCFSQ%40mail.gmail.com.
ii_jb7pkfhn0_160597e30e0c64e3

Adam Lassek

unread,
Dec 15, 2017, 2:54:46 PM12/15/17
to packe...@googlegroups.com
I can confirm that 1.1.2 works with Amazon, so I will do that. Thanks for the help.

Matthew Hooker

unread,
Dec 19, 2017, 1:17:58 PM12/19/17
to packe...@googlegroups.com
Hi Adam,

Glad you got it working by downgrading to 1.1.2. Out of curiosity, did you have the IAM permission ec2:DescribeInstanceStatus? We added a new permissions requirement (see context at https://github.com/hashicorp/packer/issues/5694), and adding that I think might fix your builds in 1.1.3. If you have the opportunity to test that, I'd be grateful to know if that's the root cause, or if there is another issue.

Thanks,
--Matt Hooker

Reply all
Reply to author
Forward
0 new messages