gunicorn -c /opt/netbox/gunicorn_config.py netbox.wsgi wont't start

744 views
Skip to first unread message

Michaël

unread,
Jul 24, 2017, 11:00:48 AM7/24/17
to NetBox
Hi,

i try to install netbox with python2 and i'm stuck with gunicorn.


Error message :

ImportError: No module named django.core.wsgi



Here is the list of python installed modules :

asn1crypto (0.22.0)
bcrypt (3.1.3)
certifi (2017.4.17)
cffi (1.10.0)
chardet (3.0.4)
coreapi (2.3.1)
coreschema (0.0.4)
cryptography (2.0)
Django (1.11.3)
django-cors-headers (2.1.0)
django-debug-toolbar (1.8)
django-filter (1.0.4)
django-mptt (0.8.7)
django-rest-swagger (2.1.2)
django-tables2 (1.10.0)
djangorestframework (3.6.3)
enum34 (1.1.6)
graphviz (0.8)
gunicorn (19.4.5)
idna (2.5)
ipaddress (1.0.18)
itypes (1.1.0)
Jinja2 (2.9.6)
lxml (3.8.0)
Markdown (2.6.8)
MarkupSafe (1.0)
meld3 (1.0.2)
natsort (5.0.3)
ncclient (0.5.3)
netaddr (0.7.18)
olefile (0.44)
openapi-codec (1.3.2)
paramiko (2.2.1)
Pillow (4.2.1)
pip (9.0.1)
psycopg2 (2.7.2)
py-gfm (0.1.3)
pyasn1 (0.2.3)
pycparser (2.18)
pycrypto (2.6.1)
PyNaCl (1.1.2)
pytz (2017.2)
requests (2.18.1)
setuptools (36.2.2)
simplejson (3.11.1)
six (1.10.0)
sqlparse (0.2.3)
uritemplate (3.0.0)
urllib3 (1.21.1)
wheel (0.29.0)
xmltodict (0.11.0)


Any idea ?

Michaël

unread,
Jul 24, 2017, 11:18:48 AM7/24/17
to NetBox
I try to launch gunicorn from directory /opt/netbox/netbox  :  gunicorn netbox.wsgi -b 127.0.0.1:8001

It's nearly working.

I can access the webserver but i don't have CSS.

So i go in apache2 log and i see :

[Mon Jul 24 17:14:23.973137 2017] [authz_core:error] [pid 1996:tid 140031326889728] [client 172.22.1.198:59162] AH01630: client denied by server configuration: /opt/netbox/netbox/static, referer: http://172.22.0.104/

i go to /opt/netbox/netbox

i don't have any static directory i have a project-static, i copy project-static to static.

Now i have netbox running.

But when i try  

sudo gunicorn -c /opt/netbox/gunicorn_config.py netbox.wsgi

it's not working.

Michaël

unread,
Jul 26, 2017, 4:27:08 AM7/26/17
to NetBox
to resolv the problem i login with root user and install the requirements with this user.

now it works
Reply all
Reply to author
Forward
0 new messages