Packer build with Amazon-EBS throws exit code 9 on StepPreValidate

188 views
Skip to first unread message

Kris Runzer

unread,
Dec 1, 2016, 11:35:04 AM12/1/16
to Packer
I've successfully built many AMIs but now I keep running into the following:

==> amazon-ebs: Force Deregister flag found, skipping prevalidating AMI Name
==> amazon-ebs: Pausing after run of step 'StepPreValidate'. Press enter to continue. 
    amazon-ebs: Found Image ID: ami-xxxxxxxx
==> amazon-ebs: Pausing after run of step 'StepSourceAMIInfo'. Press enter to continue. 
==> amazon-ebs: Creating temporary keypair: packer_58404e9a-e6fc-3a4a-2d54-b599ef801dee
    amazon-ebs: Saving key for debug purposes: ec2_amazon-ebs.pem
==> amazon-ebs: Pausing after run of step 'StepKeyPair'. Press enter to continue. 
==> amazon-ebs: Pausing after run of step 'StepSecurityGroup'. Press enter to continue. 
==> amazon-ebs: Pausing after run of step 'stepCleanupVolumes'. Press enter to continue. 
==> amazon-ebs: Launching a source AWS instance...
    ...
==> amazon-ebs: Waiting for instance (i-xxxxxxxxxxxxxxxx) to become ready...
    ...
==> amazon-ebs: Pausing after run of step 'StepRunSourceInstance'. Press enter to continue. 
==> amazon-ebs: Pausing after run of step 'stepTagEBSVolumes'. Press enter to continue. 
==> amazon-ebs: Pausing after run of step 'StepGetPassword'. Press enter to continue. 
==> amazon-ebs: Waiting for SSH to become available...
==> amazon-ebs: Connected to SSH!
==> amazon-ebs: Pausing after run of step 'StepConnect'. Press enter to continue. 
==> amazon-ebs: Uploading base.hcl => /home/ubuntu/base.hcl
==> amazon-ebs: Uploading nomad.conf => /home/ubuntu/nomad.conf
==> amazon-ebs: Provisioning with shell script: /tmp/packer-shell730803993
    ... install docker ...
==> amazon-ebs: Pausing before cleanup of step 'StepConnect'. Press enter to continue. 
==> amazon-ebs: Pausing before cleanup of step 'StepGetPassword'. Press enter to continue. 
==> amazon-ebs: Pausing before cleanup of step 'stepTagEBSVolumes'. Press enter to continue. 
==> amazon-ebs: Pausing before cleanup of step 'StepRunSourceInstance'. Press enter to continue. 
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: Pausing before cleanup of step 'stepCleanupVolumes'. Press enter to continue. 
==> amazon-ebs: Cleaning up any extra volumes...
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Pausing before cleanup of step 'StepSecurityGroup'. Press enter to continue. 
==> amazon-ebs: Pausing before cleanup of step 'StepKeyPair'. Press enter to continue. 
==> amazon-ebs: Deleting temporary keypair...
==> amazon-ebs: Pausing before cleanup of step 'StepSourceAMIInfo'. Press enter to continue. 
==> amazon-ebs: Pausing before cleanup of step 'StepPreValidate'. Press enter to continue. 
Build 'amazon-ebs' errored: Script exited with non-zero exit status: 9

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Script exited with non-zero exit status: 9

==> Builds finished but no artifacts were created.

I can't seem to figure out what is making this fail?

Thanks,
Kris

Kris Runzer

unread,
Dec 1, 2016, 11:51:25 AM12/1/16
to Packer
Oops I figured it out.  My docker install had a groupadd that was adding a duplicate group and throwing error code 9.  I assumed because the output was green that it was all working properly.  My bad!
Reply all
Reply to author
Forward
0 new messages