ihnuzarx
ihnuzarx

Reputation: 27

I got an error when deploy Django appliction to IBM Bluemix

I got an error when deploy Django application to IBM Bluemix. When i see log it's show this.

2015-09-09T22:08:00.05+0700 [STG/0]      ERR     You are using pip version 6.1.0
.dev0, however version 7.1.2 is available.
2015-09-09T22:08:00.05+0700 [STG/0]      ERR You should consider upgrading via t
he 'pip install --upgrade pip' command.
2015-09-09T22:08:00.28+0700 [STG/0]      OUT -----> Preparing static assets
2015-09-09T22:08:01.02+0700 [STG/0]      OUT        Running collectstatic...
2015-09-09T22:08:01.84+0700 [STG/0]      OUT        175 static files copied to '
/app/static'.
2015-09-09T22:08:17.95+0700 [STG/166]    OUT -----> Uploading droplet (46M)
2015-09-09T22:08:34.18+0700 [DEA/166]    OUT Starting app instance (index 0) wit
h guid a416b8bf-5d53-47d5-9d99-d39c4730cd22
2015-09-09T22:09:03.53+0700 [API/4]      OUT App instance exited with guid a416b
8bf-5d53-47d5-9d99-d39c4730cd22 payload: {"cc_partition"=>"default", "droplet"=>
"a416b8bf-5d53-47d5-9d99-d39c4730cd22", "version"=>"31f9acf2-6bf7-4709-83fd-2ce0
00fa4483", "instance"=>"f4fc8d2f0e4f4bdeb4260fa8cae1f68f", "index"=>0, "reason"=
>"CRASHED", "exit_status"=>2, "exit_description"=>"app instance exited", "crash_
timestamp"=>1441811343}

For deploy appliction i have 3 files, that is requirements.txt, manifest.yml and run.sh file.

in my manifest.yml file

applications:
- name: RoyalCaninExam
memory: 256M
# This is command provided by cf -c option
command: bash ./run.sh
buildpack: python_buildpack
path: .
services:
- mysql-royalcanin

and in run.sh file

if [ -z "$VCAP_APP_PORT" ];
  then SERVER_PORT=5000;
  else SERVER_PORT="$VCAP_APP_PORT";
fi

echo [$0] port is------------------- $SERVER_PORT
python manage.py syncdb --noinput
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '[email protected]', 'admin')" | python manage.py shell

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

Upvotes: 1

Views: 193

Answers (1)

whitfiea
whitfiea

Reputation: 1943

It looks like your run.sh script is not running as there is no output in your log. Please make sure that your run.sh does not contain any Windows EOL encoding as this causes problems with the Python buildpack. Change any EOL encoding in that file to UNIX using a file editor of your choice.

Upvotes: 1

Related Questions