Skip to content

502 Bad gateway after Update #4134

Closed
Closed

Description

@eimparas

Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

Describe the bug*

Coming from The Subredit a cupple of days ago went to upgrade my inventreee instance , but it wasnt succsesfull .

The first log said that i had not specified A backup dir at my config , i did that with adding backup_dir: {backup folder} in the config the giving premmisions with chown

were stating that the prosses had finished with no issue .

the service is runing

Steps to Reproduce

  1. sudo apt update
  2. sudo apt upgrade
  3. "502 Bad Gateway"

Expected behavior

" 200 ok " and open the inventree webapp

Deployment Method

  • Docker
  • Bare metal

Version Information

issue appeared on upgrade to latest

Relevant log output

# Setting base environment variables
# Using existing config file: /etc/inventree/config.yaml
# Collected environment variables:
#    INVENTREE_MEDIA_ROOT=/opt/inventree/data/media
#    INVENTREE_STATIC_ROOT=/opt/inventree/data/static
#    INVENTREE_BACKUP_DIR=null
#    INVENTREE_PLUGINS_ENABLED=true
#    INVENTREE_PLUGIN_FILE=null
#    INVENTREE_SECRET_KEY_FILE=null
#    INVENTREE_DB_ENGINE=sqlite3
#    INVENTREE_DB_NAME=/opt/inventree/database.sqlite3
#    INVENTREE_DB_USER=null
#    INVENTREE_DB_HOST=null
#    INVENTREE_DB_PORT=null
# Getting the IP address of the server via web service
IP address is 94.69.249.72
# Setting up python enviroment
Requirement already satisfied: invoke in ./env/lib/python3.9/site-packages (1.7.3)
Requirement already satisfied: wheel in ./env/lib/python3.9/site-packages (0.38.4)
# Stopping nginx
# Setting up nginx to /etc/nginx/sites-enabled/inventree.conf
# Starting nginx
# (Re)creating init scripts
Nothing to do.
Nothing to do.
# Enabling InvenTree on boot
# Admin data already exists - skipping
# Stopping InvenTree
# Updating InvenTree
# inv update| Installing required python packages from 'requirements.txt'
# inv update| Requirement already satisfied: pip in ./env/lib/python3.9/site-packages (22.3.1)
# inv update| Collecting arrow==1.2.3
# inv update|   Downloading arrow-1.2.3-py3-none-any.whl (66 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.4/66.4 kB 1.2 MB/s eta 0:00:00
# inv update| Requirement already satisfied: asgiref==3.5.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (3.5.2)
# inv update| Requirement already satisfied: babel==2.10.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (2.10.3)
# inv update| Requirement already satisfied: bleach[css]==5.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 13)) (5.0.1)
# inv update| Requirement already satisfied: blessed==1.19.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (1.19.1)
# inv update| Requirement already satisfied: brotli==1.0.9 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (1.0.9)
# inv update| Collecting certifi==2022.9.24
# inv update|   Downloading certifi-2022.9.24-py3-none-any.whl (161 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.1/161.1 kB 3.2 MB/s eta 0:00:00
# inv update| Requirement already satisfied: cffi==1.15.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 23)) (1.15.1)
# inv update| Collecting charset-normalizer==2.1.1
# inv update|   Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
# inv update| Requirement already satisfied: coreapi==2.3.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (2.3.3)
# inv update| Requirement already satisfied: coreschema==0.0.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (0.0.4)
# inv update| Requirement already satisfied: cryptography==3.4.8 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (3.4.8)
# inv update| Collecting cssselect2==0.7.0
# inv update|   Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
# inv update| Requirement already satisfied: defusedxml==0.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 39)) (0.7.1)
# inv update| Requirement already satisfied: diff-match-patch==20200713 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 43)) (20200713)
# inv update| Collecting django==3.2.16
# inv update|   Downloading Django-3.2.16-py3-none-any.whl (7.9 MB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 11.8 MB/s eta 0:00:00
# inv update| Requirement already satisfied: django-allauth==0.51.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 71)) (0.51.0)
# inv update| Requirement already satisfied: django-allauth-2fa==0.10.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 75)) (0.10.0)
# inv update| Requirement already satisfied: django-cleanup==6.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 77)) (6.0.0)
# inv update| Requirement already satisfied: django-cors-headers==3.13.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 79)) (3.13.0)
# inv update| Requirement already satisfied: django-crispy-forms==1.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 81)) (1.14.0)
# inv update| Collecting django-dbbackup==4.0.2
# inv update|   Downloading django_dbbackup-4.0.2-py3-none-any.whl (56 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.2/56.2 kB 28.0 MB/s eta 0:00:00
# inv update| Requirement already satisfied: django-error-report==0.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 85)) (0.2.0)
# inv update| Requirement already satisfied: django-filter==22.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 87)) (22.1)
# inv update| Collecting django-formtools==2.4
# inv update|   Downloading django_formtools-2.4-py3-none-any.whl (154 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.4/154.4 kB 16.0 MB/s eta 0:00:00
# inv update| Requirement already satisfied: django-import-export==2.5.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 91)) (2.5.0)
# inv update| Requirement already satisfied: django-js-asset==2.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 93)) (2.0.0)
# inv update| Requirement already satisfied: django-maintenance-mode==0.16.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 95)) (0.16.3)
# inv update| Requirement already satisfied: django-markdownify==0.9.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 97)) (0.9.2)
# inv update| Requirement already satisfied: django-money==2.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 99)) (2.1.1)
# inv update| Requirement already satisfied: django-mptt==0.11.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 101)) (0.11.0)
# inv update| Requirement already satisfied: django-otp==1.1.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 103)) (1.1.3)
# inv update| Requirement already satisfied: django-picklefield==3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 105)) (3.1)
# inv update| Requirement already satisfied: django-q==1.3.9 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 107)) (1.3.9)
# inv update| Requirement already satisfied: django-redis==5.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 109)) (5.2.0)
# inv update| Requirement already satisfied: django-sql-utils==0.6.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 111)) (0.6.1)
# inv update| Requirement already satisfied: django-sslserver==0.22 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 113)) (0.22)
# inv update| Requirement already satisfied: django-stdimage==5.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 115)) (5.3.0)
# inv update| Requirement already satisfied: django-user-sessions==1.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 117)) (1.7.1)
# inv update| Collecting django-weasyprint==2.2.0
# inv update|   Downloading django_weasyprint-2.2.0-py3-none-any.whl (9.7 kB)
# inv update| Requirement already satisfied: django-xforwardedfor-middleware==2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 121)) (2.0)
# inv update| Collecting djangorestframework==3.14.0
# inv update|   Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 11.9 MB/s eta 0:00:00
# inv update| Requirement already satisfied: et-xmlfile==1.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 125)) (1.1.0)
# inv update| Collecting feedparser==6.0.10
# inv update|   Downloading feedparser-6.0.10-py3-none-any.whl (81 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.1/81.1 kB 18.1 MB/s eta 0:00:00
# inv update| Collecting fonttools[woff]==4.37.4
# inv update|   Downloading fonttools-4.37.4-py3-none-any.whl (960 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 960.8/960.8 kB 11.6 MB/s eta 0:00:00
# inv update| Requirement already satisfied: gunicorn==20.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 131)) (20.1.0)
# inv update| Requirement already satisfied: html5lib==1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 133)) (1.1)
# inv update| Collecting idna==3.4
# inv update|   Downloading idna-3.4-py3-none-any.whl (61 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 25.4 MB/s eta 0:00:00
# inv update| Collecting importlib-metadata==5.0.0
# inv update|   Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
# inv update| Requirement already satisfied: itypes==1.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 139)) (1.2.0)
# inv update| Requirement already satisfied: jinja2==3.1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 141)) (3.1.2)
# inv update| Requirement already satisfied: markdown==3.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 143)) (3.4.1)
# inv update| Requirement already satisfied: markuppy==1.14 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 145)) (1.14)
# inv update| Requirement already satisfied: markupsafe==2.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 147)) (2.1.1)
# inv update| Collecting oauthlib==3.2.1
# inv update|   Downloading oauthlib-3.2.1-py3-none-any.whl (151 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 16.5 MB/s eta 0:00:00
# inv update| Requirement already satisfied: odfpy==1.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 151)) (1.4.1)
# inv update| Requirement already satisfied: openpyxl==3.0.10 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 153)) (3.0.10)
# inv update| Requirement already satisfied: pdf2image==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 155)) (1.16.0)
# inv update| Requirement already satisfied: pillow==9.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 157)) (9.2.0)
# inv update| Requirement already satisfied: py-moneyed==1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 165)) (1.2)
# inv update| Requirement already satisfied: pycparser==2.21 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 169)) (2.21)
# inv update| Collecting pydyf==0.5.0
# inv update|   Downloading pydyf-0.5.0-py3-none-any.whl (6.8 kB)
# inv update| Collecting pyjwt[crypto]==2.5.0
# inv update|   Downloading PyJWT-2.5.0-py3-none-any.whl (20 kB)
# inv update| Collecting pyphen==0.13.0
# inv update|   Downloading pyphen-0.13.0-py3-none-any.whl (2.0 MB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 11.8 MB/s eta 0:00:00
# inv update| Requirement already satisfied: python-barcode[images]==0.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 177)) (0.14.0)
# inv update| Requirement already satisfied: python-dateutil==2.8.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 179)) (2.8.2)
# inv update| Collecting python-fsutil==0.7.0
# inv update|   Downloading python_fsutil-0.7.0-py3-none-any.whl (12 kB)
# inv update| Requirement already satisfied: python3-openid==3.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 183)) (3.2.0)
# inv update| Collecting pytz==2022.4
# inv update|   Downloading pytz-2022.4-py2.py3-none-any.whl (500 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 500.8/500.8 kB 12.3 MB/s eta 0:00:00
# inv update| Requirement already satisfied: pyyaml==6.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 191)) (6.0)
# inv update| Requirement already satisfied: qrcode[pil]==7.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 193)) (7.3.1)
# inv update| Requirement already satisfied: rapidfuzz==0.7.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 197)) (0.7.6)
# inv update| Requirement already satisfied: redis==3.5.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 199)) (3.5.3)
# inv update| Collecting regex==2022.9.13
# inv update|   Downloading regex-2022.9.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (769 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 770.0/770.0 kB 12.7 MB/s eta 0:00:00
# inv update| Requirement already satisfied: requests==2.28.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 205)) (2.28.1)
# inv update| Requirement already satisfied: requests-oauthlib==1.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 210)) (1.3.1)
# inv update| Collecting sentry-sdk==1.9.10
# inv update|   Downloading sentry_sdk-1.9.10-py2.py3-none-any.whl (162 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 kB 15.3 MB/s eta 0:00:00
# inv update| Collecting sgmllib3k==1.0.0
# inv update|   Downloading sgmllib3k-1.0.0.tar.gz (5.8 kB)
# inv update|   Preparing metadata (setup.py): started
# inv update|   Preparing metadata (setup.py): finished with status 'done'
# inv update| Requirement already satisfied: six==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 216)) (1.16.0)
# inv update| Collecting sqlparse==0.4.3
# inv update|   Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 68.9 MB/s eta 0:00:00
# inv update| Requirement already satisfied: tablib[html,ods,xls,xlsx,yaml]==3.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 226)) (3.2.1)
# inv update| Requirement already satisfied: tinycss2==1.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 230)) (1.1.1)
# inv update| Collecting types-cryptography==3.3.23
# inv update|   Downloading types_cryptography-3.3.23-py3-none-any.whl (30 kB)
# inv update| Requirement already satisfied: uritemplate==4.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 237)) (4.1.1)
# inv update| Collecting urllib3==1.26.12
# inv update|   Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
# inv update|      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.4/140.4 kB 16.7 MB/s eta 0:00:00
# inv update| Requirement already satisfied: wcwidth==0.2.5 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 243)) (0.2.5)
# inv update| Requirement already satisfied: weasyprint==54.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 245)) (54.3)
# inv update| Requirement already satisfied: webencodings==0.5.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 249)) (0.5.1)
# inv update| Requirement already satisfied: xlrd==2.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 255)) (2.0.1)
# inv update| Requirement already satisfied: xlwt==1.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 257)) (1.3.0)
# inv update| Collecting zipp==3.9.0
# inv update|   Downloading zipp-3.9.0-py3-none-any.whl (5.8 kB)
# inv update| Requirement already satisfied: zopfli==0.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 261)) (0.2.1)
# inv update| Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (from django-money==2.1.1->-r requirements.txt (line 99)) (44.1.1)
# inv update| Building wheels for collected packages: sgmllib3k
# inv update|   Building wheel for sgmllib3k (setup.py): started
# inv update|   Building wheel for sgmllib3k (setup.py): finished with status 'done'
# inv update|   Created wheel for sgmllib3k: filename=sgmllib3k-1.0.0-py3-none-any.whl size=6066 sha256=ba78ee0205dd6f59bc4c7f2f647a5a4177a22d994b3ea9cb26db30541ca0c022
# inv update|   Stored in directory: /tmp/pip-ephem-wheel-cache-v1r3zn84/wheels/00/a1/4a/3aaa30857be3b96a4a11fccfa1336686def7d898b8be2509dd
# inv update| Successfully built sgmllib3k
# inv update| Installing collected packages: types-cryptography, sgmllib3k, pytz, python-fsutil, zipp, urllib3, sqlparse, regex, pyphen, pyjwt, pydyf, oauthlib, idna, fonttools, feedparser, charset-normalizer, certifi, sentry-sdk, importlib-metadata, django, cssselect2, arrow, djangorestframework, django-formtools, django-dbbackup, django-weasyprint
# inv update|   Attempting uninstall: pytz
# inv update|     Found existing installation: pytz 2022.1
# inv update|     Uninstalling pytz-2022.1:
# inv update|       Successfully uninstalled pytz-2022.1
# inv update|   Attempting uninstall: python-fsutil
# inv update|     Found existing installation: python-fsutil 0.6.1
# inv update|     Uninstalling python-fsutil-0.6.1:
# inv update|       Successfully uninstalled python-fsutil-0.6.1
# inv update|   Attempting uninstall: zipp
# inv update|     Found existing installation: zipp 3.8.1
# inv update|     Uninstalling zipp-3.8.1:
# inv update|       Successfully uninstalled zipp-3.8.1
# inv update|   Attempting uninstall: urllib3
# inv update|     Found existing installation: urllib3 1.26.11
# inv update|     Uninstalling urllib3-1.26.11:
# inv update|       Successfully uninstalled urllib3-1.26.11
# inv update|   Attempting uninstall: sqlparse
# inv update|     Found existing installation: sqlparse 0.4.2
# inv update|     Uninstalling sqlparse-0.4.2:
# inv update|       Successfully uninstalled sqlparse-0.4.2
# inv update|   Attempting uninstall: pyphen
# inv update|     Found existing installation: pyphen 0.12.0
# inv update|     Uninstalling pyphen-0.12.0:
# inv update|       Successfully uninstalled pyphen-0.12.0
# inv update|   Attempting uninstall: pyjwt
# inv update|     Found existing installation: PyJWT 2.4.0
# inv update|     Uninstalling PyJWT-2.4.0:
# inv update|       Successfully uninstalled PyJWT-2.4.0
# inv update|   Attempting uninstall: pydyf
# inv update|     Found existing installation: pydyf 0.2.0
# inv update|     Uninstalling pydyf-0.2.0:
# inv update|       Successfully uninstalled pydyf-0.2.0
# inv update|   Attempting uninstall: oauthlib
# inv update|     Found existing installation: oauthlib 3.2.0
# inv update|     Uninstalling oauthlib-3.2.0:
# inv update|       Successfully uninstalled oauthlib-3.2.0
# inv update|   Attempting uninstall: idna
# inv update|     Found existing installation: idna 3.3
# inv update|     Uninstalling idna-3.3:
# inv update|       Successfully uninstalled idna-3.3
# inv update|   Attempting uninstall: fonttools
# inv update|     Found existing installation: fonttools 4.34.4
# inv update|     Uninstalling fonttools-4.34.4:
# inv update|       Successfully uninstalled fonttools-4.34.4
# inv update|   Attempting uninstall: charset-normalizer
# inv update|     Found existing installation: charset-normalizer 2.1.0
# inv update|     Uninstalling charset-normalizer-2.1.0:
# inv update|       Successfully uninstalled charset-normalizer-2.1.0
# inv update|   Attempting uninstall: certifi
# inv update|     Found existing installation: certifi 2022.6.15
# inv update|     Uninstalling certifi-2022.6.15:
# inv update|       Successfully uninstalled certifi-2022.6.15
# inv update|   Attempting uninstall: sentry-sdk
# inv update|     Found existing installation: sentry-sdk 1.9.0
# inv update|     Uninstalling sentry-sdk-1.9.0:
# inv update|       Successfully uninstalled sentry-sdk-1.9.0
# inv update|   Attempting uninstall: importlib-metadata
# inv update|     Found existing installation: importlib-metadata 4.12.0
# inv update|     Uninstalling importlib-metadata-4.12.0:
# inv update|       Successfully uninstalled importlib-metadata-4.12.0
# inv update|   Attempting uninstall: django
# inv update|     Found existing installation: Django 3.2.15
# inv update|     Uninstalling Django-3.2.15:
# inv update|       Successfully uninstalled Django-3.2.15
# inv update|   Attempting uninstall: cssselect2
# inv update|     Found existing insPlugin configuration file does not exist - creating default file
Traceback (most recent call last):
  File "/opt/inventree/InvenTree/manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/inventree/env/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/inventree/env/lib/python3.9/site-packages/django/core/management/__init__.py", line 363, in execute
    settings.INSTALLED_APPS
  File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/inventree/InvenTree/InvenTree/settings.py", line 148, in <module>
    DBBACKUP_STORAGE_OPTIONS = {'location': config.get_backup_dir()}
  File "/opt/inventree/InvenTree/InvenTree/config.py", line 174, in get_backup_dir
    bd.mkdir(parents=True, exist_ok=True)
  File "/usr/lib/python3.9/pathlib.py", line 1312, in mkdir
    self._accessor.mkdir(self, mode)
FileExistsError: [Errno 17] File exists: '/opt/inventree/InvenTree/null'
tallation: cssselect2 0.6.0
# inv update|     Uninstalling cssselect2-0.6.0:
# inv update|       Successfully uninstalled cssselect2-0.6.0
# inv update|   Attempting uninstall: arrow
# inv update|     Found existing installation: arrow 1.2.2
# inv update|     Uninstalling arrow-1.2.2:
# inv update|       Successfully uninstalled arrow-1.2.2
# inv update|   Attempting uninstall: djangorestframework
# inv update|     Found existing installation: djangorestframework 3.13.1
# inv update|     Uninstalling djangorestframework-3.13.1:
# inv update|       Successfully uninstalled djangorestframework-3.13.1
# inv update|   Attempting uninstall: django-formtools
# inv update|     Found existing installation: django-formtools 2.3
# inv update|     Uninstalling django-formtools-2.3:
# inv update|       Successfully uninstalled django-formtools-2.3
# inv update|   Attempting uninstall: django-weasyprint
# inv update|     Found existing installation: django-weasyprint 2.1.0
# inv update|     Uninstalling django-weasyprint-2.1.0:
# inv update|       Successfully uninstalled django-weasyprint-2.1.0
# inv update| Successfully installed arrow-1.2.3 certifi-2022.9.24 charset-normalizer-2.1.1 cssselect2-0.7.0 django-3.2.16 django-dbbackup-4.0.2 django-formtools-2.4 django-weasyprint-2.2.0 djangorestframework-3.14.0 feedparser-6.0.10 fonttools-4.37.4 idna-3.4 importlib-metadata-5.0.0 oauthlib-3.2.1 pydyf-0.5.0 pyjwt-2.5.0 pyphen-0.13.0 python-fsutil-0.7.0 pytz-2022.4 regex-2022.9.13 sentry-sdk-1.9.10 sgmllib3k-1.0.0 sqlparse-0.4.3 types-cryptography-3.3.23 urllib3-1.26.12 zipp-3.9.0
# inv update| Installing plugin packages from 'null'
# inv update| Backing up InvenTree database...
# Set permissions for data dir and media: /opt/inventree/data
# Starting InvenTree
####################################################################################
This InvenTree install uses nginx, the settings for the webserver can be found in
/etc/nginx/sites-enabled/inventree.conf
Try opening InvenTree with either
http://localhost/ or 
 
Admin user data:
   Email: 
   Username: 
   Password: 
####################################################################################
 



>  invoke update
Installing required python packages from 'requirements.txt'
Requirement already satisfied: pip in ./env/lib/python3.9/site-packages (22.3.1)
Requirement already satisfied: arrow==1.2.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (1.2.3)
Requirement already satisfied: asgiref==3.5.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (3.5.2)
Requirement already satisfied: babel==2.10.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (2.10.3)
Requirement already satisfied: bleach[css]==5.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 13)) (5.0.1)
Requirement already satisfied: blessed==1.19.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (1.19.1)
Requirement already satisfied: brotli==1.0.9 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (1.0.9)
Requirement already satisfied: certifi==2022.9.24 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 19)) (2022.9.24)
Requirement already satisfied: cffi==1.15.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 23)) (1.15.1)
Requirement already satisfied: charset-normalizer==2.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 27)) (2.1.1)
Requirement already satisfied: coreapi==2.3.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (2.3.3)
Requirement already satisfied: coreschema==0.0.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (0.0.4)
Requirement already satisfied: cryptography==3.4.8 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (3.4.8)
Requirement already satisfied: cssselect2==0.7.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 37)) (0.7.0)
Requirement already satisfied: defusedxml==0.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 39)) (0.7.1)
Requirement already satisfied: diff-match-patch==20200713 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 43)) (20200713)
Requirement already satisfied: django==3.2.16 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 45)) (3.2.16)
Requirement already satisfied: django-allauth==0.51.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 71)) (0.51.0)
Requirement already satisfied: django-allauth-2fa==0.10.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 75)) (0.10.0)
Requirement already satisfied: django-cleanup==6.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 77)) (6.0.0)
Requirement already satisfied: django-cors-headers==3.13.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 79)) (3.13.0)
Requirement already satisfied: django-crispy-forms==1.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 81)) (1.14.0)
Requirement already satisfied: django-dbbackup==4.0.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 83)) (4.0.2)
Requirement already satisfied: django-error-report==0.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 85)) (0.2.0)
Requirement already satisfied: django-filter==22.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 87)) (22.1)
Requirement already satisfied: django-formtools==2.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 89)) (2.4)
Requirement already satisfied: django-import-export==2.5.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 91)) (2.5.0)
Requirement already satisfied: django-js-asset==2.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 93)) (2.0.0)
Requirement already satisfied: django-maintenance-mode==0.16.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 95)) (0.16.3)
Requirement already satisfied: django-markdownify==0.9.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 97)) (0.9.2)
Requirement already satisfied: django-money==2.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 99)) (2.1.1)
Requirement already satisfied: django-mptt==0.11.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 101)) (0.11.0)
Requirement already satisfied: django-otp==1.1.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 103)) (1.1.3)
Requirement already satisfied: django-picklefield==3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 105)) (3.1)
Requirement already satisfied: django-q==1.3.9 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 107)) (1.3.9)
Requirement already satisfied: django-redis==5.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 109)) (5.2.0)
Requirement already satisfied: django-sql-utils==0.6.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 111)) (0.6.1)
Requirement already satisfied: django-sslserver==0.22 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 113)) (0.22)
Requirement already satisfied: django-stdimage==5.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 115)) (5.3.0)
Requirement already satisfied: django-user-sessions==1.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 117)) (1.7.1)
Requirement already satisfied: django-weasyprint==2.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 119)) (2.2.0)
Requirement already satisfied: django-xforwardedfor-middleware==2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 121)) (2.0)
Requirement already satisfied: djangorestframework==3.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 123)) (3.14.0)
Requirement already satisfied: et-xmlfile==1.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 125)) (1.1.0)
Requirement already satisfied: feedparser==6.0.10 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 127)) (6.0.10)
Requirement already satisfied: fonttools[woff]==4.37.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 129)) (4.37.4)
Requirement already satisfied: gunicorn==20.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 131)) (20.1.0)
Requirement already satisfied: html5lib==1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 133)) (1.1)
Requirement already satisfied: idna==3.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 135)) (3.4)
Requirement already satisfied: importlib-metadata==5.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 137)) (5.0.0)
Requirement already satisfied: itypes==1.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 139)) (1.2.0)
Requirement already satisfied: jinja2==3.1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 141)) (3.1.2)
Requirement already satisfied: markdown==3.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 143)) (3.4.1)
Requirement already satisfied: markuppy==1.14 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 145)) (1.14)
Requirement already satisfied: markupsafe==2.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 147)) (2.1.1)
Requirement already satisfied: oauthlib==3.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 149)) (3.2.1)
Requirement already satisfied: odfpy==1.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 151)) (1.4.1)
Requirement already satisfied: openpyxl==3.0.10 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 153)) (3.0.10)
Requirement already satisfied: pdf2image==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 155)) (1.16.0)
Requirement already satisfied: pillow==9.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 157)) (9.2.0)
Requirement already satisfied: py-moneyed==1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 165)) (1.2)
Requirement already satisfied: pycparser==2.21 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 169)) (2.21)
Requirement already satisfied: pydyf==0.5.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 171)) (0.5.0)
Requirement already satisfied: pyjwt[crypto]==2.5.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 173)) (2.5.0)
Requirement already satisfied: pyphen==0.13.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 175)) (0.13.0)
Requirement already satisfied: python-barcode[images]==0.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 177)) (0.14.0)
Requirement already satisfied: python-dateutil==2.8.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 179)) (2.8.2)
Requirement already satisfied: python-fsutil==0.7.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 181)) (0.7.0)
Requirement already satisfied: python3-openid==3.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 183)) (3.2.0)
Requirement already satisfied: pytz==2022.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 185)) (2022.4)
Requirement already satisfied: pyyaml==6.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 191)) (6.0)
Requirement already satisfied: qrcode[pil]==7.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 193)) (7.3.1)
Requirement already satisfied: rapidfuzz==0.7.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 197)) (0.7.6)
Requirement already satisfied: redis==3.5.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 199)) (3.5.3)
Requirement already satisfied: regex==2022.9.13 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 203)) (2022.9.13)
Requirement already satisfied: requests==2.28.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 205)) (2.28.1)
Requirement already satisfied: requests-oauthlib==1.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 210)) (1.3.1)
Requirement already satisfied: sentry-sdk==1.9.10 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 212)) (1.9.10)
Requirement already satisfied: sgmllib3k==1.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 214)) (1.0.0)
Requirement already satisfied: six==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 216)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 222)) (0.4.3)
Requirement already satisfied: tablib[html,ods,xls,xlsx,yaml]==3.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 226)) (3.2.1)
Requirement already satisfied: tinycss2==1.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 230)) (1.1.1)
Requirement already satisfied: types-cryptography==3.3.23 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 235)) (3.3.23)
Requirement already satisfied: uritemplate==4.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 237)) (4.1.1)
Requirement already satisfied: urllib3==1.26.12 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 239)) (1.26.12)
Requirement already satisfied: wcwidth==0.2.5 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 243)) (0.2.5)
Requirement already satisfied: weasyprint==54.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 245)) (54.3)
Requirement already satisfied: webencodings==0.5.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 249)) (0.5.1)
Requirement already satisfied: xlrd==2.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 255)) (2.0.1)
Requirement already satisfied: xlwt==1.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 257)) (1.3.0)
Requirement already satisfied: zipp==3.9.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 259)) (3.9.0)
Requirement already satisfied: zopfli==0.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 261)) (0.2.1)
Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (from django-money==2.1.1->-r requirements.txt (line 99)) (44.1.1)
Installing plugin packages from '/opt/inventree/InvenTree/plugins.txt'
Backing up InvenTree database...
Backing Up Database: /opt/inventree/database.sqlite3
Writing file to default-Inventree-2022-12-30-125957.dump.gz
Backing up InvenTree media files...
Writing file to Inventree-2022-12-30-125959.tar.gz
Running InvenTree database migrations...
========================================
No changes detected
Operations to perform:
  Apply all migrations: account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Running migrations:
  No migrations to apply.
Operations to perform:
  Synchronize unmigrated apps: InvenTree, allauth, allauth_2fa, corsheaders, crispy_forms, dbbackup, django_cleanup, django_filters, django_otp, djmoney, formtools, import_export, maintenance_mode, markdownify, messages, mptt, rest_framework, staticfiles
  Apply all migrations: account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
Running migrations:
  No migrations to apply.
System check identified no issues (1 silenced).
========================================
InvenTree database migrations completed!
Rebuilding Part objects
Rebuilding PartCategory objects
Rebuilding StockItem objects
Rebuilding StockLocation objects
Rebuilding Build objects
render api.js
render barcode.js
render helpers.js
render report.js
render model_renderers.js
render stock.js
render bom.js
render plugin.js
render tables.js
render label.js
render company.js
render filters.js
render search.js
render pricing.js
render order.js
render modals.js
render table_filters.js
render build.js
render news.js
render forms.js
render notification.js
render attachment.js
render part.js
render charts.js
rendered all files in /opt/inventree/InvenTree/templates/js/translated
 
624 static files copied to '/opt/inventree/data/static', 2250 unmodified.
13:00:36 [Q] INFO Enqueued 2141
InvenTree translation coverage: 22%
File “/opt/inventree/InvenTree/locale/hu/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/ja/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/nl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/es_MX/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/no/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/pl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/ru/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/cs/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/ko/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/it/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/vi/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/id/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/el/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/he/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/sv/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/th/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/de/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/fa/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/fr/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/pt/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/da/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/zh/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/es/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/pt_br/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/en/LC_MESSAGES/django.po” is already compiled and up to date.
File “/opt/inventree/InvenTree/locale/tr/LC_MESSAGES/django.po” is already compiled and up to date.


> sudo systemctl status inventree 
● inventree.service
     Loaded: loaded (/etc/systemd/system/inventree.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-12-30 07:52:16 EST; 2h 1min ago
   Main PID: 348 (sleep)
      Tasks: 1 (limit: 4676)
     Memory: 192.0K
        CPU: 1ms
     CGroup: /system.slice/inventree.service
             └─348 /bin/sleep infinity

Dec 30 07:52:16 Inventree systemd[1]: Started inventree.service.

Activity

  1. added
    bug
    question
    triage:not-checked
    on Jan 2, 2023
  2. matmair commented on Jan 2, 2023

    @matmair
    Member

    @finos2 what version exactly were you upgrading from and on which exact os (kernel version and architecture) are you on?

  3. matmair commented on Jan 2, 2023

    @matmair
    Member

    @finos2 can you please also confirm that the backup dir is set in the package config, not in the config file. You can do this by running 'inventree config' and checking that backup dir is not null.

  4. eimparas commented on Jan 3, 2023

    @eimparas
    Author

    @matmair

    what version exactly were you upgrading from and on which exact os (kernel version and architecture) are you on?

    I Am runing it on a VM on proxmox , x86 , OS: Debian 5.10.158-2 (2022-12-13) x86_64

    im not sure about the version , it was deployed around mid november , id guess 0.8.4

    can you please also confirm that the backup dir is set in the package config, not in the config file. You can do this by running 'inventree config' and checking that backup dir is not null.

    the output of inventree config was

    APP_GROUP=inventree
    APP_HOME=/opt/inventree
    APP_NAME=inventree
    APP_RUNNER_CLI=systemctl
    APP_RUNNER_TYPE=systemd
    APP_SAFE_NAME=inventree
    APP_USER=inventree
    APP_WIZARDS=
    FORWARDED_ALLOW_IPS=*
    GUNICORN_CMD_ARGS=--access-logfile -
    HOME=/home/inventree
    INVENTREE_CONFIG_FILE=/etc/inventree/config.yaml
    LANG=en_US.UTF-8
    OLDPWD=/opt/inventree
    ORIGINAL_PWD=/opt/inventree
    PATH=/opt/inventree/.heroku/python/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.:/usr/sbin
    PORT=6000
    PWD=/opt/inventree
    PYTHONHASHSEED=random
    PYTHONPATH=/opt/inventree
    PYTHONUNBUFFERED=true
    ROOT_PATH=/
    SHLVL=0
    

    I dont realy see a mention about backup...

  5. added
    setup
    and removed
    bug
    triage:not-checked
    on Jan 3, 2023
  6. self-assigned this
    on Jan 3, 2023
  7. added this to the 0.10.0 milestone on Jan 3, 2023
  8. matmair commented on Jan 3, 2023

    @matmair
    Member

    @finos2 that looks all nominal. You checked for the process status - can you please do the same for inventree-web and inventree-worker?
    Also please check if there are any ports exposed on your server with sudo lsof -i -P -n | grep LISTEN.
    I am suspecting some misconfiguration is killing the gunicorn server on startup.

    Just to cover our bases: Did you change the port inventree is served internally or do you have anything running on port 5000/6000?

  9. eimparas commented on Jan 3, 2023

    @eimparas
    Author
    sudo systemctl status inventree-web
    
    ● inventree-web.service
         Loaded: loaded (/etc/systemd/system/inventree-web.service; enabled; vendor preset: enabled)
         Active: active (running) since Fri 2022-12-30 09:55:36 EST; 3 days ago
       Main PID: 1718 (sleep)
          Tasks: 1 (limit: 4676)
         Memory: 144.0K
            CPU: 1ms
         CGroup: /system.slice/inventree-web.service
                 └─1718 /bin/sleep infinity
    
    Dec 30 09:55:36 Inventree systemd[1]: Started inventree-web.service.
    

    &

    ● inventree-worker.service
         Loaded: loaded (/etc/systemd/system/inventree-worker.service; enabled; vendor preset: enabled)
         Active: active (running) since Fri 2022-12-30 09:55:36 EST; 3 days ago
       Main PID: 1720 (sleep)
          Tasks: 1 (limit: 4676)
         Memory: 144.0K
            CPU: 1ms
         CGroup: /system.slice/inventree-worker.service
                 └─1720 /bin/sleep infinity
    
    Dec 30 09:55:36 Inventree systemd[1]: Started inventree-worker.service.
    

    both runing

    Now , about the ports , it was runing , or for being precice, i was accresing it, on port 80 .

    sudo lsof -i -P -n | grep LISTEN
    sshd      419      root    3u  IPv4  11688      0t0  TCP *:22 (LISTEN)
    sshd      419      root    4u  IPv6  11699      0t0  TCP *:22 (LISTEN)
    nginx    6204      root    6u  IPv4  37863      0t0  TCP *:80 (LISTEN)
    nginx    6205  www-data    6u  IPv4  37863      0t0  TCP *:80 (LISTEN)
    
  10. matmair commented on Jan 17, 2023

    @matmair
    Member

    @finos2 can you try to run sudo service inventree restart and then sudo service inventree-web-1 status? The inventree-web service is just an empty parent process for the web processes that are spawned so there might be more logs there.

  11. eimparas commented on Jan 18, 2023

    @eimparas
    Author

    @matmair
    The output of sudo service inventree-web-1 status

         Loaded: loaded (/etc/systemd/system/inventree-web-1.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Wed 2023-01-18 06:25:02 EST; 5s ago
        Process: 1008 ExecStart=/usr/bin/inventree run web (code=exited, status=3)
       Main PID: 1008 (code=exited, status=3)
            CPU: 1.153s
    
    Jan 18 06:25:01 Inventree systemd[1]: inventree-web-1.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
    Jan 18 06:25:01 Inventree systemd[1]: inventree-web-1.service: Failed with result 'exit-code'.
    Jan 18 06:25:01 Inventree systemd[1]: inventree-web-1.service: Consumed 1.153s CPU time.
    Jan 18 06:25:02 Inventree systemd[1]: inventree-web-1.service: Scheduled restart job, restart counter is at 5.
    Jan 18 06:25:02 Inventree systemd[1]: Stopped inventree-web-1.service.
    Jan 18 06:25:02 Inventree systemd[1]: inventree-web-1.service: Consumed 1.153s CPU time.
    Jan 18 06:25:02 Inventree systemd[1]: inventree-web-1.service: Start request repeated too quickly.
    Jan 18 06:25:02 Inventree systemd[1]: inventree-web-1.service: Failed with result 'exit-code'.
    Jan 18 06:25:02 Inventree systemd[1]: Failed to start inventree-web-1.service.
    

    i tryed doing systemctl restart , but the issue wasnt fixed

  12. 12 remaining items

  13. eimparas commented on Jan 3, 2024

    @eimparas
    Author

    funny thing for me is that systemctl | grep "inventree" returns that all services are running :

      session-43.scope                                                                            loaded active running   Session 43 of user inventree
      inventree-web-1.service                                                                     loaded active running   inventree-web-1.service
      inventree-web.service                                                                       loaded active running   inventree-web.service
      inventree-worker-1.service                                                                  loaded active running   inventree-worker-1.service
      inventree-worker.service                                                                    loaded active running   inventree-worker.service
      inventree.service                                                                           loaded active running   inventree.servic
    

    But sudo service inventree-web-1 status returns :

    ● inventree-web-1.service
         Loaded: loaded (/etc/systemd/system/inventree-web-1.service; enabled; vendor preset: enabled)
         Active: active (running) since Wed 2024-01-03 03:24:12 EST; 4s ago
       Main PID: 2628301 (gunicorn)
          Tasks: 1 (limit: 2323)
         Memory: 90.1M
            CPU: 2.188s
         CGroup: /system.slice/inventree-web-1.service
                 └─2628301 /opt/inventree/env/bin/python3 env/bin/gunicorn --chdir /opt/inventree/InvenTree -c InvenTree/gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:6000
    
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:     with maintenance_mode_on():
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:   File "/opt/inventree/env/lib/python3.9/site-packages/maintenance_mode/core.py", line 76, in __enter__
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:     self.old_value = get_maintenance_mode()
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:   File "/opt/inventree/env/lib/python3.9/site-packages/maintenance_mode/core.py", line 42, in get_mainten>Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:     return backend.get_value()
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:   File "/opt/inventree/env/lib/python3.9/site-packages/maintenance_mode/backends.py", line 66, in get_val>Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:     return self.from_str_to_bool_value(statefile.read())
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:   File "/opt/inventree/env/lib/python3.9/site-packages/maintenance_mode/backends.py", line 21, in from_st>Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]:     raise ValueError("state value is not 0|1")
    Jan 03 03:24:17 Inventree inventree-web-1.service[2628301]: ValueError: state value is not 0|1
    Jan 03 03:24:17 Inventree systemd[1]: inventree-web-1.service: Main process exited, code=exited, status=1/FAILURE
    Jan 03 03:24:17 Inventree systemd[1]: inventree-web-1.service: Failed with result 'exit-code'.
    Jan 03 03:24:17 Inventree systemd[1]: inventree-web-1.service: Consumed 2.536s CPU time.
    

    maybe that @matmair who responed last time on the issue has a idea what went wrong

  14. JustusRijke commented on Jan 3, 2024

    @JustusRijke
    Contributor

    As a sanity check I reverted my InvenTree VM, and tried the upgrade again (after manually stopping all inventree services). Same result. Also checked if the nginx conf was changed, but other than some comments it was identical to the pre-upgrade version.

    sudo apt install --only-upgrade inventree returns:

    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages will be upgraded:
      inventree
    1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
    Need to get 0 B/117 MB of archives.
    After this operation, 32.5 MB of additional disk space will be used.
    Reading changelogs... Done
    (Reading database ... 73097 files and directories currently installed.)
    Preparing to unpack .../inventree_0.13.0-1702638825.301afaa9.focal_amd64.deb ...
    Unpacking inventree (0.13.0-1702638825.301afaa9.focal) over (0.12.8-1698964278.a7487ff8.focal) ...
    Setting up inventree (0.13.0-1702638825.301afaa9.focal) ...
    # Setting base environment variables
    # Using existing config file: /etc/inventree/config.yaml
    
    [notice] A new release of pip is available: 23.3.1 -> 23.3.2
    [notice] To update, run: pip install --upgrade pip
    # Collected environment variables:
    #    INVENTREE_MEDIA_ROOT=/opt/inventree/data/media
    #    INVENTREE_STATIC_ROOT=/opt/inventree/data/static
    #    INVENTREE_BACKUP_DIR=/opt/inventree/data/backup
    #    INVENTREE_PLUGINS_ENABLED=true
    #    INVENTREE_PLUGIN_FILE=/etc/inventree/plugins.txt
    #    INVENTREE_SECRET_KEY_FILE=/etc/inventree/secret_key.txt
    #    INVENTREE_DB_ENGINE=postgresql
    #    INVENTREE_DB_NAME=inventree
    #    INVENTREE_DB_USER=inventree
    #    INVENTREE_DB_HOST=localhost
    #    INVENTREE_DB_PORT=5432
    # Getting the IP address of the server via web service
    IP address is xxx.xxx.xxx.xxx
    # Setting up python environment
    Requirement already satisfied: invoke in ./env/lib/python3.9/site-packages (2.1.3)
    Requirement already satisfied: wheel in ./env/lib/python3.9/site-packages (0.40.0)
    
    [notice] A new release of pip is available: 23.3.1 -> 23.3.2
    [notice] To update, run: pip install --upgrade pip
    # Stopping nginx
    # Setting up nginx to /etc/nginx/sites-enabled/inventree.conf
    # Starting nginx
    # (Re)creating init scripts
    Nothing to do.
    Nothing to do.
    # Enabling InvenTree on boot
    # Admin data already exists - skipping
    # Stopping InvenTree
    # Updating InvenTree
    Requirement already satisfied: wheel in ./env/lib/python3.9/site-packages (0.40.0)
    
    [notice] A new release of pip is available: 23.3.1 -> 23.3.2
    [notice] To update, run: pip install --upgrade pip
    No idea what '--no-frontend' is!
    # Set permissions for data dir and media: /opt/inventree/data
    # Starting InvenTree
    ####################################################################################
    This InvenTree install uses nginx, the settings for the webserver can be found in
    /etc/nginx/sites-enabled/inventree.conf
    Try opening InvenTree with either
    http://localhost/ or http://xxx.xxx.xxx.xxx
    

    I recall previous upgrades showed misc. inv update database migration stuff, that seems to be not the case during this upgrade (from 0.12 -> 0.13). Running on Debian 11.

    curl http://localhost returns:

    <html>
    <head><title>502 Bad Gateway</title></head>
    <body>
    <center><h1>502 Bad Gateway</h1></center>
    <hr><center>nginx/1.18.0</center>
    </body>
    </html>
    
  15. JustusRijke commented on Jan 3, 2024

    @JustusRijke
    Contributor

    @eimparas Running inv update manually & rebooting did the trick!
    @SchrodingersGat @matmair maybe something is wrong with the upgrade script (seems to skip running inv update)?

  16. eimparas commented on Jan 3, 2024

    @eimparas
    Author

    @JustusRijke

    inv: command not found` did you mean inventree update? 
    

    I tryed it with the venv in the install dir and i got

     inv update
    Traceback (most recent call last):
      File "/opt/inventree/env/bin/inv", line 8, in <module>
        sys.exit(program.run())
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 373, in run
        self.parse_collection()
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 465, in parse_collection
        self.load_collection()
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 699, in load_collection
        module, parent = loader.load(coll_name)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/loader.py", line 76, in load
        module = imp.load_module(name, fd, path, desc)
      File "/usr/lib/python3.9/imp.py", line 234, in load_module
        return load_source(name, filename, file)
      File "/usr/lib/python3.9/imp.py", line 171, in load_source
        module = _load(spec)
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 790, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/inventree/tasks.py", line 352, in <module>
        def update(c, skip_backup=False, frontend: bool = False):
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 357, in inner
        obj = klass(
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 76, in __init__
        self.positional = self.fill_implicit_positionals(positional)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
        args, spec_dict = self.argspec(self.body)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 153, in argspec
        spec = inspect.getargspec(func)
      File "/usr/lib/python3.9/inspect.py", line 1122, in getargspec
        raise ValueError("Function has keyword-only parameters or annotations"
    ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
    
  17. JustusRijke commented on Jan 3, 2024

    @JustusRijke
    Contributor

    @eimparas I have a bare metal setup, with InvenTree installed using the installer. First, I stopped all inventree services (using systemctl stop), then ran the following commands:

    ls /opt/inventree
    source ./env/bin/activate
    inv update
    reboot now
    
  18. eimparas commented on Jan 3, 2024

    @eimparas
    Author

    @JustusRijke

    just run your commands .

     sudo systemctl stop inventree-web
    inventree@Inventree:~$ sudo systemctl stop inventree-web-1
    inventree@Inventree:~$ sudo systemctl stop inventree-worker
    inventree@Inventree:~$ sudo systemctl stop inventree-worker-1
    
    inventree@Inventree:~$ systemctl | grep "inventree"
      session-49.scope                                                                            loaded active running   Session 49 of user inventree
    
    inventree@Inventree:~$ ls /opt/inventree/
    backportrc.json  commit.json      data              docker-compose.yml  env        log                Procfile         requirements-dev.in   runtime.txt  tasks.py
    backup           contrib          database.sqlite3  docker.dev.env      images     null               README.md        requirements-dev.txt  SECURITY.md  vendor
    branches.json    CONTRIBUTING.md  deploy            Dockerfile          InvenTree  package.json       readthedocs.yml  requirements.in       setup.cfg    VERSION
    ci               crowdin.yml      docker            docs                LICENSE    package-lock.json  RELEASE.md       requirements.txt      src          yarn.lock
    inventree@Inventree:~$ cd /opt/inventree/
    inventree@Inventree:/opt/inventree$ ls
    backportrc.json  commit.json      data              docker-compose.yml  env        log                Procfile         requirements-dev.in   runtime.txt  tasks.py
    backup           contrib          database.sqlite3  docker.dev.env      images     null               README.md        requirements-dev.txt  SECURITY.md  vendor
    branches.json    CONTRIBUTING.md  deploy            Dockerfile          InvenTree  package.json       readthedocs.yml  requirements.in       setup.cfg    VERSION
    ci               crowdin.yml      docker            docs                LICENSE    package-lock.json  RELEASE.md       requirements.txt      src          yarn.lock
    
    inventree@Inventree:/opt/inventree$ source ./env/bin/activate
    (env) inventree@Inventree:/opt/inventree$ inv update
    
    Traceback (most recent call last):
      File "/opt/inventree/env/bin/inv", line 8, in <module>
        sys.exit(program.run())
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 373, in run
        self.parse_collection()
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 465, in parse_collection
        self.load_collection()
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/program.py", line 699, in load_collection
        module, parent = loader.load(coll_name)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/loader.py", line 76, in load
        module = imp.load_module(name, fd, path, desc)
      File "/usr/lib/python3.9/imp.py", line 234, in load_module
        return load_source(name, filename, file)
      File "/usr/lib/python3.9/imp.py", line 171, in load_source
        module = _load(spec)
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 790, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/inventree/tasks.py", line 352, in <module>
        def update(c, skip_backup=False, frontend: bool = False):
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 357, in inner
        obj = klass(
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 76, in __init__
        self.positional = self.fill_implicit_positionals(positional)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
        args, spec_dict = self.argspec(self.body)
      File "/opt/inventree/env/lib/python3.9/site-packages/invoke/tasks.py", line 153, in argspec
        spec = inspect.getargspec(func)
      File "/usr/lib/python3.9/inspect.py", line 1122, in getargspec
        raise ValueError("Function has keyword-only parameters or annotations"
    ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
    

    curl 127.0.0.1 For me to returns :

    <html>
    <head><title>502 Bad Gateway</title></head>
    <body>
    <center><h1>502 Bad Gateway</h1></center>
    <hr><center>nginx/1.18.0</center>
    </body>
    </html>
    
  19. JustusRijke commented on Jan 4, 2024

    @JustusRijke
    Contributor

    Hm, seems to be a different problem. Also noticed that at my system, inventree.service was running but not on your system.
    Are you able to revert back to your previous installation (VM snapshot), and post the log output of apt install --only-upgrade inventree?

    I've created a new issue #6156 for the installer issue.

  20. SparkeyinVA commented on Jan 4, 2024

    @SparkeyinVA

    I am not sure if this is being reviewed still or not. I tried to do an update on December 28 and I have not been able to get it running since. just the 502 error. I was also updating python to 3.10 and thought that was the cause. After fighting with it and even trying to build a new system, I decided to come look here and saw that the new report was closed - issue #6156 and pointed back here. I have also seen where there are new reedit threads started since the first of the week saying the same thing is happening to them.

    Is there anything that I can do to help get the installer and inventree back up and running?

    BTW I have tried to get it going on ubuntu 20.04 and 22.04 both on the server I have been running for a year with no issue and on clean installs on both versions of ubuntu.

  21. JustusRijke commented on Jan 4, 2024

    @JustusRijke
    Contributor

    Which of the possible fixes described in this issue have you tried already?

  22. SparkeyinVA commented on Jan 4, 2024

    @SparkeyinVA

    I have tried a new install and I keep getting 'tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied'

    When i tried systemctl | grep "inventree"
    Only inventree-worker-1.service was not running

    I tried your suggestion from above:
    ls /opt/inventree
    source ./env/bin/activate
    inv update
    reboot now

    I had the same issue and return that @eimparas posted. But if changed it to:
    cd /opt/inventree
    source ./env/bin/activate
    inv update
    reboot now

    inv update ran as expected but ended with 'tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied'
    and the reboot now dosen't work

    Trying sudo apt install --only-upgrade inventree
    sudo apt reinstall --only-upgrade inventree
    and the one line installer

    all ended with 'tee: /etc/apt/trusted.gpg.d/pkgr-inventree.gpg: Permission denied'

  23. JustusRijke commented on Jan 4, 2024

    @JustusRijke
    Contributor

    Hm I think this is yet another variant of the 502 problem. Possibly related to the others but to keep things clear my suggestion is to create a new issue, and go from there.

  24. eimparas commented on Jan 6, 2024

    @eimparas
    Author

    Hm, seems to be a different problem. Also noticed that at my system, inventree.service was running but not on your system. Are you able to revert back to your previous installation (VM snapshot), and post the log output of apt install --only-upgrade inventree?

    Im unable to revert back ... i was "smart" enough to get a snapshot before this upgrade ... what could go wrong :-/

  25. matmair commented on Jan 8, 2024

    @matmair
    Member

    please don't reuse closed issues, I have no idea how the missbehaving setups look like and what versions we are talking about from this conversation

  26. matmair commented on Jan 8, 2024

    @matmair
    Member

    @eimparas your original issue seems that there is an empty maintenance_mode_state.txt in your static directory (see error message ValueError: state value is not 0|1). That could happen if there was still a worker/server process running when the update started.
    Not sure if you env is still intact after the other commands but that would be a point to start off at (in a new issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionsetup

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions