Skip to content

Instantly share code, notes, and snippets.

@deric4
Last active March 24, 2020 06:17
Show Gist options
  • Save deric4/2816ef87ccc67a2aa2fdb8553a5dcd11 to your computer and use it in GitHub Desktop.
Save deric4/2816ef87ccc67a2aa2fdb8553a5dcd11 to your computer and use it in GitHub Desktop.
packer build w/ hcl2 crash log
2020/03/23 22:42:49 [INFO] Packer version: 1.5.4 [go1.13.8 darwin amd64]
2020/03/23 22:42:49 Checking 'PACKER_CONFIG' for a config file path
2020/03/23 22:42:49 'PACKER_CONFIG' not set; checking the default config file path
2020/03/23 22:42:49 Attempting to open config file: /Users/<my user>/.packerconfig
2020/03/23 22:42:49 [WARN] Config file doesn't exist: /Users/<my user>/.packerconfig
2020/03/23 22:42:49 Setting cache directory: /Users/<my user>/projects/common-libs/packer-lw-ubuntu1604/packer_cache
2020/03/23 22:42:49 Creating plugin client for path: /usr/local/bin/packer
2020/03/23 22:42:49 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-amazon-ebs"}
2020/03/23 22:42:49 Waiting for RPC address for: /usr/local/bin/packer
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: [INFO] Packer version: 1.5.4 [go1.13.8 darwin amd64]
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Checking 'PACKER_CONFIG' for a config file path
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Attempting to open config file: /Users/<my user>/.packerconfig
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: [WARN] Config file doesn't exist: /Users/<my user>/.packerconfig
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Setting cache directory: /Users/<my user>/projects/common-libs/packer-lw-ubuntu1604/packer_cache
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: args: []string{"packer-builder-amazon-ebs"}
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Plugin address: unix /var/folders/tz/6b29s5cs3917qjr43g16z9f00000gq/T/packer-plugin939670761
2020/03/23 22:42:49 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/tz/6b29s5cs3917qjr43g16z9f00000gq/T/packer-plugin939670761
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Waiting for connection...
2020/03/23 22:42:49 packer-builder-amazon-ebs plugin: Serving a plugin connection...
2020/03/23 22:42:49 waiting for all plugin processes to complete...
2020/03/23 22:42:49 /usr/local/bin/packer: plugin process exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x43e9bb6]
goroutine 1 [running]:
github.com/zclconf/go-cty/cty.Type.Equals(...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/azr/[email protected]/cty/type.go:39
github.com/zclconf/go-cty/cty/convert.Convert(0x0, 0x0, 0x0, 0x0, 0x84a8ba0, 0xc00062bf58, 0x0, 0x0, 0x0, 0x44ae6e1, ...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/azr/[email protected]/cty/convert/public.go:43 +0x26
github.com/hashicorp/hcl/v2/hcldec.(*AttrSpec).decode(0xc00064fad0, 0xc0004021e0, 0x0, 0x0, 0x0, 0xc0002b3740, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/hashicorp/hcl/[email protected]/hcldec/spec.go:207 +0x312
github.com/hashicorp/hcl/v2/hcldec.ObjectSpec.decode(0xc0004a2000, 0xc0004021e0, 0x0, 0x0, 0x0, 0xc0002b3740, 0xc000684dd0, 0x402f3c1, 0x7eb1e00, 0xc000684dd0, ...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/hashicorp/hcl/[email protected]/hcldec/spec.go:79 +0x238
github.com/hashicorp/hcl/v2/hcldec.decode(0x84a7de0, 0xc00016abb0, 0x0, 0x0, 0x0, 0xc0002b3740, 0x84a8aa0, 0xc0004a2000, 0x49d7f00, 0x8484520, ...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/hashicorp/hcl/[email protected]/hcldec/decode.go:21 +0x118
github.com/hashicorp/hcl/v2/hcldec.Decode(...)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/hashicorp/hcl/[email protected]/hcldec/public.go:15
github.com/hashicorp/packer/hcl2template.decodeHCL2Spec(0x84a7de0, 0xc00016abb0, 0xc0002b3740, 0xda86ed0, 0xc00040a0a0, 0x0, 0x0, 0x0, 0xc00007b000, 0xda10460, ...)
/private/tmp/packer-20200215-62787-y95gm9/hcl2template/decode.go:17 +0xa0
github.com/hashicorp/packer/hcl2template.(*Parser).startBuilder(0xc0005ff370, 0xc0002ab140, 0xc0002b3740, 0xc00023a108, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/packer-20200215-62787-y95gm9/hcl2template/types.source.go:54 +0x2e4
github.com/hashicorp/packer/hcl2template.(*Parser).getBuilds(0xc000685370, 0xc0001b4b40, 0x0, 0x0, 0xc0001b4b40, 0x0, 0x0, 0x0)
/private/tmp/packer-20200215-62787-y95gm9/hcl2template/types.packer_config.go:104 +0x1d3
github.com/hashicorp/packer/hcl2template.(*Parser).Parse(0xc0005ff370, 0x7ffeefbff14c, 0x1, 0x0, 0xc00012e1a0, 0xc0005ff330, 0x40d95ed, 0x7ffeefbff14c, 0x1, 0x84c3200)
/private/tmp/packer-20200215-62787-y95gm9/hcl2template/types.packer_config.go:167 +0xd1
github.com/hashicorp/packer/command.(*BuildCommand).GetBuildsFromHCL(0xc000215e90, 0x7ffeefbff14c, 0x1, 0x0, 0x0, 0xc00007b000, 0x1)
/private/tmp/packer-20200215-62787-y95gm9/command/build.go:107 +0x123
github.com/hashicorp/packer/command.(*BuildCommand).GetBuilds(0xc000215e90, 0x7ffeefbff14c, 0x1, 0x1, 0x1, 0x7fffffffffffffff, 0x0)
/private/tmp/packer-20200215-62787-y95gm9/command/build.go:136 +0x543
github.com/hashicorp/packer/command.(*BuildCommand).RunContext(0xc000215e90, 0x84a7760, 0xc0000a02c0, 0xc0000c61a0, 0x1, 0x1, 0xc0000a02c0)
/private/tmp/packer-20200215-62787-y95gm9/command/build.go:185 +0xca
github.com/hashicorp/packer/command.(*BuildCommand).Run(0xc000215e90, 0xc0000c61a0, 0x1, 0x1, 0x0)
/private/tmp/packer-20200215-62787-y95gm9/command/build.go:55 +0x201
github.com/mitchellh/cli.(*CLI).Run(0xc000556280, 0xc000556280, 0x1, 0x1)
/private/tmp/packer-20200215-62787-y95gm9/.brew_home/go/pkg/mod/github.com/mitchellh/[email protected]/cli.go:255 +0x1da
main.wrappedMain(0x0)
/private/tmp/packer-20200215-62787-y95gm9/main.go:238 +0x853
main.realMain(0x0)
/private/tmp/packer-20200215-62787-y95gm9/main.go:124 +0xbb
main.main()
/private/tmp/packer-20200215-62787-y95gm9/main.go:34 +0x22
2020/03/23 23:15:51 [INFO] Packer version: 1.5.4 [go1.13.8 darwin amd64]
2020/03/23 23:15:51 Checking 'PACKER_CONFIG' for a config file path
2020/03/23 23:15:51 'PACKER_CONFIG' not set; checking the default config file path
2020/03/23 23:15:51 Attempting to open config file: /Users/<my user>/.packerconfig
2020/03/23 23:15:51 [WARN] Config file doesn't exist: /Users/<my user>/.packerconfig
2020/03/23 23:15:51 Setting cache directory: /Users/dericmiguel/projects/common-libs/issue/packer_cache
2020/03/23 23:15:51 Creating plugin client for path: /usr/local/bin/packer
2020/03/23 23:15:51 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-amazon-ebs"}
2020/03/23 23:15:51 Waiting for RPC address for: /usr/local/bin/packer
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: [INFO] Packer version: 1.5.4 [go1.13.8 darwin amd64]
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Checking 'PACKER_CONFIG' for a config file path
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: 'PACKER_CONFIG' not set; checking the default config file path
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Attempting to open config file: /Users/<my user>/.packerconfig
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: [WARN] Config file doesn't exist: /Users/<my user>/.packerconfig
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Setting cache directory: /Users/dericmiguel/projects/common-libs/issue/packer_cache
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: args: []string{"packer-builder-amazon-ebs"}
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Plugin address: unix /var/folders/tz/6b29s5cs3917qjr43g16z9f00000gq/T/packer-plugin024335925
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Waiting for connection...
2020/03/23 23:15:51 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/tz/6b29s5cs3917qjr43g16z9f00000gq/T/packer-plugin024335925
2020/03/23 23:15:51 packer-builder-amazon-ebs plugin: Serving a plugin connection...
Error: 2 error(s) occurred:
* ami_name must be specified
* ami_name must be between 3 and 128 characters long
* ami_name must be specified
on sources.pkr.hcl line 1, in source "amazon-ebs" "ubuntu1604":
1: source "amazon-ebs" "ubuntu1604" {
2020/03/23 23:15:51 Build debug mode: false
2020/03/23 23:15:51 Force build: false
2020/03/23 23:15:51 On error:
2020/03/23 23:15:51 Waiting on builds to complete...
* ami_name must be between 3 and 128 characters long
==> Builds finished but no artifacts were created.
on sources.pkr.hcl line 1, in source "amazon-ebs" "ubuntu1604":
1: source "amazon-ebs" "ubuntu1604" {
==> Builds finished but no artifacts were created.
2020/03/23 23:15:51 [INFO] (telemetry) Finalizing.
2020/03/23 23:15:52 waiting for all plugin processes to complete...
2020/03/23 23:15:52 /usr/local/bin/packer: plugin process exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment