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
Log of the full install process for Ubuntu 22.04.03, I am hoping it will help in tracing down the issues. #6177
There are a number of bugs in the installer, making it difficult or impossible to install using the one-line installer. The issues are described individually in #6154, #6156, #6170, #6175. This is not a new report but rather a full install history with reports showing the issues, which can help in their resolution.
@JustusRijke and @eimparas thank you for being patient with me and responding to my post in #4134. As stated, I tried to update Inventree on December 27 and am still trying to get it running. While I have a bit of computer experience, I don't have a large amount of Linux or Python experience. I have mainly used CPM, DOS, and Windows systems, and programs in C and Basic. And a lot of google. :)
To give you the best information, I started with a clean install of Ubuntu 22.02.03 (ubuntu-22.04.3-desktop-amd64) this morning.
I updated the system sudo apt update && sudo apt upgrade and from experience, installed curl sudo apt install curl
I checked the version of Python3, which was 3.10.12. I also created the folder /etc/inventories and copied my config.yaml file into the folder. (This is the same config file I used on V12 of Inventree) So, I went ahead with the one-line installer.
When I ran it from the user prompt, I received the same Permission denied error as outlined in #6175. I thought this weekend that maybe of version 13 it needed root privileges that were not needed in previous versions of Inventree. So I entered the root bash, which is the "root" account in Ubuntu. sudo bash
I tried the one-line installer again, but this time, I received a message that the requirements for Python3.9 were not met. This seems strange since the documation says Python3.9 or newer. So I installed Python 3.9 sudo apt install python3.9 python3.9-dev python3.9-venv so not python3 is python 3.10.12 and python3.9 is python 3.9.18.
I tried the one-line installer again, and it appeared to work. below is the screen info.
root@npaparts-server:/opt/inventree# wget -qO install.sh https://get.inventree.org && bash install.sh
### Installer for InvenTree - source: inventree/stable
### Detected distribution: Ubuntu 22.04
### Installing required packages for download
### Installing libssl1.1
deb http://security.ubuntu.com/ubuntu focal-security main
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:7 https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 InRelease [1,863 B]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,641 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [693 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [405 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 48x48 Icons [18.9 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64 Icons [36.0 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64@2 Icons [29 B]
Get:15 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [13.2 kB]
Fetched 4,212 kB in 5s (904 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libssl1.1 is already the newest version (1.1.1f-1ubuntu2.20).
The following packages were automatically installed and are no longer required:
gettext jq libevent-core-2.1-7 libevent-extra-2.1-7 libffi7 libjq1 libonig5
libpq5 python3-brotli python3-cffi python3-ply python3-pycparser
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
### Getting and adding key
### Adding package source
### Updating package lists
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Get:6 https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 InRelease [1,863 B]
Fetched 1,863 B in 2s (854 B/s)
Reading package lists... Done
### Setting installer args
### Installing InvenTree
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
inventree
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/117 MB of archives.
After this operation, 331 MB of additional disk space will be used.
Selecting previously unselected package inventree.
(Reading database ... 206419 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) ...
Setting up inventree (0.13.0-1702638825.301afaa9.focal) ...
# 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=/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=sqlite3
# INVENTREE_DB_NAME=/opt/inventree/data/database.sqlite3
# INVENTREE_DB_USER=sampleuser
# INVENTREE_DB_HOST=samplehost
# INVENTREE_DB_PORT=sampleport
# Getting the IP address of the server via web service
IP address is 64.4.107.154
# Setting up python environment
Requirement already satisfied: invoke in ./env/lib/python3.9/site-packages (2.2.0)
Requirement already satisfied: wheel in ./env/lib/python3.9/site-packages (0.42.0)
# 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.42.0)
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://64.4.107.154/
Admin user data:
Email:
Username:
Password:
####################################################################################
### Install done!
Now I am at the point of having a 502 error. I have lost this once so I will continue in my next post .... TBC
As shown in #4134, I checked the system status. Yes, I know I did not have to use sudo when I was working as root, but it worked.
System status
root@npaparts-server:/opt/inventree# sudo systemctl status inventree
● inventree.service
Loaded: loaded (/etc/systemd/system/inventree.service; enabled; vendor pre>
Active: active (running) since Mon 2024-01-08 11:16:03 EST; 1min 43s ago
Main PID: 8022 (sleep)
Tasks: 1 (limit: 4213)
Memory: 168.0K
CPU: 2ms
CGroup: /system.slice/inventree.service
└─8022 /bin/sleep infinity
Jan 08 11:16:03 npaparts-server systemd[1]: Started inventree.service.
lines 1-11/11 (END)
invoke update, it failed, but I thought it was because I was not in the Python env.
root@npaparts-server:/opt/inventree# invoke update
Traceback (most recent call last):
File "/usr/bin/invoke", line 11, in <module>
load_entry_point('invoke==1.4.1', 'console_scripts', 'invoke')()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 373, in run
self.parse_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 696, in load_collection
module, parent = loader.load(coll_name)
File "/usr/lib/python3/dist-packages/invoke/loader.py", line 76, in load
module = imp.load_module(name, fd, path, desc)
File "/usr/lib/python3.10/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.10/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/inventree/tasks.py", line 352, in <module>
def update(c, skip_backup=False, frontend: bool = False):
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 338, in inner
obj = klass(
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 76, in __init__
self.positional = self.fill_implicit_positionals(positional)
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
File "/usr/lib/python3.10/inspect.py", line 1237, 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
As shown in #4134, I checked the system status. Yes, I know I did not have to use sudo when I was working as root, but it worked.
System status
root@npaparts-server:/opt/inventree# sudo systemctl status inventree
● inventree.service
Loaded: loaded (/etc/systemd/system/inventree.service; enabled; vendor pre>
Active: active (running) since Mon 2024-01-08 11:16:03 EST; 1min 43s ago
Main PID: 8022 (sleep)
Tasks: 1 (limit: 4213)
Memory: 168.0K
CPU: 2ms
CGroup: /system.slice/inventree.service
└─8022 /bin/sleep infinity
Jan 08 11:16:03 npaparts-server systemd[1]: Started inventree.service.
lines 1-11/11 (END)
invoke update, it failed, but I thought it was because I was not in the Python env.
root@npaparts-server:/opt/inventree# invoke update
Traceback (most recent call last):
File "/usr/bin/invoke", line 11, in <module>
load_entry_point('invoke==1.4.1', 'console_scripts', 'invoke')()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 373, in run
self.parse_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 696, in load_collection
module, parent = loader.load(coll_name)
File "/usr/lib/python3/dist-packages/invoke/loader.py", line 76, in load
module = imp.load_module(name, fd, path, desc)
File "/usr/lib/python3.10/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.10/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/inventree/tasks.py", line 352, in <module>
def update(c, skip_backup=False, frontend: bool = False):
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 338, in inner
obj = klass(
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 76, in __init__
self.positional = self.fill_implicit_positionals(positional)
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
File "/usr/lib/python3.10/inspect.py", line 1237, 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
During the inv update config.py was not reading the data from my config.yaml file. I double-checked it, and the data for static file location was there. it was.
# STATIC_ROOT is the local filesystem location for storing static files
static_root: '/home/inventree/data/static'
the same location as in my last install. I moved and tried using /home/npa-parts/data/static but changes that with the same results. I also tried the other invoke commands, invoke update, and invoke backup, which had the same issue of not finding the folder. I then reviewed the Python code for config.py and noticed the function had provisions for a default value, so I added my directory there. It worked as it got past that section, and I received this error.
Next, I went with the inv update that @JustusRijke noticed was missing. I am assuming that he meant to type cd and not ls:
source ./env/bin/activate
inv update
reboot now
But I did both :) here are the results.
root@npaparts-server:/opt/inventree# ls /opt/inventree
backportrc.json data env package-lock.json requirements.in vendor
branches.json deploy images Procfile requirements.txt VERSION
ci docker install.sh README.md runtime.txt yarn.lock
commit.json docker-compose.yml InvenTree readthedocs.yml SECURITY.md
contrib docker.dev.env LICENSE RELEASE.md setup.cfg
CONTRIBUTING.md Dockerfile log requirements-dev.in src
crowdin.yml docs package.json requirements-dev.txt tasks.py
root@npaparts-server:/opt/inventree# source ./env/bin/activate
(env) root@npaparts-server:/opt/inventree# inv update
Installing required python packages from 'requirements.txt'
Requirement already satisfied: pip in ./env/lib/python3.9/site-packages (23.3.2)
Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (69.0.3)
Requirement already satisfied: asgiref==3.7.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (3.7.2)
Requirement already satisfied: async-timeout==4.0.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (4.0.3)
Requirement already satisfied: attrs==23.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (23.1.0)
Requirement already satisfied: babel==2.13.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (2.13.1)
Requirement already satisfied: bleach==6.1.0 in ./env/lib/python3.9/site-packages (from bleach[css]==6.1.0->-r requirements.txt (line 17)) (6.1.0)
Requirement already satisfied: brotli==1.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 19)) (1.1.0)
Requirement already satisfied: certifi==2023.7.22 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 21)) (2023.7.22)
Requirement already satisfied: cffi==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 25)) (1.16.0)
Requirement already satisfied: charset-normalizer==3.3.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (3.3.2)
Requirement already satisfied: coreapi==2.3.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (2.3.3)
Requirement already satisfied: coreschema==0.0.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (0.0.4)
Requirement already satisfied: cryptography==41.0.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 35)) (41.0.6)
Requirement already satisfied: cssselect2==0.7.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 40)) (0.7.0)
Requirement already satisfied: defusedxml==0.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 42)) (0.7.1)
Requirement already satisfied: diff-match-patch==20230430 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 46)) (20230430)
Requirement already satisfied: dj-rest-auth==5.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 48)) (5.0.1)
Requirement already satisfied: django==3.2.23 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 50)) (3.2.23)
Requirement already satisfied: django-allauth==0.54.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 84)) (0.54.0)
Requirement already satisfied: django-allauth-2fa==0.11.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 88)) (0.11.1)
Requirement already satisfied: django-cleanup==8.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 90)) (8.0.0)
Requirement already satisfied: django-cors-headers==4.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 92)) (4.3.0)
Requirement already satisfied: django-crispy-forms==1.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 94)) (1.14.0)
Requirement already satisfied: django-dbbackup==4.0.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 96)) (4.0.2)
Requirement already satisfied: django-error-report-2==0.4.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 98)) (0.4.2)
Requirement already satisfied: django-filter==23.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 100)) (23.3)
Requirement already satisfied: django-flags==5.0.13 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 102)) (5.0.13)
Requirement already satisfied: django-formtools==2.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 104)) (2.4.1)
Requirement already satisfied: django-ical==1.9.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 106)) (1.9.2)
Requirement already satisfied: django-import-export==3.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 108)) (3.3.1)
Requirement already satisfied: django-js-asset==2.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 110)) (2.1.0)
Requirement already satisfied: django-maintenance-mode==0.21.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 112)) (0.21.0)
Requirement already satisfied: django-markdownify==0.9.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 114)) (0.9.3)
Requirement already satisfied: django-money==3.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 116)) (3.2.0)
Requirement already satisfied: django-mptt==0.11.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 118)) (0.11.0)
Requirement already satisfied: django-otp==1.2.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 120)) (1.2.4)
Requirement already satisfied: django-picklefield==3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 122)) (3.1)
Requirement already satisfied: django-q-sentry==0.1.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 124)) (0.1.6)
Requirement already satisfied: django-q2==1.6.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 126)) (1.6.1)
Requirement already satisfied: django-recurrence==1.11.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 128)) (1.11.1)
Requirement already satisfied: django-redis==5.4.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 130)) (5.4.0)
Requirement already satisfied: django-sesame==3.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 132)) (3.2.1)
Requirement already satisfied: django-sql-utils==0.7.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 134)) (0.7.0)
Requirement already satisfied: django-sslserver==0.22 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 136)) (0.22)
Requirement already satisfied: django-stdimage==6.0.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 138)) (6.0.2)
Requirement already satisfied: django-taggit==4.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 140)) (4.0.0)
Requirement already satisfied: django-user-sessions==2.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 142)) (2.0.0)
Requirement already satisfied: django-weasyprint==2.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 144)) (2.2.1)
Requirement already satisfied: django-xforwardedfor-middleware==2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 146)) (2.0)
Requirement already satisfied: djangorestframework==3.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 148)) (3.14.0)
Requirement already satisfied: djangorestframework-simplejwt==5.3.0 in ./env/lib/python3.9/site-packages (from djangorestframework-simplejwt[crypto]==5.3.0->-r requirements.txt (line 154)) (5.3.0)
Requirement already satisfied: drf-spectacular==0.26.5 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 156)) (0.26.5)
Requirement already satisfied: dulwich==0.21.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 158)) (0.21.6)
Requirement already satisfied: et-xmlfile==1.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 160)) (1.1.0)
Requirement already satisfied: feedparser==6.0.10 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 162)) (6.0.10)
Requirement already satisfied: fonttools==4.44.0 in ./env/lib/python3.9/site-packages (from fonttools[woff]==4.44.0->-r requirements.txt (line 164)) (4.44.0)
Requirement already satisfied: gunicorn==21.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 166)) (21.2.0)
Requirement already satisfied: html5lib==1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 168)) (1.1)
Requirement already satisfied: icalendar==5.0.11 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 170)) (5.0.11)
Requirement already satisfied: idna==3.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 172)) (3.4)
Requirement already satisfied: importlib-metadata==6.8.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 174)) (6.8.0)
Requirement already satisfied: inflection==0.5.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 178)) (0.5.1)
Requirement already satisfied: itypes==1.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 180)) (1.2.0)
Requirement already satisfied: jinja2==3.1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 182)) (3.1.2)
Requirement already satisfied: jsonschema==4.19.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 184)) (4.19.2)
Requirement already satisfied: jsonschema-specifications==2023.7.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 186)) (2023.7.1)
Requirement already satisfied: markdown==3.5.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 188)) (3.5.1)
Requirement already satisfied: markuppy==1.14 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 190)) (1.14)
Requirement already satisfied: markupsafe==2.1.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 192)) (2.1.3)
Requirement already satisfied: oauthlib==3.2.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 194)) (3.2.2)
Requirement already satisfied: odfpy==1.4.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 196)) (1.4.1)
Requirement already satisfied: openpyxl==3.1.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 198)) (3.1.2)
Requirement already satisfied: packaging==23.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 200)) (23.2)
Requirement already satisfied: pdf2image==1.16.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 202)) (1.16.3)
Requirement already satisfied: pillow==10.1.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 204)) (10.1.0)
Requirement already satisfied: pint==0.21 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 212)) (0.21)
Requirement already satisfied: py-moneyed==3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 214)) (3.0)
Requirement already satisfied: pycparser==2.21 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 216)) (2.21)
Requirement already satisfied: pydyf==0.8.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 218)) (0.8.0)
Requirement already satisfied: pyjwt==2.8.0 in ./env/lib/python3.9/site-packages (from pyjwt[crypto]==2.8.0->-r requirements.txt (line 220)) (2.8.0)
Requirement already satisfied: pyphen==0.14.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 224)) (0.14.0)
Requirement already satisfied: pypng==0.20220715.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 226)) (0.20220715.0)
Requirement already satisfied: python-barcode==0.15.1 in ./env/lib/python3.9/site-packages (from python-barcode[images]==0.15.1->-r requirements.txt (line 228)) (0.15.1)
Requirement already satisfied: python-dateutil==2.8.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 230)) (2.8.2)
Requirement already satisfied: python-dotenv==1.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 234)) (1.0.0)
Requirement already satisfied: python-fsutil==0.12.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 236)) (0.12.0)
Requirement already satisfied: python3-openid==3.2.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 238)) (3.2.0)
Requirement already satisfied: pytz==2023.3.post1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 240)) (2023.3.post1)
Requirement already satisfied: pyyaml==6.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 246)) (6.0.1)
Requirement already satisfied: qrcode==7.4.2 in ./env/lib/python3.9/site-packages (from qrcode[pil]==7.4.2->-r requirements.txt (line 251)) (7.4.2)
Requirement already satisfied: rapidfuzz==0.7.6 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 255)) (0.7.6)
Requirement already satisfied: redis==5.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 257)) (5.0.1)
Requirement already satisfied: referencing==0.30.2 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 259)) (0.30.2)
Requirement already satisfied: regex==2023.10.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 263)) (2023.10.3)
Requirement already satisfied: requests==2.31.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 265)) (2.31.0)
Requirement already satisfied: requests-oauthlib==1.3.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 270)) (1.3.1)
Requirement already satisfied: rpds-py==0.12.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 272)) (0.12.0)
Requirement already satisfied: sentry-sdk==1.34.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 276)) (1.34.0)
Requirement already satisfied: sgmllib3k==1.0.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 280)) (1.0.0)
Requirement already satisfied: six==1.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 282)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.4 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 287)) (0.4.4)
Requirement already satisfied: tablib==3.5.0 in ./env/lib/python3.9/site-packages (from tablib[html,ods,xls,xlsx,yaml]==3.5.0->-r requirements.txt (line 291)) (3.5.0)
Requirement already satisfied: tinycss2==1.2.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 295)) (1.2.1)
Requirement already satisfied: typing-extensions==4.8.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 300)) (4.8.0)
Requirement already satisfied: uritemplate==4.1.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 305)) (4.1.1)
Requirement already satisfied: urllib3==2.0.7 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 309)) (2.0.7)
Requirement already satisfied: weasyprint==60.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 314)) (60.1)
Requirement already satisfied: webencodings==0.5.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 318)) (0.5.1)
Requirement already satisfied: xlrd==2.0.1 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 324)) (2.0.1)
Requirement already satisfied: xlwt==1.3.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 326)) (1.3.0)
Requirement already satisfied: zipp==3.16.0 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 328)) (3.16.0)
Requirement already satisfied: zopfli==0.2.3 in ./env/lib/python3.9/site-packages (from -r requirements.txt (line 330)) (0.2.3)
Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (from django-money==3.2.0->-r requirements.txt (line 116)) (69.0.3)
Backing up InvenTree database...
Traceback (most recent call last):
File "/opt/inventree/InvenTree/manage.py", line 23, in <module>
Python version 3.9.18 - /opt/inventree/env/bin/python3
load version from file
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 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/opt/inventree/InvenTree/InvenTree/settings.py", line 129, in <module>
STATIC_ROOT = config.get_static_dir()
File "/opt/inventree/InvenTree/InvenTree/config.py", line 237, in get_static_dir
raise FileNotFoundError('INVENTREE_STATIC_ROOT not specified')
FileNotFoundError: INVENTREE_STATIC_ROOT not specified
Yes, during the inv update config.py was not reading the data from my config.yaml file. I double checked it and the data for static file location was there. it was.
# STATIC_ROOT is the local filesystem location for storing static files
static_root: '/home/inventree/data/static'
the same location as in my last install. I moved and tried using /home/npa-parts/data/static but changes that with the same results. I also tried the other invoke commands, invoke update and invoke backup which had the same issue of not finding the folder. I then reviewed the Python code for config.py and noticed the function had provisions for a default value, so I added my directory there. It worked as it got past that section, and I received this error.
@SparkeyinVA thank you for collating all this information here. I have just got back from extended holidays so I am still getting up to speed. Reading through the issues listed above, there are three separate things which jump out:
Please note that you cannot actually run invoke directly from the /opt/inventree/ directory in this manner - as none of the environment variables are set correctly in your shell.
As per the docs you will need to use the inventree run invoke command. This ensures that the command is executed from the correct venv and with the correct environment variables
This install was with a clean system. Total wipe of the hard drive and then install V22.04.03.
I created the folder /etc/inventree, then copied the config.yaml there. I also made the folder /home/npa-parts/inventree/data/ with the subfolders media, static, backup, and plugin. I copied the said folders from my system backup before the failure. In the data folder, I placed the "secret_key.txt", "admin_password.txt", "plugins.txt" and the database "database.sqlite3". I updated the "config.yaml" with the complete folder information for each part.
The comment below will be the entire install run, from clean to the end.
The results. I am still getting the 504 error, but
The major issue is not finding the config.yaml file**. And as such, it crashed at the point in the inv update where it started setting up inventree, namely INVENTREE_STATIC_ROOT. Also, a little later in the inv update logs # Set permissions for data dir and media: /opt/inventree/data chown: cannot access '/opt/inventree/data': No such file or directory so not /home/npa-parts/inventree/data/ as setup in the config.yaml file.
I was following the code to find where it would get the config.yaml file, but I could not find it. In functions.sh I found the line export INVENTREE_CONFIG_FILE=${INVENTREE_CONFIG_FILE:-${CONF_DIR}/config.yaml} but I am not familiar with python or the inventree code to understand what is happening before this call.
If including the config.yaml is helpful, I will happily add it. Any suggestions
Each of these environment variables should have an associated value (not empty / blank). So, for some reason the installer is not filling them correctly.
@SchrodingersGat and @mattbnz, First, thank you for all your help. Last night, I was able to get the latest version of Inventree (0.13.0) installed and running. I would like to review the steps that were required in the hope that it will help you find the issues and that we can all have an easier installation system. I had an existing system, so I was basically trying to install the new version and integrate my existing data.
Step1
I started with a clean install of Ubuntu 22.04.03 LTS. The option was minimum install, as I did not want all the extra software. I ran all the updates. The user was "inventree" and was set up in the sudo group. Then, the system was rebooted.
Step 2
Update config file. After checking, I noticed the sample "config.yaml" file for 0.13.0 had quite a few changes from the one I used since 0.10.0. I updated the config file to match the current example. Set up directories and copy files. I created the directories, and added the files: /etc/inventree/
admin_password.txt
config.yaml
plugins.txt
secret_key.txt
Run wget -qO install.sh https://get.inventree.org && bash install.sh install failed as described at #6175. Changing the installer to wget -qO install.sh https://get.inventree.org && sudo bash install.sh allowed the installer to run.
Step 4
The next error was described in #6154 , I had to install python3.9, python3.9-dev, python3.9-venv, PIP, and then invoke.
after restart ran wget -qO install.sh https://get.inventree.org && sudo bash install.sh
Step 5
The installer ran as expected but ended up with a 504 error, as described in #6156 . Please note the No idea what --no-frontend is! showed up with this install. The inv update failed to execute, so I ran the following steps as suggested by @JustusRijke
source ./env/bin/activate
inv update
reboot now
Step 6
the inv update also ended with an error, as I described above, where "INVENTREE_STATIC_ROOT" was not found. But I noticed a note in the log which stated that config.yaml was not found, so one was created at /opt/inventree/InvenTree/config.yaml
I then copied the config.yaml from /etc/inventree/ to /opt/inventree/InvenTree/. I then ran inv update again, and it found the config file and updated and backed up the database as expected.
Step 7
Inventree started working. Yah!!!
I have noticed a longer delay between the computer coming on and Inventree starting. There are a few minutes when the site will return a 504 error; Then it will show Inventree after the delay.
I really hope this helps anyone still having this issue and helps locate the issues.
Activity
SparkeyinVA commentedon Jan 9, 2024
@JustusRijke and @eimparas thank you for being patient with me and responding to my post in #4134. As stated, I tried to update Inventree on December 27 and am still trying to get it running. While I have a bit of computer experience, I don't have a large amount of Linux or Python experience. I have mainly used CPM, DOS, and Windows systems, and programs in C and Basic. And a lot of google. :)
To give you the best information, I started with a clean install of Ubuntu 22.02.03 (ubuntu-22.04.3-desktop-amd64) this morning.
I updated the system
sudo apt update && sudo apt upgradeand from experience, installed curlsudo apt install curlI checked the version of Python3, which was 3.10.12. I also created the folder
/etc/inventoriesand copied my config.yaml file into the folder. (This is the same config file I used on V12 of Inventree) So, I went ahead with the one-line installer.When I ran it from the user prompt, I received the same Permission denied error as outlined in #6175. I thought this weekend that maybe of version 13 it needed root privileges that were not needed in previous versions of Inventree. So I entered the root bash, which is the "root" account in Ubuntu. sudo bash
I tried the one-line installer again, but this time, I received a message that the requirements for Python3.9 were not met. This seems strange since the documation says Python3.9 or newer. So I installed Python 3.9 sudo apt install python3.9 python3.9-dev python3.9-venv so not python3 is python 3.10.12 and python3.9 is python 3.9.18.
I tried the one-line installer again, and it appeared to work. below is the screen info.
Now I am at the point of having a 502 error. I have lost this once so I will continue in my next post .... TBC
SparkeyinVA commentedon Jan 9, 2024
As shown in #4134, I checked the system status. Yes, I know I did not have to use sudo when I was working as root, but it worked.
System status
invoke update, it failed, but I thought it was because I was not in the Python env.
inventree config
web and worker status
restart and check again
I was not sure how to check if nginx had IPv6 enabled, but since @JustusRijke had confirmed that was not the case this time, I proceeded. I checked the configuration
root@npaparts-server:/opt/inventree# nano /etc/nginx/sites-enabled/inventree.confchanged from http://localhost:6000 to http://127.0.0.1:6000 Then saw the comment from @matmair that it was not needed for most systems.
restarted inventree services and confirmed they were still not working
Then I ran into a possible problem. Continued in the next comment.
SparkeyinVA commentedon Jan 9, 2024
As shown in #4134, I checked the system status. Yes, I know I did not have to use sudo when I was working as root, but it worked.
System status
invoke update, it failed, but I thought it was because I was not in the Python env.
inventree config
web and worker status
restart and check again
I was not sure how to check if nginx had IPv6 enabled, but since @JustusRijke had confirmed that was not the case this time, I procided. I checked the configuration
root@npaparts-server:/opt/inventree# nano /etc/nginx/sites-enabled/inventree.conf```
changed from http://localhost:6000 to http://127.0.0.1:6000 Then saw the comment from @matmair that it was not needed for most systems.
restarted inventree services and confirmed they were still not working
Then I ran into a possible problem. Continued in the next comment.
SparkeyinVA commentedon Jan 9, 2024
During the
inv updateconfig.py was not reading the data from my config.yaml file. I double-checked it, and the data for static file location was there. it was.the same location as in my last install. I moved and tried using
/home/npa-parts/data/staticbut changes that with the same results. I also tried the other invoke commands,invoke update, andinvoke backup, which had the same issue of not finding the folder. I then reviewed the Python code for config.py and noticed the function had provisions for a default value, so I added my directory there. It worked as it got past that section, and I received this error.With this error I am now totally lost. If you can supply any suggestions where to go from here it would be great.
SparkeyinVA commentedon Jan 9, 2024
Next, I went with the
inv updatethat @JustusRijke noticed was missing. I am assuming that he meant to type cd and not ls:But I did both :) here are the results.
Yes, during the
inv updateconfig.py was not reading the data from my config.yaml file. I double checked it and the data for static file location was there. it was.the same location as in my last install. I moved and tried using
/home/npa-parts/data/staticbut changes that with the same results. I also tried the other invoke commands,invoke updateandinvoke backupwhich had the same issue of not finding the folder. I then reviewed the Python code for config.py and noticed the function had provisions for a default value, so I added my directory there. It worked as it got past that section, and I received this error.With this error I am now totally lost. If you can supply any suggestions where to go from here it would be great.
SchrodingersGat commentedon Jan 10, 2024
@SparkeyinVA thank you for collating all this information here. I have just got back from extended holidays so I am still getting up to speed. Reading through the issues listed above, there are three separate things which jump out:
Issue 1
As noted in #6156 - the installer is calling
invoke update --no-frontendwhich throws an error. We will have to look into this!Issue 2
As noted in #6170 - this might be related to the version of invoke you have installed... Can you provide version information here?
Issue 3
Please note that you cannot actually run
invokedirectly from the/opt/inventree/directory in this manner - as none of the environment variables are set correctly in your shell.As per the docs you will need to use the
inventree run invokecommand. This ensures that the command is executed from the correct venv and with the correct environment variablesRe-implement no-frontend flag in "invoke update"
Re-implement no-frontend flag in "invoke update" (#6183)
Re-implement no-frontend flag in "invoke update" (#6183)
Re-implement no-frontend flag in "invoke update" (#6183) (#6184)
SparkeyinVA commentedon Jan 10, 2024
Thank you @SchrodingersGat.
I will set up a different system today and keep following 502 Bad Gateway after update 0.12.8 -> 0.13.0 #6156 and 'invoke update' returns "Function has keyword-only parameters or annotations" #6170 to get a copy of the current version running.
Yesterday, to get the system back online, I tried to reinstall V12.8, which was running before everything got messed up with the update. As such, I used the installer script found here. (https://packager.io/gh/inventree/InvenTree/builds/1056/install/ubuntu-20.04)
/home/npa-parts/inventree/data/with the subfoldersmedia,static,backup, andplugin. I copied the said folders from my system backup before the failure. In the data folder, I placed the "secret_key.txt", "admin_password.txt", "plugins.txt" and the database "database.sqlite3". I updated the "config.yaml" with the complete folder information for each part.The comment below will be the entire install run, from clean to the end.
The results. I am still getting the 504 error, but
The major issue is not finding the config.yaml file**. And as such, it crashed at the point in the
inv updatewhere it started setting up inventree, namelyINVENTREE_STATIC_ROOT. Also, a little later in theinv updatelogs# Set permissions for data dir and media: /opt/inventree/data chown: cannot access '/opt/inventree/data': No such file or directoryso not/home/npa-parts/inventree/data/as setup in the config.yaml file.I was following the code to find where it would get the config.yaml file, but I could not find it. In
functions.shI found the lineexport INVENTREE_CONFIG_FILE=${INVENTREE_CONFIG_FILE:-${CONF_DIR}/config.yaml}but I am not familiar with python or the inventree code to understand what is happening before this call.If including the config.yaml is helpful, I will happily add it. Any suggestions
SparkeyinVA commentedon Jan 10, 2024
I added a blank line before each command I entered to help with readability. All other blank lines were from the system.
SchrodingersGat commentedon Jan 11, 2024
From the logs, this section looks suspicious:
Each of these environment variables should have an associated value (not empty / blank). So, for some reason the installer is not filling them correctly.
SparkeyinVA commentedon Jan 11, 2024
@SchrodingersGat and @mattbnz, First, thank you for all your help. Last night, I was able to get the latest version of Inventree (0.13.0) installed and running. I would like to review the steps that were required in the hope that it will help you find the issues and that we can all have an easier installation system. I had an existing system, so I was basically trying to install the new version and integrate my existing data.
Step1
I started with a clean install of Ubuntu 22.04.03 LTS. The option was minimum install, as I did not want all the extra software. I ran all the updates. The user was "inventree" and was set up in the sudo group. Then, the system was rebooted.
Step 2
Update config file. After checking, I noticed the sample "config.yaml" file for 0.13.0 had quite a few changes from the one I used since 0.10.0. I updated the config file to match the current example.
Set up directories and copy files. I created the directories, and added the files:
/etc/inventree/admin_password.txt
config.yaml
plugins.txt
secret_key.txt
/opt/inventree/data/folders backup, media, static
database.sqlite3
Step 3
Run
wget -qO install.sh https://get.inventree.org && bash install.shinstall failed as described at #6175. Changing the installer towget -qO install.sh https://get.inventree.org && sudo bash install.shallowed the installer to run.Step 4
The next error was described in #6154 , I had to install python3.9, python3.9-dev, python3.9-venv, PIP, and then invoke.
after restart ran
wget -qO install.sh https://get.inventree.org && sudo bash install.shStep 5
The installer ran as expected but ended up with a 504 error, as described in #6156 . Please note the
No idea what --no-frontend is!showed up with this install. Theinv updatefailed to execute, so I ran the following steps as suggested by @JustusRijkeStep 6
the inv update also ended with an error, as I described above, where "INVENTREE_STATIC_ROOT" was not found. But I noticed a note in the log which stated that config.yaml was not found, so one was created at
/opt/inventree/InvenTree/config.yamlI then copied the config.yaml from
/etc/inventree/to/opt/inventree/InvenTree/. I then raninv updateagain, and it found the config file and updated and backed up the database as expected.Step 7
Inventree started working. Yah!!!
I have noticed a longer delay between the computer coming on and Inventree starting. There are a few minutes when the site will return a 504 error; Then it will show Inventree after the delay.
I really hope this helps anyone still having this issue and helps locate the issues.
SparkeyinVA commentedon Jan 11, 2024
@SchrodingersGat @mattbnz This issue can be closed when you have the information you need from it. Thank you again
SchrodingersGat commentedon Jan 11, 2024
@SparkeyinVA thanks for providing this information - and I am glad that you got it working!
We will be using this information to fix a few bugs in the installer, so thanks for helping us improve :)