Skip to content

Instantly share code, notes, and snippets.

@tgross
Last active May 13, 2019 15:54
Show Gist options
  • Save tgross/8ba5b259351f93b2f9982414ee9369e7 to your computer and use it in GitHub Desktop.
Save tgross/8ba5b259351f93b2f9982414ee9369e7 to your computer and use it in GitHub Desktop.
panic with nil map
==> amazon-ebs: Stopping the source instance...
amazon-ebs: Stopping instance
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Creating AMI OAsX7vH from instance i-REDACTED
amazon-ebs: AMI: ami-REDACTED
==> amazon-ebs: Waiting for AMI to become ready...
==> amazon-ebs: Deregistering the AMI because cancellation, error or it was temporary (encrypt_boot was set)...
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: unexpected EOF
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: unexpected EOF
==> Builds finished but no artifacts were created.
2019/05/13 15:38:36 packer: panic: assignment to entry in nil map
2019/05/13 15:38:36 packer:
2019/05/13 15:38:36 packer: goroutine 124 [running]:
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/builder/amazon/common.(*StepAMIRegionCopy).Run(0xc0003840f0, 0x352f160, 0xc000328400, 0x350f5a0, 0xc00049d800, 0x0)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/builder/amazon/common/step_ami_region_copy.go:35 +0x2ad
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/helper/multistep.(*BasicRunner).Run(0xc00049d920, 0x352f160, 0xc000328400, 0x350f5a0, 0xc00049d800)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/helper/multistep/basic_runner.go:67 +0x1ec
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/builder/amazon/ebs.(*Builder).Run(0xc0000a0e00, 0x352f160, 0xc000328400, 0x353f860, 0xc0001ba380, 0x34d38e0, 0xc000038230, 0x40b919, 0xc00049d230, 0x30, ...)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/builder/amazon/ebs/builder.go:249 +0x12d0
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc0004557d0, 0x1, 0xc000566020, 0x0, 0x0)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/packer/rpc/builder.go:109 +0x231
2019/05/13 15:38:36 packer: reflect.Value.call(0xc000096900, 0xc00000e0d8, 0x13, 0x2fdca52, 0x4, 0xc0000b0f18, 0x3, 0x3, 0xc0002fd040, 0x3, ...)
2019/05/13 15:38:36 packer: /usr/local/go/src/reflect/value.go:447 +0x461
2019/05/13 15:38:36 packer: reflect.Value.Call(0xc000096900, 0xc00000e0d8, 0x13, 0xc000631718, 0x3, 0x3, 0xc000343a40, 0xc000631730, 0x404e35)
2019/05/13 15:38:36 packer: /usr/local/go/src/reflect/value.go:308 +0xa4
2019/05/13 15:38:36 packer: net/rpc.(*service).call(0xc000092440, 0xc0000a81e0, 0xc000332260, 0xc000332270, 0xc000334500, 0xc0001ba0e0, 0x2744ac0, 0xc00056601c, 0x18a, 0x26b55a0, ...)
2019/05/13 15:38:36 packer: /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019/05/13 15:38:36 packer: created by net/rpc.(*Server).ServeCodec
2019/05/13 15:38:36 packer: /usr/local/go/src/net/rpc/server.go:481 +0x440
2019/05/13 15:38:36 [INFO] (telemetry) ending amazon-ebs
2019/05/13 15:38:36 ui error: Build 'amazon-ebs' errored: unexpected EOF
2019/05/13 15:38:36 Builds completed. Waiting on interrupt barrier...
2019/05/13 15:38:36 machine readable: error-count []string{"1"}
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
2019/05/13 15:38:36 ui error:
==> Some builds didn't complete successfully and had errors:
panic: assignment to entry in nil map
2019/05/13 15:38:36 packer:
2019/05/13 15:38:36 packer: goroutine 124 [running]:
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/builder/amazon/common.(*StepAMIRegionCopy).Run(0xc0003840f0, 0x352f160, 0xc000328400, 0x350f5a0, 0xc00049d800, 0x0)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/builder/amazon/common/step_ami_region_copy.go:35 +0x2ad
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/helper/multistep.(*BasicRunner).Run(0xc00049d920, 0x352f160, 0xc000328400, 0x350f5a0, 0xc00049d800)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/helper/multistep/basic_runner.go:67 +0x1ec
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/builder/amazon/ebs.(*Builder).Run(0xc0000a0e00, 0x352f160, 0xc000328400, 0x353f860, 0xc0001ba380, 0x34d38e0, 0xc000038230, 0x40b919, 0xc00049d230, 0x30, ...)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/builder/amazon/ebs/builder.go:249 +0x12d0
2019/05/13 15:38:36 packer: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc0004557d0, 0x1, 0xc000566020, 0x0, 0x0)
2019/05/13 15:38:36 packer: /Users/mmarsh/go/src/github.com/hashicorp/packer/packer/rpc/builder.go:109 +0x231
2019/05/13 15:38:36 packer: reflect.Value.call(0xc000096900, 0xc00000e0d8, 0x13, 0x2fdca52, 0x4, 0xc0000b0f18, 0x3, 0x3, 0xc0002fd040, 0x3, ...)
2019/05/13 15:38:36 packer: /usr/local/go/src/reflect/value.go:447 +0x461
2019/05/13 15:38:36 packer: reflect.Value.Call(0xc000096900, 0xc00000e0d8, 0x13, 0xc000631718, 0x3, 0x3, 0xc000343a40, 0xc000631730, 0x404e35)
2019/05/13 15:38:36 packer: /usr/local/go/src/reflect/value.go:308 +0xa4
2019/05/13 15:38:36 packer: net/rpc.(*service).call(0xc000092440, 0xc0000a81e0, 0xc000332260, 0xc000332270, 0xc000334500, 0xc0001ba0e0, 0x2744ac0, 0xc00056601c, 0x18a, 0x26b55a0, ...)
2019/05/13 15:38:36 packer: /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019/05/13 15:38:36 packer: created by net/rpc.(*Server).ServeCodec
2019/05/13 15:38:36 packer: /usr/local/go/src/net/rpc/server.go:481 +0x440
2019/05/13 15:38:36 [INFO] (telemetry) ending amazon-ebs
2019/05/13 15:38:36 ui error: Build 'amazon-ebs' errored: unexpected EOF
2019/05/13 15:38:36 Builds completed. Waiting on interrupt barrier...
2019/05/13 15:38:36 machine readable: error-count []string{"1"}
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
2019/05/13 15:38:36 ui error:
==> Some builds didn't complete successfully and had errors:
2019/05/13 15:38:36 machine readable: amazon-ebs,error []string{"unexpected EOF"}
2019/05/13 15:38:36 ui error: --> amazon-ebs: unexpected EOF
2019/05/13 15:38:36 ui:
==> Builds finished but no artifacts were created.
2019/05/13 15:38:36 [INFO] (telemetry) Finalizing.
2019/05/13 15:38:36 waiting for all plugin processes to complete...
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
2019/05/13 15:38:36 machine readable: amazon-ebs,error []string{"unexpected EOF"}
2019/05/13 15:38:36 ui error: --> amazon-ebs: unexpected EOF
==> Builds finished but no artifacts were created.
2019/05/13 15:38:36 [INFO] (telemetry) Finalizing.
2019/05/13 15:38:36 waiting for all plugin processes to complete...
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
2019/05/13 15:38:36 /usr/local/bin/packer: plugin process exited
!!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Packer crashed! This is always indicative of a bug within Packer.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Packer[1] so that we can fix this.
[1]: https://github.com/hashicorp/packer/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! PACKER CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
{
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "amzn2-ami-ecs-hvm-2.*-x86_64-ebs",
"root-device-type": "ebs"
},
"owners": [
"amazon"
],
"most_recent": true
},
"instance_type": "c5.large",
"ssh_username": "ec2-user",
"ami_name": "packer_test{{isotime \"2006_01_02\"}}_{{timestamp}}",
"encrypt_boot": true,
"kms_key_id": "arn:aws:kms:us-east-1:REDACTED:key/REDACTED",
}
],
"provisioners": [
{
"type": "shell",
"inline": ["echo hello"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment