hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.04k stars 3.32k forks source link

Failed to initialize build 'azure-arm': error initializing provisioner 'powershell': timeout while waiting for plugin to start #7929

Open renpengzhang opened 5 years ago

renpengzhang commented 5 years ago

I ran into a packer 1.4.0 build failure for azure-arm, seems like the powershell plugin fails to start due to timeout.

The Error message look like this:

PACKER OUT Failed to initialize build 'azure-arm': error initializing provisioner 'powershell': timeout while waiting for plugin to start
PACKER ERR 2019/06/15 12:09:39 ui error: Failed to initialize build 'azure-arm': error initializing provisioner 'powershell': timeout while waiting for plugin to start

And the complete packer log has been attached here: PowerShellPluginTimeout.log

SwampDragons commented 5 years ago

wow, I've never seen a bug in the plugin architecture before. Does this happen every time?

renpengzhang commented 5 years ago

We have saw 2 recently and captured this one.

vmunagala0117 commented 4 years ago

I am seeing this issue in the latest packer build. 2019/11/26 23:47:27 Detected home directory from env var: /home/vamsi.munagala 2019/11/26 23:47:27 Setting cache directory: /mnt/c/Users/vmunagal/source/repos/aims-cdas/AimsAutomation/Scripts/CLI/IaaS Deployments/packer_cache 2019/11/26 23:47:27 Detected home directory from env var: /home/vamsi.munagala 2019/11/26 23:47:27 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/packer?arch=amd64&os=linux&signature=ab3baa43-2662-c938-b552-9fc4d46ce641&version=1.4.3-dev: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 2019/11/26 23:47:27 Loading builder: azure-arm 2019/11/26 23:47:27 Plugin could not be found. Checking same directory as executable. 2019/11/26 23:47:27 Current exe path: /usr/local/bin/packer 2019/11/26 23:47:27 Creating plugin client for path: /usr/local/bin/packer 2019/11/26 23:47:27 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-azure-arm"} 2019/11/26 23:47:28 Waiting for RPC address for: /usr/local/bin/packer Failed to initialize build 'azure-arm': error initializing builder 'azure-arm': timeout while waiting for plugin to start 2019/11/26 23:47:28 ui error: Failed to initialize build 'azure-arm': error initializing builder 'azure-arm': timeout while waiting for plugin to start azure-arm output will be in this color. 2019/11/26 23:47:28 Build debug mode: false

2019/11/26 23:47:28 Force build: false

2019/11/26 23:47:28 On error: ==> Builds finished but no artifacts were created. 2019/11/26 23:47:28 Waiting on builds to complete... ==> Builds finished but no artifacts were created. 2019/11/26 23:47:28 [INFO] (telemetry) Finalizing. 2019/11/26 23:47:28 /usr/local/bin/packer: plugin process exited 2019/11/26 23:47:28 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post https://checkpoint-api.hashicorp.com/v1/telemetry/packer: context deadline exceeded 2019/11/26 23:47:28 waiting for all plugin processes to complete...

srinathrangaramanujam commented 4 years ago

getting the same.. os ubunut, packer version 1.3.4

lightener commented 4 years ago

Seeing this with the vmware-iso plugin on version 1.3.5 as well

mgeorgebrown89 commented 4 years ago

I just got this exact error message in Packer v1.5.4, installed via chocolately.

nywilken commented 4 years ago

Hello folks, in 1.5.0 we refactored how plugins are loaded. If you are still running into issues please try testing with the latest version of Packer to see if you still run into the plugin timeout issue. Also if you are using a custom directory for the Packer plugins please make sure the plugin files are executable and that the user running packer build template.json has read access to the said plugin(s) and its parent directory.

@mgeorgebrown89 thanks for reporting the issue you are seeing on 1.5.4. Do you run into the same issue if you install Packer using the release binaries on Packer.io https://packer.io/downloads.html? I see that Chocolately has some logic in the install script to remove previously installed versions of Packer before installing the latest. If you upgraded from a previous version you may want to try removing Packer completely and running a fresh install via Chocolately to see if that resolves the issue. Apologies in advance as I have not used the chocolately installer.

saikovvuri commented 4 years ago

Hello @nywilken , I uninstalled packer 1.5.4 using Chocalatey and installed packer 1.5.5. Still get the same initializing azure-arm error.

regards