2017-02-25 60 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语句,并在应用中提升日志级别。 –

回答