node.js app fails to stage: Failed to compress droplet filesystem: exit 2 in VMware Tanzu Application Service (TAS) for VMs
search cancel

node.js app fails to stage: Failed to compress droplet filesystem: exit 2 in VMware Tanzu Application Service (TAS) for VMs

book

Article ID: 297990

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

As part of the buildpack lifecycle, the application and its contents will be compressed into a tar file before it is uploaded to blobstore for further use.

If your application fails to stage with below error message it signifies that the compression failed and `tar` utility errored with exit status 2:
2020-03-27T22:23:31.584-04:00 [STG/0] [ERR] Failed to compress droplet filesystem: exit status 2
2020-03-27T22:23:31.618-04:00 [STG/0] [OUT] Exit status 1
2020-03-27T22:23:31.791-04:00 [STG/0] [OUT] Cell 1ebd252d-25cf-4152-90b0-2b53b4f99cee stopping instance 743ac257-6d8f-4eba-80ae-65044164c042
2020-03-27T22:23:31.791-04:00 [STG/0] [OUT] Cell 1ebd252d-25cf-4152-90b0-2b53b4f99cee destroying container for instance 743ac257-6d8f-4eba-80ae-65044164c042
2020-03-27T22:23:31.901-04:00 [API/1] [ERR] Failed to stage build: staging failed
2020-03-27T22:23:33.278-04:00 [STG/0] [OUT] Cell 1ebd252d-25cf-4152-90b0-2b53b4f99cee successfully destroyed container for instance 743ac257-6d8f-4eba-80ae-65044164c042


Environment

Product Version: 2.6

Resolution

If you see this error, review your deployment manifest environment variables.

If your manifest includes `GZIP` as an environment variable then you will need to remove it from your manifest and `cf unset-env` the variable.

Setting the GZIP environment variable can cause the compression to fail because this variable is used to provide default configuration options to `gzip`, and if you put an invalid configuration option then `gzip` fails.
 

Resolution

Remove the declaration of GZIP from your deployment's environment variable and unset it to resolve the compression errors.


Source: GZIP is a reserved environment variable: https://manpages.ubuntu.com/manpages/xenial/en/man1/gzip.1.html#environment