Skip to content

Bare metal installation using quick script is not working #7323

Closed

Description

@LukeARESYS

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

The guide for bare metal install using quick script seems to have missing and/or wrong information. I'm trying to install Inventree locally on a Windows 10 PC with WSL running Ubuntu 20.04.6.

Running the scripts, the installation completes, but with these errors:

# Using existing config file: /etc/inventree/config.yaml
ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/opt/inventree/.github/requirements.txt'
/opt/inventree/contrib/packager.io/functions.sh: line 96: jc: command not found
File "/opt/inventree/src/backend/InvenTree/manage.py", line 24, in <module>
main()
File "/opt/inventree/src/backend/InvenTree/manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/opt/inventree/env/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/inventree/env/lib/python3.9/site-packages/django/core/management/__init__.py", line 382, in execute
settings.INSTALLED_APPS
File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
File "/opt/inventree/env/lib/python3.9/site-packages/django/conf/__init__.py", line 217, 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 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/opt/inventree/src/backend/InvenTree/InvenTree/settings.py", line 124, in <module>
STATIC_ROOT = config.get_static_dir()
File "/opt/inventree/src/backend/InvenTree/InvenTree/config.py", line 261, in get_static_dir
raise FileNotFoundError('INVENTREE_STATIC_ROOT not specified')
FileNotFoundError: INVENTREE_STATIC_ROOT not specified

The scripts installs Inventree using these File Locations. These paths are different than what's indicated in other sections, like Test Gunicorn Server.

With some backtraking, I understand that /opt/inventree is the same as /home/inventree, but I can't find the equivalent directory for src/InvenTree where gunicorn.conf.py and InvenTree.wsgi are located

With some backtrating, I've found the Configuration file config.yaml in /etc/inventree, but after installing inventree, executing inventree config /etc/inventree/config.yaml gives errors:

  • /etc/inventree/conf.d/other: line 1: export: `=': not a valid identifier. This is because the file /etc/inventree/conf.d/other has export ="", with a space before the equal sign. Removing the space removes the error.

In the end, I don't understand if the quick script installs inventree with gunicorn or nginx, either way after running the installation and even tring to execute inventree config -f /etc/inventree/config.yaml the local server is still not running or not reachable.

Running systemctl status gives State: degraded, so I've tried also running systemctl reset-failed, now the result is:

State: running
Jobs: 0 queued
Failed: 0 units
Since: Fri 2024-05-24 13:14:12 CEST; 1h 40min ago
CGroup: /
├─user.slice
│ └─user-0.slice
│
├─session-1.scope
│
│ ├─1122 /bin/login -f
│
│ └─1260 -bash
│
└─[email protected] …
│
└─init.scope
│
├─1254 /lib/systemd/systemd --user
│
└─1255 (sd-pam)
├─init.scope
│ └─1 /sbin/init
└─system.slice
├─snap-snapd-19122.mount
│ └─251 snapfuse /var/lib/snapd/snaps/snapd_19122.snap /snap/snapd/19122 -o ro,nodev,allow_other,suid
├─systemd-networkd.service
│ └─79 /lib/systemd/systemd-networkd
├─systemd-udevd.service
│ └─77 /lib/systemd/systemd-udevd
├─cron.service
│ └─349 /usr/sbin/cron -f
├─nginx.service
│ ├─3660 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
│ ├─3661 nginx: worker process
│ ├─3662 nginx: worker process
│ ├─3663 nginx: worker process
│ ├─3664 nginx: worker process
│ ├─3665 nginx: worker process
│ ├─3666 nginx: worker process
│ ├─3667 nginx: worker process
│ └─3668 nginx: worker process
├─polkit.service
│ └─277 /usr/lib/policykit-1/polkitd --no-debug
├─networkd-dispatcher.service
│ └─276 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
├─accounts-daemon.service
│ └─267 /usr/lib/accountsservice/accounts-daemon
├─ModemManager.service
│ └─317 /usr/sbin/ModemManager
├─inventree.service
│ └─4337 /bin/sleep infinity
├─systemd-journald.service
│ └─50 /lib/systemd/systemd-journald
├─snap-core20-1891.mount
│ └─250 snapfuse /var/lib/snapd/snaps/core20_1891.snap /snap/core20/1891 -o ro,nodev,allow_other,suid
├─atd.service
│ └─357 /usr/sbin/atd -f
├─unattended-upgrades.service
│ └─355 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
├─ssh.service
│ └─382 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
├─supervisor.service
│ └─353 /usr/bin/python3 /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
├─snapd.service
│ └─292 /usr/lib/snapd/snapd
├─rsyslog.service
│ └─278 /usr/sbin/rsyslogd -n -iNONE

but I still can't access the inventree local server by connecting to http://127.0.0.1:8000/

All in all, the guide for the quick script should be updated and fixed

Steps to Reproduce

Run the quick script on a freshly ubuntu distro on wsl

Expected behaviour

The local server should be up and running after executing the quick script, or at least additional necessary steps should be added in the documentation

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Whatever is currently getting installed by running the quick script wget -qO install.sh https://get.inventree.org && bash install.sh

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

No response

Activity

  1. added
    bug
    question
    triage:not-checked
    on May 24, 2024
  2. added
    setup
    and removed
    triage:not-checked
    on May 24, 2024
  3. SchrodingersGat commented on May 24, 2024

    @SchrodingersGat
    Member

    @LukeARESYS thanks for reporting this. There are a number of other users running into a very similar issue now which we are trying to get to the bottom of. It seems that you have made some advances on debugging this, perhaps that could be very useful.

    Related Issues

    Currently myself and @matmair are swamped and also trying to help users get their systems up and running again. If there is any further insights you can provide from the issues I have linked that would be greatly appreciated.

  4. SchrodingersGat commented on May 26, 2024

    @SchrodingersGat
    Member

    Ref: #7336

  5. matmair commented on May 27, 2024

    @matmair
    Member

    @LukeARESYS can you confirm this was resolved by the latest update?

  6. added this to the 0.15.3 milestone on May 27, 2024
  7. self-assigned this
    on May 27, 2024
  8. removed
    question
    on May 27, 2024
  9. LukeARESYS commented on May 28, 2024

    @LukeARESYS
    Author

    I'm sorry but i won't have time to look at the issue up until Friday I think, I will update you as soon as possible

  10. LukeARESYS commented on May 31, 2024

    @LukeARESYS
    Author

    Quick script installer is now working properly and local server is now running and accessible

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

Metadata

Metadata

Assignees

Labels

buginstallersetup

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions