Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'azure-arm' errored: unexpected EOF (Packer v.1.4.2) #7816

Closed
dportok opened this issue Jun 29, 2019 · 19 comments

Comments

@dportok
Copy link

commented Jun 29, 2019

I am trying to build a Linux Managed Image in Azure. I use the following setup:

The exact same template and script works with Packer 1.4.1

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

Hmm. I can't reproduce. Can you give me the full logs? your gistfile seems to only contain the first 90 lines.

@robertlelliott

This comment has been minimized.

Copy link

commented Jul 1, 2019

I am also seeing this error for Windows 2012R2- it crashes during this phase every time.

2019/07/01 17:41:36 ui: ==> azure-arm: Deleting the temporary OS disk ...
2019/07/01 17:41:36 ui: ==> azure-arm: -> OS Disk : skipping, managed disk was used...
2019/07/01 17:41:36 ui: ==> azure-arm: Deleting the temporary Additional disk ...
2019/07/01 17:41:36 ui: ==> azure-arm: -> Additional Disk : skipping, managed disk was used...
2019/07/01 17:41:36 packer.exe: panic: interface conversion: interface {} is nil, not string
2019/07/01 17:41:36 packer.exe:
2019/07/01 17:41:36 packer.exe: goroutine 111 [running]:
2019/07/01 17:41:36 packer.exe: github.com/hashicorp/packer/builder/azure/arm.(*Builder).Run(0xc000376a50, 0x3d01f80, 0xc000319040, 0x3d1a040, 0xc0004578c0, 0x3ca1600, 0xc000188d40, 0x0, 0x0, 0x0, ...)
2019/07/01 17:41:36 packer.exe: /Users/mmarsh/Projects/packer/builder/azure/arm/builder.go:305 +0x438b
2019/07/01 17:41:36 packer.exe: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc000377980, 0x1, 0xc000434030, 0x0, 0x0)
2019/07/01 17:41:36 packer.exe: /Users/mmarsh/Projects/packer/packer/rpc/builder.go:109 +0x238
2019/07/01 17:41:36 packer.exe: reflect.Value.call(0xc00027ac60, 0xc000324330, 0x13, 0x374d0d9, 0x4, 0xc00021bf18, 0x3, 0x3, 0xc000272100, 0xc00021bee8, ...)
2019/07/01 17:41:36 packer.exe: /usr/local/go/src/reflect/value.go:447 +0x468
2019/07/01 17:41:36 packer.exe: reflect.Value.Call(0xc00027ac60, 0xc000324330, 0x13, 0xc00021bf18, 0x3, 0x3, 0xc0000a6c60, 0xc00021bf30, 0x404c55)
2019/07/01 17:41:36 packer.exe: /usr/local/go/src/reflect/value.go:308 +0xab
2019/07/01 17:41:36 packer.exe: net/rpc.(*service).call(0xc000072e00, 0xc000330460, 0xc00041b3a8, 0xc00041b3b0, 0xc00032c780, 0xc000274440, 0x2d283e0, 0xc00043402c, 0x18a, 0x2c84600, ...)
2019/07/01 17:41:36 packer.exe: /usr/local/go/src/net/rpc/server.go:384 +0x155
2019/07/01 17:41:36 packer.exe: created by net/rpc.(*Server).ServeCodec
2019/07/01 17:41:36 packer.exe: /usr/local/go/src/net/rpc/server.go:481 +0x432
2019/07/01 17:41:36 [INFO] (telemetry) ending azure-arm
2019/07/01 17:41:36 ui error: Build 'azure-arm' errored: unexpected EOF
2019/07/01 17:41:36 machine readable: error-count []string{"1"}
2019/07/01 17:41:36 ui error:
==> Some builds didn't complete successfully and had errors:
2019/07/01 17:41:36 machine readable: azure-arm,error []string{"unexpected EOF"}
2019/07/01 17:41:36 ui error: --> azure-arm: unexpected EOF
2019/07/01 17:41:36 ui:
==> Builds finished but no artifacts were created.
2019/07/01 17:41:36 [INFO] (telemetry) Finalizing.
2019/07/01 17:41:36 C:\Packer\packer.exe: plugin process exited
2019/07/01 17:41:36 waiting for all plugin processes to complete...
2019/07/01 17:41:36 C:\Packer\packer.exe: plugin process exited
2019/07/01 17:41:36 C:\Packer\packer.exe: plugin process exited
2019/07/01 17:41:36 C:\Packer\packer.exe: plugin process exited

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

@amydutta Can you take a look? Based on these logs it looks like it was introduced in 8503623 . (it references like 305 of the azure builder)

@xlyk

This comment has been minimized.

Copy link

commented Jul 2, 2019

macOS Mojave 10.14.5
Packer v1.4.2


==> azure-arm: Deleting the temporary OS disk ...
==> azure-arm: -> OS Disk : skipping, managed disk was used...
==> azure-arm: Deleting the temporary Additional disk ...
==> azure-arm: -> Additional Disk : skipping, managed disk was used...
Build 'azure-arm' errored: unexpected EOF

==> Some builds didn't complete successfully and had errors:
--> azure-arm: unexpected EOF

==> Builds finished but no artifacts were created.
2019/07/01 17:51:39 packer: panic: interface conversion: interface {} is nil, not string
2019/07/01 17:51:39 packer:
2019/07/01 17:51:39 packer: goroutine 35 [running]:
2019/07/01 17:51:39 packer: github.com/hashicorp/packer/builder/azure/arm.(*Builder).Run(0xc0003f7aa0, 0x48619c0, 0xc0000f2280, 0x487a140, 0xc00000e420, 0x48013a0, 0xc0001ba6f0, 0x0, 0x0, 0x0, ...)
2019/07/01 17:51:39 packer: /Users/mmarsh/Projects/packer/builder/azure/arm/builder.go:305 +0x4384
2019/07/01 17:51:39 packer: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc0003f76e0, 0x1, 0xc000056150, 0x0, 0x0)
2019/07/01 17:51:39 packer: /Users/mmarsh/Projects/packer/packer/rpc/builder.go:109 +0x231
2019/07/01 17:51:39 packer: reflect.Value.call(0xc000060840, 0xc0001d64b0, 0x13, 0x42afb37, 0x4, 0xc000097f18, 0x3, 0x3, 0xc00011e640, 0xc000492028, ...)
2019/07/01 17:51:39 packer: /usr/local/go/src/reflect/value.go:447 +0x461
2019/07/01 17:51:39 packer: reflect.Value.Call(0xc000060840, 0xc0001d64b0, 0x13, 0xc000080f18, 0x3, 0x3, 0xc000492000, 0xc000080f10, 0xc000080fb8)
2019/07/01 17:51:39 packer: /usr/local/go/src/reflect/value.go:308 +0xa4
2019/07/01 17:51:39 packer: net/rpc.(*service).call(0xc0001b6700, 0xc0001c8050, 0xc0001b8050, 0xc0001b8060, 0xc0001e2180, 0xc0004ca320, 0x3887f20, 0xc00005614c, 0x18a, 0x37e36e0, ...)
2019/07/01 17:51:39 packer: /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019/07/01 17:51:39 packer: created by net/rpc.(*Server).ServeCodec
2019/07/01 17:51:39 packer: /usr/local/go/src/net/rpc/server.go:481 +0x42b
2019/07/01 17:51:39 /usr/local/bin/packer: plugin process exited
2019/07/01 17:51:39 [INFO] (telemetry) ending azure-arm
2019/07/01 17:51:39 ui error: Build 'azure-arm' errored: unexpected EOF
2019/07/01 17:51:39 machine readable: error-count []string{"1"}
2019/07/01 17:51:39 ui error:
==> Some builds didn't complete successfully and had errors:
2019/07/01 17:51:39 machine readable: azure-arm,error []string{"unexpected EOF"}
2019/07/01 17:51:39 ui error: --> azure-arm: unexpected EOF
==> Builds finished but no artifacts were created.
2019/07/01 17:51:39 [INFO] (telemetry) Finalizing.
2019/07/01 17:51:40 waiting for all plugin processes to complete...

@amydutta

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

@SwampDragons yes I will take a look sometime today or tomorrow, thanks for bringing this to my attention

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 2, 2019

No problem! :)

@lrosenman

This comment has been minimized.

Copy link

commented Jul 3, 2019

packer 1.4.2, macOS Mojave, 10.14.5
I'm seeing this too:

azure-arm: [info] MLD customization writing took 73.334 seconds
azure-arm: [info] Graph writing took 38.4014 seconds
azure-arm: [info] RAM: peak bytes used: 166659239936
azure-arm: [Wed Jul 3 19:20:03 UTC 2019] osrm-customize complete! Done!
azure-arm: deregister with waagent...
azure-arm: WARNING! The waagent service will be stopped.
azure-arm: WARNING! Cached DHCP leases will be deleted.
azure-arm: WARNING! root password will be disabled. You will not be able to login as root.
azure-arm: WARNING! /etc/resolvconf/resolv.conf.d/tail and /etc/resolvconf/resolv.conf.d/original will be deleted.
azure-arm: WARNING! packer account and entire home directory will be deleted.

==> azure-arm: Querying the machine's properties ...
==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-2vw7jrt8km'
==> azure-arm: -> ComputeName : 'pkrvm2vw7jrt8km'
==> azure-arm: -> Managed OS Disk : '/subscriptions/30e95a3d-74e7-489c-a2ba-2a39d9c772ec/resourceGroups/packer-Resource-Group-2vw7jrt8km/providers/Microsoft.Compute/disks/pkros2vw7jrt8km'
==> azure-arm: Querying the machine's additional disks properties ...
==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-2vw7jrt8km'
==> azure-arm: -> ComputeName : 'pkrvm2vw7jrt8km'
==> azure-arm: -> Managed Additional Disk 1 : '/subscriptions/30e95a3d-74e7-489c-a2ba-2a39d9c772ec/resourceGroups/packer-Resource-Group-2vw7jrt8km/providers/Microsoft.Compute/disks/datadisk-1'
==> azure-arm: -> Managed Additional Disk 2 : '/subscriptions/30e95a3d-74e7-489c-a2ba-2a39d9c772ec/resourceGroups/packer-Resource-Group-2vw7jrt8km/providers/Microsoft.Compute/disks/datadisk-2'
==> azure-arm: Powering off machine ...
==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-2vw7jrt8km'
==> azure-arm: -> ComputeName : 'pkrvm2vw7jrt8km'
==> azure-arm: Capturing image ...
==> azure-arm: -> Compute ResourceGroupName : 'packer-Resource-Group-2vw7jrt8km'
==> azure-arm: -> Compute Name : 'pkrvm2vw7jrt8km'
==> azure-arm: -> Compute Location : 'East US 2'
==> azure-arm: -> Image ResourceGroupName : 'packerwork'
==> azure-arm: -> Image Name : 'osrm-v5.22.0'
==> azure-arm: -> Image Location : 'eastus2'
==> azure-arm: Deleting resource group ...
==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-2vw7jrt8km'
==> azure-arm:
==> azure-arm: The resource group was created by Packer, deleting ...
==> azure-arm: Deleting the temporary OS disk ...
==> azure-arm: -> OS Disk : skipping, managed disk was used...
==> azure-arm: Deleting the temporary Additional disk ...
==> azure-arm: -> Additional Disk : skipping, managed disk was used...
Build 'azure-arm' errored: unexpected EOF

(there is 5.5 hours of OSRM build log before this)

@dportok

This comment has been minimized.

Copy link
Author

commented Jul 4, 2019

I have run it again but with PACKER_LOG=1, and this is the last part of the build. Hopefully it would be helpful:

2019/07/01 23:44:24 ui: �[1;32m==> azure-arm: Deleting the temporary OS disk ...�[0m
2019/07/01 23:44:24 ui: �[1;32m==> azure-arm: -> OS Disk : skipping, managed disk was used...�[0m
2019/07/01 23:44:24 ui: �[1;32m==> azure-arm: Deleting the temporary Additional disk ...�[0m
2019/07/01 23:44:24 ui: �[1;32m==> azure-arm: -> Additional Disk : skipping, managed disk was used...�[0m
2019/07/01 23:44:24 packer: panic: interface conversion: interface {} is nil, not string
2019/07/01 23:44:24 packer:
2019/07/01 23:44:24 packer: goroutine 75 [running]:
2019/07/01 23:44:24 packer: github.com/hashicorp/packer/builder/azure/arm.(*Builder).Run(0xc0000ed020, 0x48619c0, 0xc0000a9380, 0x487a140, 0xc0001cf7c0, 0x48013a0, 0xc0000cca30, 0x0, 0x0, 0x0, ...)
2019/07/01 23:44:24 packer: /Users/mmarsh/Projects/packer/builder/azure/arm/builder.go:305 +0x4384
2019/07/01 23:44:24 packer: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc0000ed380, 0x1, 0xc000472060, 0x0, 0x0)
2019/07/01 23:44:24 packer: /Users/mmarsh/Projects/packer/packer/rpc/builder.go:109 +0x231
2019/07/01 23:44:24 packer: reflect.Value.call(0xc00005d5c0, 0xc0000105c0, 0x13, 0x42afb37, 0x4, 0xc00008ef18, 0x3, 0x3, 0xc0000a9980, 0xc0003ce098, ...)
2019/07/01 23:44:24 packer: /usr/local/go/src/reflect/value.go:447 +0x461
2019/07/01 23:44:24 packer: reflect.Value.Call(0xc00005d5c0, 0xc0000105c0, 0x13, 0xc000165f18, 0x3, 0x3, 0xc0003ce070, 0xc000165f10, 0xc000165fb8)
2019/07/01 23:44:24 packer: /usr/local/go/src/reflect/value.go:308 +0xa4
2019/07/01 23:44:24 packer: net/rpc.(*service).call(0xc0000a9a00, 0xc0000f00a0, 0xc0004c2000, 0xc0004c2010, 0xc00040c500, 0xc00000f700, 0x3887f20, 0xc00047205c, 0x18a, 0x37e36e0, ...)
2019/07/01 23:44:24 packer: /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019/07/01 23:44:24 packer: created by net/rpc.(*Server).ServeCodec
2019/07/01 23:44:24 packer: /usr/local/go/src/net/rpc/server.go:481 +0x42b
2019/07/01 23:44:24 /usr/local/bin/packer: plugin process exited
2019/07/01 23:44:24 [INFO] (telemetry) ending azure-arm
2019/07/01 23:44:24 ui error: �[1;31mBuild 'azure-arm' errored: unexpected EOF�[0m
2019/07/01 23:44:24 machine readable: error-count []string{"1"}
2019/07/01 23:44:24 ui error:
==> Some builds didn't complete successfully and had errors:
2019/07/01 23:44:24 machine readable: azure-arm,error []string{"unexpected EOF"}
2019/07/01 23:44:24 ui error: --> azure-arm: unexpected EOF
2019/07/01 23:44:24 ui:
==> Builds finished but no artifacts were created.
2019/07/01 23:44:24 [INFO] (telemetry) Finalizing.
2019/07/01 23:44:25 waiting for all plugin processes to complete...
2019/07/01 23:44:25 /usr/local/bin/packer: plugin process exited

@mmpyro

This comment has been minimized.

Copy link

commented Jul 8, 2019

I have also the same error for packer 1.4.2 which runs on Windows 10 OS. I tried create managed image on azure. For unmanaged it works fine.

Build 'azure-arm' errored: unexpected EOF

==> Some builds didn't complete successfully and had errors:
--> azure-arm: unexpected EOF

==> Builds finished but no artifacts were created.
panic: interface conversion: interface {} is nil, not string
2019/07/08 14:39:42 packer.exe:
2019/07/08 14:39:42 packer.exe: goroutine 98 [running]:
2019/07/08 14:39:42 packer.exe: github.com/hashicorp/packer/builder/azure/arm.(*Builder).Run(0xc000234240, 0x3d01f80, 0xc000358100, 0x3d1a040, 0xc000004b60, 0x3ca1600, 0xc000081df0, 0x0, 0x0, 0x0, ...)
2019/07/08 14:39:42 packer.exe: /Users/mmarsh/Projects/packer/builder/azure/arm/builder.go:305 +0x438b
2019/07/08 14:39:42 packer.exe: github.com/hashicorp/packer/packer/rpc.(*BuilderServer).Run(0xc000340a80, 0x1, 0xc00004a0a0, 0x0, 0x0)
2019/07/08 14:39:42 packer.exe: /Users/mmarsh/Projects/packer/packer/rpc/builder.go:109 +0x238
2019/07/08 14:39:42 packer.exe: reflect.Value.call(0xc00010a600, 0xc000352090, 0x13, 0x374d0d9, 0x4, 0xc0000b3f18, 0x3, 0x3, 0xc00032f700, 0x3, ...)
2019/07/08 14:39:42 packer.exe: /usr/local/go/src/reflect/value.go:447 +0x468
2019/07/08 14:39:42 packer.exe: reflect.Value.Call(0xc00010a600, 0xc000352090, 0x13, 0xc0000b3f18, 0x3, 0x3, 0xc00056c180, 0xc0000b3f30, 0x404c55)
2019/07/08 14:39:42 packer.exe: /usr/local/go/src/reflect/value.go:308 +0xab
2019/07/08 14:39:42 packer.exe: net/rpc.(*service).call(0xc000090400, 0xc0004f00a0, 0xc000414008, 0xc000414010, 0xc00011a200, 0xc0003307c0, 0x2d283e0, 0xc00004a09c, 0x18a, 0x2c84600, ...)
2019/07/08 14:39:42 packer.exe: /usr/local/go/src/net/rpc/server.go:384 +0x155
2019/07/08 14:39:42 packer.exe: created by net/rpc.(*Server).ServeCodec
2019/07/08 14:39:42 packer.exe: /usr/local/go/src/net/rpc/server.go:481 +0x432
2019/07/08 14:39:42 [INFO] (telemetry) ending azure-arm
2019/07/08 14:39:42 ui error: Build 'azure-arm' errored: unexpected EOF
2019/07/08 14:39:42 machine readable: error-count []string{"1"}
2019/07/08 14:39:42 ui error:
==> Some builds didn't complete successfully and had errors:
2019/07/08 14:39:42 machine readable: azure-arm,error []string{"unexpected EOF"}

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

Binaries that should fix this can be found here: https://circleci.com/gh/hashicorp/packer/6821#artifacts/containers/0

Would love confirmation that this merged PR will fix things.

@hakabo

This comment has been minimized.

Copy link

commented Jul 8, 2019

@SwampDragons this fixed the issue for me.

was getting "packer Build 'azure-arm' errored: unexpected EOF", but the error went and all builds complete successfully with the new binaries.

@dportok

This comment has been minimized.

Copy link
Author

commented Jul 8, 2019

I have tested it on Mac OS High Sierra 10.13.6 and it worked. Tomorrow I will test it on CentOS 7.6 and let you know

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

The bugfix isn't OS dependent so I'd be shocked if it doesn't work; I'll reopen if it turns out to be an issue.

@dportok

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

I have run it on CentOS 7.6 and worked as expected. Thank you

@JerryMSFT

This comment has been minimized.

Copy link

commented Jul 19, 2019

This fixed the issue for me. Thank you!!

@jzuchora87

This comment has been minimized.

Copy link

commented Jul 22, 2019

This fixed the issue for me. Thank you!!

Hey @JerryMSFT, what worked for you? I think I'm having the exact same issue.

@SwampDragons

This comment has been minimized.

Copy link
Member

commented Jul 22, 2019

@jzuchora87

This comment has been minimized.

Copy link

commented Jul 22, 2019

@jzuchora87 Try the patched version of Packer linked here: https://circleci.com/gh/hashicorp/packer/6821#artifacts/containers/0

Rerunning now and will report back in a few hours! Thanks!

@jzuchora87

This comment has been minimized.

Copy link

commented Jul 22, 2019

@jzuchora87 Try the patched version of Packer linked here: https://circleci.com/gh/hashicorp/packer/6821#artifacts/containers/0

That worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.