Unit exist with status code 1
unit.log
2018/04/19 06:59:10 [info] 2026#2026 "django" application started
2018/04/19 06:59:10 [alert] 2026#2026 Python failed to import module "wsgi"
2018/04/19 06:59:10 [notice] 1954#1954 process 2026 exited with code 1
2018/04/19 06:59:10 [warn] 1957#1957 failed to start application "django"
2018/04/19 06:59:10 [alert] 1957#1957 failed to apply new conf
unit.config
{
"listeners": {
"*:8080": {
"application": "django"
}
},
"applications": {
"django": {
"type": "python 3.5",
"processes": 1,
"module": "wsgi",
"user": "root",
"group": "root",
"path": "/srv/app",
"home": "/srv/venv"
}
}
}
Folder structure
vagrant@ubuntu-xenial:/srv/app$ tree
.
|-- app
| |-- __init__.py
| |-- pyinfo.py
| |-- settings.py
| |-- urls.py
| `-- views.py
|-- config.json
|-- db.sqlite3
|-- manage.py
|-- static
`-- wsgi.py
2 directories, 9 files
Note: Tried without virtualenv, still same error.
Hello, thanks for the report. What's inside wsgi.py?
Hello, try "path": "/srv", (without 'app' directory).
Most helpful comment
Hello, try
"path": "/srv",(without 'app' directory).