I'm trying to deploy django. So installed everything in a clean VPS. I'm able to run the server using unicorn but I'm trying to use supervisord. So I followed this tutorial like I did in the past, but now when i'm starting the app using sudo supervisorctl start uniprogress i'm getting an error saying uniprogress: ERROR (abnormal termination). Below you can find the log file.
File:/opt/myapps/logs/gunicorn_supervisor.log
Starting uniprogress as uniusr
2014-04-24 04:54:30 [18053] [INFO] Starting gunicorn 18.0
Traceback (most recent call last):
File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run
Arbiter(self).run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run
self.start()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start
self.LISTENERS = create_sockets(self.cfg, self.log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets
sock = sock_type(addr, conf, log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__
os.remove(addr)
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock'
Starting uniprogress as uniusr
2014-04-24 04:54:31 [18064] [INFO] Starting gunicorn 18.0
Traceback (most recent call last):
File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run
Arbiter(self).run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run
self.start()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start
self.LISTENERS = create_sockets(self.cfg, self.log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets
sock = sock_type(addr, conf, log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__
os.remove(addr)
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock'
Starting uniprogress as uniusr
2014-04-24 04:54:31 [18064] [INFO] Starting gunicorn 18.0
Traceback (most recent call last):
File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run
Arbiter(self).run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run
self.start()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start
self.LISTENERS = create_sockets(self.cfg, self.log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets
sock = sock_type(addr, conf, log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__
os.remove(addr)
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock'
Starting uniprogress as uniusr
2014-04-24 04:54:34 [18075] [INFO] Starting gunicorn 18.0
Traceback (most recent call last):
File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run
Arbiter(self).run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run
self.start()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start
self.LISTENERS = create_sockets(self.cfg, self.log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets
sock = sock_type(addr, conf, log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__
os.remove(addr)
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock'
Starting uniprogress as uniusr
2014-04-24 04:54:37 [18086] [INFO] Starting gunicorn 18.0
Traceback (most recent call last):
File "/opt/myapps/uniprogress/../bin/gunicorn", line 9, in <module>
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run
Arbiter(self).run()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run
self.start()
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 134, in start
self.LISTENERS = create_sockets(self.cfg, self.log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 198, in create_sockets
sock = sock_type(addr, conf, log)
File "/opt/myapps/local/lib/python2.7/site-packages/gunicorn/sock.py", line 99, in __init__
os.remove(addr)
OSError: [Errno 13] Permission denied: '/opt/myapps/run/gunicorn.sock'
The issue was that the user uniusr did not have permissions to write to /opt/myapps. So what I did in order to fix this is the following.
sudo chown -R uniusr:users /opt/myapps
sudo chmod -R g+w /opt/myapps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With