RLOpenCatalyst / Service_Workbench_Templates

Templates for AWS Service Workbench from Relevance Lab
7 stars 13 forks source link

[BUG] Packer build fails with packer 1.8.6 #23

Open BoPeng opened 1 year ago

BoPeng commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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