You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
502 Bad Gateway after first install and reboot VM #6349
We will need more information, especially the output from the install, the service status output for inventree-web and inventree-worker and the version output from inventree run invoke version
For anyone who may find this in the future, I had this issue on my first setup attempt. Eventually I realized it was because I had nginx installed on the host machine and I was seeing the 502 nginx error page, NOT an error from inventree.
I would suggest verifying you don't have any other webservers running on the host machine.
Seeing the same problem on a fresh install of Ubuntu 20.04 server install.
systemctl status nginx
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-04-15 19:39:38 UTC; 1min 27s ago
Docs: man:nginx(8)
Process: 633 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 769 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 781 (nginx)
Tasks: 2 (limit: 2257)
Memory: 10.4M
CGroup: /system.slice/nginx.service
├─781 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─782 nginx: worker process
Apr 15 19:39:36 inventree-new systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 15 19:39:38 inventree-new systemd[1]: Started A high performance web server and a reverse proxy server.
systemctl status inventree-web
inventree-web.service
Loaded: loaded (/etc/systemd/system/inventree-web.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-04-15 19:39:36 UTC; 1min 36s ago
Main PID: 624 (sleep)
Tasks: 1 (limit: 2257)
Memory: 212.0K
CGroup: /system.slice/inventree-web.service
└─624 /bin/sleep infinity
Apr 15 19:39:36 inventree-new systemd[1]: Started inventree-web.service.
systemctl status inventree-worker
inventree-worker.service
Loaded: loaded (/etc/systemd/system/inventree-worker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-04-15 19:39:36 UTC; 1min 51s ago
Main PID: 628 (sleep)
Tasks: 1 (limit: 2257)
Memory: 220.0K
CGroup: /system.slice/inventree-worker.service
└─628 /bin/sleep infinity
inventree run invoke version
InvenTree - inventree.org
The Open-Source Inventory Management System
Installation paths:
Base /opt/inventree
Config /etc/inventree/config.yaml
Media /opt/inventree/data/media
Static /opt/inventree/data/static
Versions:
Python 3.9.5
Django 4.2.11
InvenTree 0.15.0 dev
API 187
Node N/A
Yarn N/A
Commit hash:None
Commit date:None
Activity
matmair commentedon Jan 30, 2024
We will need more information, especially the output from the install, the service status output for
inventree-webandinventree-workerand the version output frominventree run invoke versionXanderLuciano commentedon Mar 9, 2024
For anyone who may find this in the future, I had this issue on my first setup attempt. Eventually I realized it was because I had nginx installed on the host machine and I was seeing the 502 nginx error page, NOT an error from inventree.
I would suggest verifying you don't have any other webservers running on the host machine.
SchrodingersGat commentedon Mar 11, 2024
@XanderLuciano good tip - if there is a conflicting server already running, that will certainly cause problems.
matmair commentedon Mar 11, 2024
@toptop34 can you confirm this is the issue you are facing too?
StormTrooper commentedon Apr 15, 2024
Seeing the same problem on a fresh install of Ubuntu 20.04 server install.
systemctl status nginx
systemctl status inventree-web
systemctl status inventree-worker
inventree run invoke version
Install goes through without any errors and at the end of the install it says browse to:
http://192.168.1.66
Tried browing there (also tried rebooting) and get
502 Bad Gateway
nginx/1.18.0 (Ubuntu)
I've checked and nginx was not present prior to the inventree install.
StormTrooper commentedon Apr 15, 2024
@matmair Found the issue which caused my problem. Not sure if it's specific to stable or a bug in the master. (I installed master)
During the install process this file is created:
Which has a typo in it:
Inserting a slash between backend and InvenTree fixes this issue for me.
va7wv commentedon Apr 17, 2024
Same problem here today. I'm so lost on this now. How is anyone installing this?
Fresh Ubuntu Server 20.04 install. Nothing else done except run the install script with wget. Python venv problem?
Syslog:
github-actions commentedon Jun 16, 2024
This issue seems stale. Please react to show this is still important.