inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.08k stars 728 forks source link

Setup from china: I can't install this server on Ubuntu 20.04 Desktop by installer, #7697

Open zly20129 opened 1 month ago

zly20129 commented 1 month ago

Deployment Method

Describe the problem*

I try use installer.sh to install InvenTree on Ubuntu 20.04 Desktop, but it not work. I don't know problems why to occurrence.

Steps to Reproduce

  1. sudo wget -O install.sh https://get.inventree.org
  2. sudo bash install.sh
  3. Open ip_address(:80) in firefox
  4. See 502 Bad.....

Relevant log output

zly@zly-virtual-machine:~$ sudo bash install.sh 
### Installer for InvenTree - source: inventree/stable
### Detected distribution: Ubuntu 20.04
### Installing required packages for download
### Getting and adding key
### Adding package source
### Updating package lists
命中:1 http://security.ubuntu.com/ubuntu focal-security InRelease
获取:2 https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04 InRelease [1,863 B]
命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
获取:4 https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04/main amd64 Packages [5,199 B]
命中:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease                     
命中:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease                   
已下载 7,062 B,耗时 7秒 (996 B/s)                                                            
正在读取软件包列表... 完成
### Setting installer args
### Installing InvenTree
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  jq libevent-2.1-7 libevent-core-2.1-7 libevent-extra-2.1-7 libjq1
  libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
  libnginx-mod-stream libonig5 libpq5 libpython3.9 libpython3.9-dev libpython3.9-minimal
  libpython3.9-stdlib nginx nginx-common nginx-core python3-brotli python3-cffi python3-ply
  python3-pycparser python3.9 python3.9-dev python3.9-minimal python3.9-venv
建议安装:
  fcgiwrap nginx-doc python-ply-doc python3.9-doc binfmt-support
下列【新】软件包将被安装:
  inventree jq libevent-2.1-7 libevent-core-2.1-7 libevent-extra-2.1-7 libjq1
  libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
  libnginx-mod-stream libonig5 libpq5 libpython3.9 libpython3.9-dev libpython3.9-minimal
  libpython3.9-stdlib nginx nginx-common nginx-core python3-brotli python3-cffi python3-ply
  python3-pycparser python3.9 python3.9-dev python3.9-minimal python3.9-venv
升级了 0 个软件包,新安装了 27 个软件包,要卸载 0 个软件包,有 261 个软件包未被升级。
需要下载 77.6 MB 的归档。
解压缩后会消耗 207 MB 的额外空间。
获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libpython3.9-minimal amd64 3.9.5-3ubuntu0~20.04.1 [756 kB]
获取:2 https://dl.packager.io/srv/deb/inventree/InvenTree/stable/ubuntu 20.04/main amd64 inventree amd64 0.15.5-1721283164.b13cd712.focal [64.5 MB]
获取:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3.9-minimal amd64 3.9.5-3ubuntu0~20.04.1 [2,022 kB]
获取:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 libpq5 amd64 12.19-0ubuntu0.20.04.1 [116 kB]
获取:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libevent-2.1-7 amd64 2.1.11-stable-1 [138 kB]
获取:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB]
获取:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 libevent-extra-2.1-7 amd64 2.1.11-stable-1 [60.0 kB]
获取:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libpython3.9-stdlib amd64 3.9.5-3ubuntu0~20.04.1 [1,778 kB]
获取:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3.9 amd64 3.9.5-3ubuntu0~20.04.1 [423 kB]
获取:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3.9-venv amd64 3.9.5-3ubuntu0~20.04.1 [5,452 B]
获取:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libpython3.9 amd64 3.9.5-3ubuntu0~20.04.1 [1,714 kB]
获取:12 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libpython3.9-dev amd64 3.9.5-3ubuntu0~20.04.1 [4,126 kB]
获取:13 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3.9-dev amd64 3.9.5-3ubuntu0~20.04.1 [510 kB]
获取:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 python3-ply all 3.11-3ubuntu0.1 [46.3 kB]
获取:15 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 python3-pycparser all 2.19-1ubuntu1 [71.0 kB]
获取:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/main amd64 python3-cffi all 1.14.0-1build1 [70.3 kB]
获取:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 python3-brotli amd64 1.0.7-6ubuntu0.1 [271 kB]
获取:18 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 nginx-common all 1.18.0-0ubuntu1.5 [37.7 kB]
获取:19 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 libnginx-mod-http-image-filter amd64 1.18.0-0ubuntu1.5 [14.7 kB]
获取:20 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 libnginx-mod-http-xslt-filter amd64 1.18.0-0ubuntu1.5 [13.0 kB]
获取:21 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 libnginx-mod-mail amd64 1.18.0-0ubuntu1.5 [42.9 kB]
获取:22 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 libnginx-mod-stream amd64 1.18.0-0ubuntu1.5 [67.4 kB]
获取:23 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 nginx-core amd64 1.18.0-0ubuntu1.5 [425 kB]
获取:24 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 nginx all 1.18.0-0ubuntu1.5 [3,612 B]
获取:25 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1 [142 kB]
获取:26 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 libjq1 amd64 1.6-1ubuntu0.20.04.1 [121 kB]
获取:27 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/universe amd64 jq amd64 1.6-1ubuntu0.20.04.1 [50.2 kB]
已下载 77.6 MB,耗时 5分 2秒 (257 kB/s)                                                       
正在预设定软件包 ...
正在选中未选择的软件包 libpython3.9-minimal:amd64。
(正在读取数据库 ... 系统当前共安装有 169397 个文件和目录。)
准备解压 .../00-libpython3.9-minimal_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 libpython3.9-minimal:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 python3.9-minimal。
准备解压 .../01-python3.9-minimal_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 python3.9-minimal (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 libpq5:amd64。
准备解压 .../02-libpq5_12.19-0ubuntu0.20.04.1_amd64.deb  ...
正在解压 libpq5:amd64 (12.19-0ubuntu0.20.04.1) ...
正在选中未选择的软件包 libevent-2.1-7:amd64。
准备解压 .../03-libevent-2.1-7_2.1.11-stable-1_amd64.deb  ...
正在解压 libevent-2.1-7:amd64 (2.1.11-stable-1) ...
正在选中未选择的软件包 libevent-core-2.1-7:amd64。
准备解压 .../04-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb  ...
正在解压 libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
正在选中未选择的软件包 libevent-extra-2.1-7:amd64。
准备解压 .../05-libevent-extra-2.1-7_2.1.11-stable-1_amd64.deb  ...
正在解压 libevent-extra-2.1-7:amd64 (2.1.11-stable-1) ...
正在选中未选择的软件包 libpython3.9-stdlib:amd64。
准备解压 .../06-libpython3.9-stdlib_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 libpython3.9-stdlib:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 python3.9。
准备解压 .../07-python3.9_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 python3.9 (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 python3.9-venv。
准备解压 .../08-python3.9-venv_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 python3.9-venv (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 libpython3.9:amd64。
准备解压 .../09-libpython3.9_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 libpython3.9:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 libpython3.9-dev:amd64。
准备解压 .../10-libpython3.9-dev_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 libpython3.9-dev:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 python3.9-dev。
准备解压 .../11-python3.9-dev_3.9.5-3ubuntu0~20.04.1_amd64.deb  ...
正在解压 python3.9-dev (3.9.5-3ubuntu0~20.04.1) ...
正在选中未选择的软件包 python3-ply。
准备解压 .../12-python3-ply_3.11-3ubuntu0.1_all.deb  ...
正在解压 python3-ply (3.11-3ubuntu0.1) ...
正在选中未选择的软件包 python3-pycparser。
准备解压 .../13-python3-pycparser_2.19-1ubuntu1_all.deb  ...
正在解压 python3-pycparser (2.19-1ubuntu1) ...
正在选中未选择的软件包 python3-cffi。
准备解压 .../14-python3-cffi_1.14.0-1build1_all.deb  ...
正在解压 python3-cffi (1.14.0-1build1) ...
正在选中未选择的软件包 python3-brotli。
准备解压 .../15-python3-brotli_1.0.7-6ubuntu0.1_amd64.deb  ...
正在解压 python3-brotli (1.0.7-6ubuntu0.1) ...
正在选中未选择的软件包 nginx-common。
准备解压 .../16-nginx-common_1.18.0-0ubuntu1.5_all.deb  ...
正在解压 nginx-common (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 libnginx-mod-http-image-filter。
准备解压 .../17-libnginx-mod-http-image-filter_1.18.0-0ubuntu1.5_amd64.deb  ...
正在解压 libnginx-mod-http-image-filter (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 libnginx-mod-http-xslt-filter。
准备解压 .../18-libnginx-mod-http-xslt-filter_1.18.0-0ubuntu1.5_amd64.deb  ...
正在解压 libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 libnginx-mod-mail。
准备解压 .../19-libnginx-mod-mail_1.18.0-0ubuntu1.5_amd64.deb  ...
正在解压 libnginx-mod-mail (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 libnginx-mod-stream。
准备解压 .../20-libnginx-mod-stream_1.18.0-0ubuntu1.5_amd64.deb  ...
正在解压 libnginx-mod-stream (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 nginx-core。
准备解压 .../21-nginx-core_1.18.0-0ubuntu1.5_amd64.deb  ...
正在解压 nginx-core (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 nginx。
准备解压 .../22-nginx_1.18.0-0ubuntu1.5_all.deb  ...
正在解压 nginx (1.18.0-0ubuntu1.5) ...
正在选中未选择的软件包 libonig5:amd64。
准备解压 .../23-libonig5_6.9.4-1_amd64.deb  ...
正在解压 libonig5:amd64 (6.9.4-1) ...
正在选中未选择的软件包 libjq1:amd64。
准备解压 .../24-libjq1_1.6-1ubuntu0.20.04.1_amd64.deb  ...
正在解压 libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...
正在选中未选择的软件包 jq。
准备解压 .../25-jq_1.6-1ubuntu0.20.04.1_amd64.deb  ...
正在解压 jq (1.6-1ubuntu0.20.04.1) ...
正在选中未选择的软件包 inventree。
准备解压 .../26-inventree_0.15.5-1721283164.b13cd712.focal_amd64.deb  ...
正在解压 inventree (0.15.5-1721283164.b13cd712.focal) ...
正在设置 libpython3.9-minimal:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在设置 python3-ply (3.11-3ubuntu0.1) ...
正在设置 libpq5:amd64 (12.19-0ubuntu0.20.04.1) ...
正在设置 nginx-common (1.18.0-0ubuntu1.5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
正在设置 python3-pycparser (2.19-1ubuntu1) ...
正在设置 libnginx-mod-http-xslt-filter (1.18.0-0ubuntu1.5) ...
正在设置 python3-brotli (1.0.7-6ubuntu0.1) ...
正在设置 libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
正在设置 libevent-2.1-7:amd64 (2.1.11-stable-1) ...
正在设置 python3.9-minimal (3.9.5-3ubuntu0~20.04.1) ...
正在设置 libonig5:amd64 (6.9.4-1) ...
正在设置 libpython3.9-stdlib:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在设置 libnginx-mod-mail (1.18.0-0ubuntu1.5) ...
正在设置 libevent-extra-2.1-7:amd64 (2.1.11-stable-1) ...
正在设置 libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...
正在设置 python3-cffi (1.14.0-1build1) ...
正在设置 libnginx-mod-http-image-filter (1.18.0-0ubuntu1.5) ...
正在设置 libnginx-mod-stream (1.18.0-0ubuntu1.5) ...
正在设置 libpython3.9:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在设置 jq (1.6-1ubuntu0.20.04.1) ...
正在设置 python3.9 (3.9.5-3ubuntu0~20.04.1) ...
正在设置 nginx-core (1.18.0-0ubuntu1.5) ...
正在设置 nginx (1.18.0-0ubuntu1.5) ...
正在设置 libpython3.9-dev:amd64 (3.9.5-3ubuntu0~20.04.1) ...
正在设置 python3.9-dev (3.9.5-3ubuntu0~20.04.1) ...
正在设置 python3.9-venv (3.9.5-3ubuntu0~20.04.1) ...
正在设置 inventree (0.15.5-1721283164.b13cd712.focal) ...
# Setting base environment variables
# Using existing config file: /etc/inventree/config.yaml
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/certifi/
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
    yield
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "/usr/lib/python3.8/http/client.py", line 459, in read
    n = self.readinto(b)
  File "/usr/lib/python3.8/http/client.py", line 503, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1270, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1128, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
    resolver.resolve(requirement_set)
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
    local_path = unpack_url(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
    return unpack_http_url(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
    from_path, content_type = _download_http_url(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
    for chunk in download.chunks:
  File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
    for chunk in response.raw.stream(
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
/opt/inventree/contrib/packager.io/functions.sh: 行 120: jc:未找到命令
# Collected environment variables:
#    INVENTREE_MEDIA_ROOT=
#    INVENTREE_STATIC_ROOT=
#    INVENTREE_BACKUP_DIR=
#    INVENTREE_PLUGINS_ENABLED=
#    INVENTREE_PLUGIN_FILE=
#    INVENTREE_SECRET_KEY_FILE=
#    INVENTREE_DB_ENGINE=
#    INVENTREE_DB_NAME=
#    INVENTREE_DB_USER=
#    INVENTREE_DB_HOST=
#    INVENTREE_DB_PORT=
# Getting the IP address of the server via web service
IP address is 123.172.51.12
# No python environment found - using environment variable: python3.9
# Setting up python environment
Collecting invoke
  Downloading invoke-2.2.0-py3-none-any.whl (160 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
    yield
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "/usr/lib/python3.9/http/client.py", line 459, in read
    n = self.readinto(b)
  File "/usr/lib/python3.9/http/client.py", line 503, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.9/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
    status = self.run(options, args)
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 357, in run
    resolver.resolve(requirement_set)
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
    local_path = unpack_url(
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
    return unpack_http_url(
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
    from_path, content_type = _download_http_url(
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
    for chunk in download.chunks:
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/utils/ui.py", line 160, in iter
    for x in it:
  File "/opt/inventree/env/lib/python3.9/site-packages/pip/_internal/network/utils.py", line 15, in response_chunks
    for chunk in response.raw.stream(
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
# Unlinking default nginx config\n# Old file still in /etc/nginx/sites-available/default
# Stopping nginx
# Setting up nginx to /etc/nginx/sites-enabled/inventree.conf
# Starting nginx
# (Re)creating init scripts
Created symlink /etc/systemd/system/multi-user.target.wants/inventree.service → /etc/systemd/system/inventree.service.
Created symlink /etc/systemd/system/inventree.service.wants/inventree-web.service → /etc/systemd/system/inventree-web.service.
Scaling up...
Created symlink /etc/systemd/system/inventree-web.service.wants/inventree-web-1.service → /etc/systemd/system/inventree-web-1.service.
--> done.
Created symlink /etc/systemd/system/inventree.service.wants/inventree-worker.service → /etc/systemd/system/inventree-worker.service.
Scaling up...
Created symlink /etc/systemd/system/inventree-worker.service.wants/inventree-worker-1.service → /etc/systemd/system/inventree-worker-1.service.
--> done.
# Enabling InvenTree on boot
# Creating admin user data
# Stopping InvenTree
# Updating InvenTree
Collecting wheel
  Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
Installing collected packages: wheel
Successfully installed wheel-0.43.0
# inv update| The installed python version (3.8.10) is not supported!
# inv update| InvenTree requires Python 3.9 or above
# Set permissions for data dir and media: /opt/inventree/data
# Setting up InvenTree site URL
# 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://123.172.51.12/

Admin user data:
   Email: admin@example.com
   Username: admin
   Password: kR0/5jwDzTDwTJ5BBPr3WckdOYKwrX2Ic+Ap4O4bK9o=
####################################################################################
正在处理用于 desktop-file-utils (0.24-1ubuntu3) 的触发器 ...
正在处理用于 mime-support (3.64ubuntu1) 的触发器 ...
正在处理用于 gnome-menus (3.36.0-1ubuntu1) 的触发器 ...
正在处理用于 libc-bin (2.31-0ubuntu9.9) 的触发器 ...
正在处理用于 ufw (0.36-6ubuntu1) 的触发器 ...
正在处理用于 systemd (245.4-4ubuntu3.20) 的触发器 ...
正在处理用于 man-db (2.9.1-1) 的触发器 ...
### Install done!
zly@zly-virtual-machine:~$
matmair commented 1 month ago

It seems like your system is unable to connect to pypi.org and pythonhosted.org. Could you please check if that is the case? We need to get packages from there

zly20129 commented 1 month ago

It seems like your system is unable to connect to pypi.org and pythonhosted.org. Could you please check if that is the case? We need to get packages from there

I've been going crazy!!! I've tried a manual bare metal install, an install script install, and a docker install, and so far it looks like docker is the most likely way to install successfully. But currently docker installation is also stuck on network issues, here is the error log. I'm in China, and as you know, for some reason, there are strict network controls on foreign service providers, which is really unfriendly to us Chinese users.(我在中国,你知道的,因为一些原因,对国外服务商采取了严格的网络管控,这对我们中国用户实再是太不友好了。) zly@zly-virtual-machine:~/inventree/contrib/container$ docker compose run --rm inventree-server invoke update WARN[0000] /home/zly/inventree/contrib/container/docker-compose.yml:version` is obsolete [+] Creating 1/0 ✔ Container inventree-db Running 0.0s Loading config file : /home/inventree/data/config.yaml Installing required python packages from 'src/backend/requirements.txt' Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (24.0) Collecting pip Downloading pip-24.1.2-py3-none-any.whl.metadata (3.6 kB) Requirement already satisfied: setuptools in /root/.local/lib/python3.11/site-packages (69.5.1) Collecting setuptools Downloading setuptools-71.0.4-py3-none-any.whl.metadata (6.5 kB) Downloading pip-24.1.2-py3-none-any.whl (1.8 MB) ━━ 0.1/1.8 MB 65.4 kB/s eta 0:00:27 ERROR: Exception: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher yield File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 561, in read data = self._fp_read(amt) if not fp_closed else b"" ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 527, in _fp_read return self._fp.read(amt) if amt is not None else self._fp.read() ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/http/client.py", line 473, in read s = self.fp.read(amt) ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 706, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/ssl.py", line 1314, in recv_into return self.read(nbytes, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/ssl.py", line 1166, in read return self._sslobj.read(len, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper return func(self, options, args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 377, in run requirement_set = resolver.resolve( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 179, in resolve self.factory.preparer.prepare_linked_requirements_more(reqs) File "/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 552, in prepare_linked_requirements_more self._complete_partial_requirements( File "/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 467, in _complete_partialrequirements for link, (filepath, ) in batch_download: File "/usr/local/lib/python3.11/site-packages/pip/_internal/network/download.py", line 183, in call for chunk in chunks: File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar for chunk in iterable: File "/usr/local/lib/python3.11/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks for chunk in response.raw.stream( File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 622, in stream data = self.read(amt=amt, decode_content=decode_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 560, in read with self._error_catcher(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/usr/local/lib/python3.11/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.`

zly20129 commented 1 month ago

It seems like your system is unable to connect to pypi.org and pythonhosted.org. Could you please check if that is the case? We need to get packages from there

Regarding the problem of not being able to access these URLs, I've tried a few ways of configuring proxies, such as configuring http and https + socks proxies in the GUI, and http_proxy = this way, but none of them allow it to be installed successfully. By the way, the proxy is built using v2rayn's LAN proxy mode, and ubuntu's own browser can already access Google, which means there is no problem with the proxy configuration. 关于访问不了这些网址的问题,我尝试了一些配置代理的方式,比如在图形界面配置http和https+socks代理,还有http_proxy =这种方式,但没有一个可以让它顺利安装成功。 顺便说一句,代理搭建采用的是v2rayn的局域网代理模式,ubuntu自带的浏览器已经可以访问谷歌了,这说明代理配置的没有问题。

matmair commented 1 month ago

I have just started reading up on your network situation in china. It seems like some unis provide pretty good mirrors. I will look into detecting if the installer is running in a restricted network and using the mirror instead

zly20129 commented 1 month ago

I have just started reading up on your network situation in china. It seems like some unis provide pretty good mirrors. I will look into detecting if the installer is running in a restricted network and using the mirror instead

I've tried changing pip mirror source but it doesn't do anything, I've tried ali source, tsinghua source, douban source, none of them work. 我已经试过换pip镜像源了,但它没有任何作用,我试过阿里源、清华源、豆瓣源,都不行。

zly20129 commented 1 month ago

I have just started reading up on your network situation in china. It seems like some unis provide pretty good mirrors. I will look into detecting if the installer is running in a restricted network and using the mirror instead

At first I considered whether it was a missing /opt/inventree/data and /etc/inventree/config.yaml, installer.sh doesn't seem to be able to create these files automatically. In response, I tried manually creating these paths and files and installing them later, but this did not get Inventree to work properly. 最开始的时候我还考虑过是否是/opt/inventree/data和/etc/inventree/config.yaml缺失的问题,installer.sh似乎不能自动创建这些文件。 对此,我尝试了手动创建这些路径和文件,而后再进行安装,但这并没有让Inventree正常运行。

matmair commented 1 month ago

Without pip working nothing else will run, that is the root of all problems.

zly20129 commented 1 month ago

Without pip working nothing else will run, that is the root of all problems.

Do you know how to set up a system level proxy for Ubuntu? My biggest problem right now is that I set up the proxy, but only desktop graphics programs seem to work. For example, the terminal, traceroute www.google.com, it doesn't reach the target IP at all. 请问您知道怎么为Ubuntu设置系统级代理吗? 我现在最大的问题是设置了代理,但似乎只有桌面图形程序可以用。 比如终端,traceroute www.google.com,它根本无法到达目标IP。

zly20129 commented 1 month ago

Without pip working nothing else will run, that is the root of all problems.

export http_proxy="http://proxy_ip:proxy_port" export https_proxy="http://proxy_ip:proxy_port" 99% of the ways I've searched are using the two commands above, but I still can't hit google's servers after using them. 我搜索到的99%方式是使用上述的两条指令,但使用后依旧无法命中google的服务器。

matmair commented 1 month ago

Can you try if one of these mirrors work: https://www.a-netz.de/blog/2019/11/software-development-in-china.html? Also can your machine connect to Github? Update checks will not work if that is not the case

zly20129 commented 1 month ago

Can you try if one of these mirrors work: https://www.a-netz.de/blog/2019/11/software-development-in-china.html? Also can your machine connect to Github? Update checks will not work if that is not the case

OMG... My machine can connect to github, but it is too sollow. There no mirrors help me to success install.

zly20129 commented 1 month ago

Can you try if one of these mirrors work: https://www.a-netz.de/blog/2019/11/software-development-in-china.html? Also can your machine connect to Github? Update checks will not work if that is not the case

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple I've replaced several sources with this command and the installation was unsuccessful. 我用这个指令更换过好几个源,安装都不成功。

matmair commented 1 month ago

I have to read up more to solve this

zly20129 commented 1 month ago

I have to read up more to solve this

Thank you very much for your help, I've given up on bare metal and linux installs and am currently trying docker installs, if it still fails to install then it just means I'm not meant to be with this project. 非常感谢您的帮助,我已经放弃裸机和linux安装了,目前正在尝试docker安装,如果它依旧安装失败,那只能说明我和这个项目没有缘分了。

zly20129 commented 1 month ago

I have to read up more to solve this

zly@zly-virtual-machine:~/inventree/contrib/container$ pip config get global.index-url https://mirrors.aliyun.com/pypi/simple/ zly@zly-virtual-machine:~/inventree/contrib/container$ sudo nano /etc/docker/daemon.json [sudo] zly 的密码: Look at this, I queried through the command and the mirror source has been successfully changed. 屏幕截图 2024-07-21 173615 Currently in the process of being installed.