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

[BUG] Packer build fails with packer 1.8.6 #23

Open
BoPeng opened this issue Mar 15, 2023 · 2 comments
Open

[BUG] Packer build fails with packer 1.8.6 #23

BoPeng opened this issue Mar 15, 2023 · 2 comments

Comments

@BoPeng
Copy link

BoPeng commented Mar 15, 2023

On a mac computer, after removing version number from libcurl-devel from provision-rstudio.sh (#22 ), I ran the following command to build the ami:

packer build -var-file=configuration.json packer-ec2-rstudio-workspace.json

The commands runs for over an hour ad fails with the error message,

==> amazon-ebs: ** building package indices
==> amazon-ebs: ** installing vignettes
==> amazon-ebs: ** testing if installed package can be loaded from temporary location
==> amazon-ebs: ** testing if installed package can be loaded from final location
==> amazon-ebs: ** testing if installed package keeps a record of temporary installation path
==> amazon-ebs: * DONE (numDeriv)
==> amazon-ebs: * installing *source* package ‘SparseM’ ...
==> amazon-ebs: ** package ‘SparseM’ successfully unpacked and MD5 sums checked
==> amazon-ebs: ** using staged installation
==> amazon-ebs: ** libs
    amazon-ebs: gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c bckslv.f -o bckslv.o
    amazon-ebs: gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c chol.f -o chol.o
    amazon-ebs: gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c chol2csr.f -o chol2csr.o
    amazon-ebs: gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c cholesky.f -o cholesky.o
==> amazon-ebs: Script disconnected unexpectedly. If you expected your script to disconnect, i.e. from a restart, you can try adding `"expect_disconnect": true` or `"valid_exit_codes": [0, 2300218]` to the shell provisioner parameters.
@BoPeng
Copy link
Author

BoPeng commented Mar 20, 2023

Just tried the command on a linux box with the latest version of packer and experienced the same error message:

==> amazon-ebs: ** inst
==> amazon-ebs: ** byte-compile and prepare package for lazy loading
==> amazon-ebs: ** help
==> amazon-ebs: *** installing help indices
==> amazon-ebs: *** copying figures
==> amazon-ebs: ** building package indices
==> amazon-ebs: ** installing vignettes
==> amazon-ebs: ** testing if installed package can be loaded from temporary location
==> amazon-ebs: ** testing if installed package can be loaded from final location
==> amazon-ebs:
==> amazon-ebs: Session terminated, killing shell...
==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present...
==> 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 after 1 hour 26 minutes: Script disconnected unexpectedly. If you expected your script to disconnect, i.e. from a restart, you can try adding `"expect_disconnect": true` or `"valid_exit_codes": [0, 2300218]` to the shell provisioner parameters.

==> Wait completed after 1 hour 26 minutes

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Script disconnected unexpectedly. If you expected your script to disconnect, i.e. from a restart, you can try adding `"expect_disconnect": true` or `"valid_exit_codes": [0, 2300218]` to the shell provisioner parameters.

==> Builds finished but no artifacts were created.

@BoPeng BoPeng changed the title [BUG] Packer build fails on mac [BUG] Packer build fails with packer 1.8.6 Mar 22, 2023
@BoPeng
Copy link
Author

BoPeng commented Mar 23, 2023

Note that packer 1.6.0 still works. There is no straight documentation on how to install packer 1.6.0 but for linux, one can

wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant