2017-02-25 77 views
0

我試圖部署一個使用雲代工的應用程序,即時消息得到這個錯誤,應用程序崩潰。我試圖改變buildpack,但沒有任何反應。Cloud Foundry Django exit_status = -1

我不知道如何獲得更多的錯誤。

CF日誌返回此日誌

 OUT Submodule 'compile-extensions' (https://github.com/cloudfoundry/compile-extensions.git) registered for path 'compile-extensions' 
2017-02-25T11:08:59.56-0300 [STG/0]  ERR Cloning into 'compile-extensions'... 
2017-02-25T11:09:00.23-0300 [STG/0]  OUT Submodule path 'compile-extensions': checked out 'a76a1ecab87f514248222e50fdc9f46c37078109' 
2017-02-25T11:09:00.39-0300 [STG/0]  OUT -------> Buildpack version 1.5.15 
2017-02-25T11:09:13.34-0300 [STG/0]  OUT  $ pip install -r requirements.txt 
2017-02-25T11:09:48.99-0300 [STG/16]  OUT -----> Uploading droplet (159M) 
2017-02-25T11:10:16.77-0300 [DEA/16]  OUT Starting app instance (index 0) with guid a627703f-3fc8-48a2-869c-572b2abec573 
2017-02-25T11:10:26.87-0300 [API/0]  OUT App instance exited with guid a627703f-3fc8-48a2-869c-572b2abec573 payload: {"cc_partition"=>"default", "droplet"=>"a627703f-3fc8-48a2-869c-572b2abec573", "version"=>"3ead9c26-4535-4dbd-b3ce-d21483bae661", "instance"=>"cb6eda1feaf647aead2e9ef6c2d435b6", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to start", "crash_timestamp"=>1488031826} 

我manifest.yml是這個

--- 
applications: 
- name: cs 
    instances: 1 
    command: bash run.sh 
    memory: 200M 
    disk_quota: 256M 
    random-route: false 
    buildpack: https://github.com/cloudfoundry/python-buildpack.git 

我Procfile有這條線

web: python cs/manage.py migrate && python cs/manage.py runserver 0.0.0.0:$PORT --noreload 

和run.sh具有

#!/bin/bash 
if [ -z "$VCAP_APP_PORT" ]; 
then SERVER_PORT=5000; 
else SERVER_PORT="$VCAP_APP_PORT"; 
fi 

python manage.py makemigrations 
python manage.py migrate 

echo [$0] Starting Django Server... 
python cs/manage.py runserver --noreload 0.0.0.0:$SERVER_PORT 

它在heroku上部署的應用程序沒有任何問題,所以我無法理解在cf上的heroku之間的區別。

+0

a)您Procfile沒有做任何事情。在manifest.yml中設置'command'將覆蓋Procfile中的內容。爲了清楚起見,你應該選擇一個或另一個。 b。)分期似乎很好。 'pip'沒有安裝任何東西,但它都運行沒有錯誤。 c。)您的應用程序無法啓動。它以退出碼-1退出。對不起,但不能告訴你更多。在你的'run.sh'腳本中添加一些echo語句,並在應用中提升日誌級別。 –

回答