cloudfoundry / python-buildpack

Cloud Foundry buildpack for the Python Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
121 stars 279 forks source link

Failed to compress droplet filesystem: exit status 2 #161

Closed mstiunicon closed 4 years ago

mstiunicon commented 4 years ago

We are build the app successfully in previous months, but from last month, it build failed with "exit status 2", we didn't know what's the meaning, would you please help me ?

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

PS C:\workspace_nodejs\metering-feeder> ibmcloud cf curl /v2/info
Invoking 'cf curl /v2/info'...

{
   "name": "IBM Cloud",
   "build": "v12.22.0",
   "support": "http://ibm.biz/bluemix-supportinfo",
   "version": 0,
   "description": "IBM Bluemix",
   "authorization_endpoint": "https://iam.cloud.ibm.com/cloudfoundry/login/us-south",
   "token_endpoint": "https://uaa.us-south.cf.cloud.ibm.com",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "ssh.us-south.cf.cloud.ibm.com:2222",
   "app_ssh_host_key_fingerprint": "c7:1f:89:2a:62:3b:78:a9:08:c9:33:81:fb:39:26:da",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.us-south.cf.cloud.ibm.com:443",
   "api_version": "2.144.0",
   "osbapi_version": "2.15",
   "user": "a7aa61fc-2f4a-4f12-8278-a892053778b8"
}

PS > ibmcloud cf version
Invoking 'cf version'...

cf.exe version 6.41.0+dd4c76cdd.2018-11-28

What version of the buildpack you are using? Python Buildpack version 1.7.9

If you were attempting to accomplish a task, what was it you were attempting to do? ibmcloud cf push

What did you expect to happen? successfully push the build and start app

manifest.yaml
---
applications:
- name: metering-feeder
  memory: 2048MB
  instances: 1
  health-check-type: process
  routes:
  - route: metering-feeder.mybluemix.net
  command: cd src;python3 main.py
  env:
    ENVIRONMENT: dev
    JAVA_HOME: /home/vcap/deps/0/apt/usr/lib/jvm/java-8-openjdk-amd64/jre/
    PATH: /bin:/usr/bin:/home/vcap/deps/0/apt/usr/lib/jvm/java-8-openjdk-amd64/jre/bin

What was the actual behavior? build failed with "Failed to compress droplet filesystem: exit status 2"

Please confirm where necessary:

PS C:\workspace_nodejs\metering-feeder> ibmcloud cf push
Invoking 'cf push'...

Pushing from manifest to org CMAS-  Metering / space metering-dev as zzwen@cn.ibm.com...
Using manifest file C:\workspace_nodejs\metering-feeder\manifest.yml
Getting app info...
Updating app with these attributes...
  name:                metering-feeder
  path:                C:\workspace_nodejs\metering-feeder
  buildpacks:
    https://github.com/cloudfoundry/multi-buildpack
  command:             cd src;python3 main.py
  disk quota:          2G
  health check type:   process
  instances:           1
  memory:              2G
  stack:               cflinuxfs3
  services:
    availability-monitoring-auto
  env:
    ENVIRONMENT
    IBM_EVENT_STREAM_APIKEY
    IBM_EVENT_STREAM_URL
    JAVA_HOME
    LOG_COLLECTION
    LOG_DATABASE
    LOG_HOST
    METERING_API_PASSWORD
    METERING_API_TOKEN
    METERING_API_TTL
    METERING_API_URL
    METERING_API_USERNAME
    PATH
    SCHEDULE_TIME
  routes:
    metering-feeder.mybluemix.net

Updating app metering-feeder...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 93.36 KiB / 93.36 KiB [==================================================================================] 100.00% 19s

Waiting for API to complete processing files...
timeout connecting to log server, no log will be shown

Staging app and tracing logs...
   Cell 110e307c-dba6-4122-b91c-019b46f6c204 creating container for instance d1058d1a-218c-48d1-8f91-94504bac7857
   Cell 110e307c-dba6-4122-b91c-019b46f6c204 successfully created container for instance d1058d1a-218c-48d1-8f91-94504bac7857
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded app package (691.4K)
   Downloaded build artifacts cache (668.6M)
   -----> Download go 1.9.1
   -----> Running go build compile
   -----> Multi Buildpack version 1.0.3
   -----> Running buildpacks:
          https://github.com/cloudfoundry/apt-buildpack
          https://github.com/cloudfoundry/python-buildpack
   -----> Download go 1.12.4
   -----> Running go build supply
   /tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
   ~
   -----> Apt Buildpack version 0.2.2
   -----> Adding apt keys
   Warning: apt-key output should not be parsed (stdout is not a terminal)
   gpg: key 86F44E2A: "Launchpad OpenJDK builds (all archs)" not changed
   gpg: Total number processed: 1
   gpg:              unchanged: 1
   -----> Adding apt repos
   Added repo {deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main }
   -----> Updating apt cache
   -----> Downloading apt packages
   -----> Installing apt packages
   -----> Running go build supply
   /tmp/buildpackdownloads/fe158333cd0331a0073936bf6f26e45e ~
   ~
   -----> Python Buildpack version 1.7.9
          **WARNING** buildpack version changed from 1.7.5 to 1.7.9
   -----> Supplying Python
   -----> Installing python 3.7.6
          Copy [/tmp/cache/final/final/dependencies/7393906197d72cb5ea4466de1918f2f4b789a4ed88be123e8246b7623236626b/python-3.7.6-linux-x64-cflinuxfs3-bb141b1e.tgz]
   -----> Installing pip-pop 0.1.4
          Copy [/tmp/cache/final/final/dependencies/3b86fb2cd9c13268f8858fd0ccb2f9eaf11295a51804b7075fe38d7e2a471191/pip-pop-0.1.4-0a3b0f1b.tar.gz]
   -----> Running Pip Install
          Collecting xlrd>=1.2.0 (from -r /tmp/app/requirements.txt (line 1))
            Using cached https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl
          Collecting requests==2.22.0 (from -r /tmp/app/requirements.txt (line 2))
            Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
          Collecting python-dateutil>=2.8.0 (from -r /tmp/app/requirements.txt (line 3))
            Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
          Collecting ibm-cos-sdk>=2.5.0 (from -r /tmp/app/requirements.txt (line 4))
            Using cached https://files.pythonhosted.org/packages/6f/91/86b2816c7b77d816b03a1ad6cf7db4b1f67556af395d5b93fdae6086c933/ibm-cos-sdk-2.6.0.tar.gz
            Using cached https://files.pythonhosted.org/packages/be/18/99380a20b3ae8a54914e0d3dba99807def9a47421eff55638f120f950066/pymongo-3.10.1-cp37-cp37m-manylinux1_x86_64.whl
          Collecting pymongo>=3.8.0 (from -r /tmp/app/requirements.txt (line 5))
          Collecting pyspark>=2.4.0 (from -r /tmp/app/requirements.txt (line 6))
            Downloading https://files.pythonhosted.org/packages/9a/5a/271c416c1c2185b6cb0151b29a91fff6fcaed80173c8584ff6d20e46b465/pyspark-2.4.5.tar.gz (217.8MB)
          Collecting schedule>=0.6.0 (from -r /tmp/app/requirements.txt (line 8))
            Using cached https://files.pythonhosted.org/packages/57/22/3a709462eb02412bd1145f6e53604f36bba191e3e4e397bea4a718fec38c/schedule-0.6.0-py2.py3-none-any.whl
          Collecting python-dotenv>=0.10.3 (from -r /tmp/app/requirements.txt (line 9))
            Downloading https://files.pythonhosted.org/packages/7f/ee/e0cd2d8ba548e4c3e8c9e70d76e423b3e8b8e4eec351f51292d828c735d2/python_dotenv-0.12.0-py2.py3-none-any.whl
          Collecting log4mongo>=1.7.0 (from -r /tmp/app/requirements.txt (line 10))
            Using cached https://files.pythonhosted.org/packages/d7/45/2f1814cc4b09059eb8540c29f55e011c25135e9f9374d00a011be9870c71/log4mongo-1.7.0.tar.gz
          Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests==2.22.0->-r /tmp/app/requirements.txt (line 2))
            Downloading https://files.pythonhosted.org/packages/e8/74/6e4f91745020f967d09332bb2b8b9b10090957334692eb88ea4afe91b77f/urllib3-1.25.8-py2.py3-none-any.whl (125kB)
          Collecting idna<2.9,>=2.5 (from requests==2.22.0->-r /tmp/app/requirements.txt (line 2))
          Collecting certifi>=2017.4.17 (from requests==2.22.0->-r /tmp/app/requirements.txt (line 2))
            Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
            Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl
          Collecting six>=1.5 (from python-dateutil>=2.8.0->-r /tmp/app/requirements.txt (line 3))
            Using cached https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
          Collecting ibm-cos-sdk-core==2.6.0 (from ibm-cos-sdk>=2.5.0->-r /tmp/app/requirements.txt (line 4))
            Using cached https://files.pythonhosted.org/packages/ea/c1/c823507c472bf88dbd045445df6850744111d34fd218c6ea3b9c9bde2cfe/ibm-cos-sdk-core-2.6.0.tar.gz
          Collecting chardet<3.1.0,>=3.0.2 (from requests==2.22.0->-r /tmp/app/requirements.txt (line 2))
            Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
          Collecting ibm-cos-sdk-s3transfer==2.6.0 (from ibm-cos-sdk>=2.5.0->-r /tmp/app/requirements.txt (line 4))
            Using cached https://files.pythonhosted.org/packages/6f/92/682a28b99777a3fdc65e6d5641ed7e1ca470d0eab3bb2826cc30c6b60e21/ibm-cos-sdk-s3transfer-2.6.0.tar.gz
          Collecting jmespath<1.0.0,>=0.7.1 (from ibm-cos-sdk>=2.5.0->-r /tmp/app/requirements.txt (line 4))
            Downloading https://files.pythonhosted.org/packages/a3/43/1e939e1fcd87b827fe192d0c9fc25b48c5b3368902bfb913de7754b0dc03/jmespath-0.9.5-py2.py3-none-any.whl
          Collecting py4j==0.10.7 (from pyspark>=2.4.0->-r /tmp/app/requirements.txt (line 6))
            Using cached https://files.pythonhosted.org/packages/e3/53/c737818eb9a7dc32a7cd4f1396e787bd94200c3997c72c1dbe028587bd76/py4j-0.10.7-py2.py3-none-any.whl
          Collecting docutils<0.16,>=0.10 (from ibm-cos-sdk-core==2.6.0->ibm-cos-sdk>=2.5.0->-r /tmp/app/requirements.txt (line 4))
            Using cached https://files.pythonhosted.org/packages/22/cd/a6aa959dca619918ccb55023b4cb151949c64d4d5d55b3f4ffd7eee0c6e8/docutils-0.15.2-py3-none-any.whl
          Installing collected packages: xlrd, urllib3, idna, chardet, certifi, requests, six, python-dateutil, jmespath, docutils, ibm-cos-sdk-core, ibm-cos-sdk-s3transfer, ibm-cos-sdk, pymongo, py4j, pyspark, schedule, python-dotenv, log4mongo
            WARNING: The script chardetect is installed in '/tmp/contents370627173/deps/1/python/bin' which is not on PATH.
            Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
            Running setup.py install for ibm-cos-sdk-core: started
              Running setup.py install for ibm-cos-sdk-core: finished with status 'done'
            Running setup.py install for ibm-cos-sdk-s3transfer: started
              Running setup.py install for ibm-cos-sdk-s3transfer: finished with status 'done'
            Running setup.py install for ibm-cos-sdk: started
              Running setup.py install for ibm-cos-sdk: finished with status 'done'
            Running setup.py install for pyspark: started
              Running setup.py install for pyspark: finished with status 'done'
            Running setup.py install for log4mongo: started
            WARNING: The script dotenv is installed in '/tmp/contents370627173/deps/1/python/bin' which is not on PATH.
            Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
              Running setup.py install for log4mongo: finished with status 'done'
          Successfully installed certifi-2019.11.28 chardet-3.0.4 docutils-0.15.2 ibm-cos-sdk-2.6.0 ibm-cos-sdk-core-2.6.0 ibm-cos-sdk-s3transfer-2.6.0 idna-2.8 jmespath-0.9.5 log4mongo-1.7.0 py4j-0.10.7 pymongo-3.10.1 pyspark-2.4.5 python-dateutil-2.8.1 python-dotenv-0.12.0 requests-2.22.0 schedule-0.6.0 six-1.14.0 urllib3-1.25.8 xlrd-1.2.0
          WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
          You should consider upgrading via the 'pip install --upgrade pip' command.
   -----> Running go build finalize
   /tmp/buildpackdownloads/fe158333cd0331a0073936bf6f26e45e ~
   ~
   Failed to compress droplet filesystem: exit status 2
   Exit status 1
   Cell 110e307c-dba6-4122-b91c-019b46f6c204 stopping instance d1058d1a-218c-48d1-8f91-94504bac7857
   Cell 110e307c-dba6-4122-b91c-019b46f6c204 destroying container for instance d1058d1a-218c-48d1-8f91-94504bac7857
   Cell 110e307c-dba6-4122-b91c-019b46f6c204 successfully destroyed container for instance d1058d1a-218c-48d1-8f91-94504bac7857
Error staging application: Staging error: staging failed
FAILED
PS C:\workspace_nodejs\metering-feeder> ibmcloud cf version
Invoking 'cf version'...

cf.exe version 6.41.0+dd4c76cdd.2018-11-28
cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/171715985

The labels on this github issue will be updated when the story is started.

mstiunicon commented 4 years ago

manifest.yml

---
applications:
- name: metering-feeder
  memory: 2048MB
  instances: 1
  health-check-type: process
  routes:
  - route: metering-feeder.mybluemix.net
  command: cd src;python3 main.py
  env:
    ENVIRONMENT: dev

multi-buildpack.yml

buildpacks:
  - https://github.com/cloudfoundry/apt-buildpack
  - https://github.com/cloudfoundry/python-buildpack

apt.yml

---
packages:
- openjdk-8-jre
repos:
- deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main
keys:
- https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xEB9B1D8886F44E2A

requirements.txt

xlrd>=1.2.0
requests==2.22.0
python-dateutil>=2.8.0
ibm-cos-sdk>=2.5.0
pymongo>=3.8.0
pyspark>=2.4.0
pyspark>=2.4.0
schedule>=0.6.0
python-dotenv>=0.10.3
log4mongo>=1.7.0

runtime.txt python-3.7.x

mstiunicon commented 4 years ago

specify the python-buildpack to 1.7.6, then fixed looks the latest version is not matched.

multi-buildpack.yml

buildpacks:
  - https://github.com/cloudfoundry/apt-buildpack
  - https://github.com/cloudfoundry/python-buildpack#v1.7.6