简体   繁体   中英

Gunicorn: Not able to start It from remote server

I am trying to run gunicorn for an application but it's not able to run from any remote server or by any other tool. However, When I am trying to execute the script from bash by logging in into the server then its working fine. I have also tried supervisord but getting the same error. Is there anything which I am missing out?

ssh -t ubuntu@ec2-xx-xx-xx.us-west-2.compute.amazonaws.com << EOF
bash /home/ubuntu/code/xyz/gunicorn_start2
EOF

gunicorn_start2

#!/bin/sh
export PROJECT_ENV="dev"
exec /home/ubuntu/code/xyz xyz.wsgi:application --name xyz --workers 4 --user=ubuntu --timeout=3600  --debug --log-level debug --daemon

Mohit, try this

ssh -T ubuntu@ec2-xx-xx-xx.us-west-2.compute.amazonaws.com <<'EOF'

PROJECT_ENV="dev"
exec /home/ubuntu/code/xyz xyz.wsgi:application --name xyz --workers 4 --user=ubuntu --timeout=3600  --debug --log-level debug --daemon

EOF

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM