netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.97k stars 2.56k forks source link

Unable to create the django_migrations table during installation #11308

Closed navjotjsingh closed 1 year ago

navjotjsingh commented 1 year ago

NetBox version

v3.4.1

Python version

3.10

Steps to Reproduce

Ubuntu 22.04 server Install PostgreSQL 15 Install Redis 7.0.7 Follow the steps listed at https://docs.netbox.dev/en/stable/installation/3-netbox/ Using the Git method (checkout v3,4,1) to install. Run the command sudo /opt/netbox/upgrade.sh

Expected Behavior

It should be completed successfully.

Observed Behavior

I get the following error message.

Using Python 3.10.6
Creating a new virtual environment at /opt/netbox/venv...
Updating pip (pip install --upgrade pip)...
Requirement already satisfied: pip in ./venv/lib/python3.10/site-packages (22.0.2)
Collecting pip
  Downloading pip-22.3.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 9.1 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.2
    Uninstalling pip-22.0.2:
      Successfully uninstalled pip-22.0.2
Successfully installed pip-22.3.1
pip 22.3.1 from /opt/netbox/venv/lib/python3.10/site-packages/pip (python 3.10)
Installing Python system packages (pip install wheel)...
Collecting wheel
  Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: wheel
Successfully installed wheel-0.38.4
Installing core dependencies (pip install -r requirements.txt)...
Collecting bleach==5.0.1
  Downloading bleach-5.0.1-py3-none-any.whl (160 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.9/160.9 kB 1.3 MB/s eta 0:00:00
Collecting Django==4.1.4
  Downloading Django-4.1.4-py3-none-any.whl (8.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 30.8 MB/s eta 0:00:00
Collecting django-cors-headers==3.13.0
  Downloading django_cors_headers-3.13.0-py3-none-any.whl (13 kB)
Collecting django-debug-toolbar==3.8.1
  Downloading django_debug_toolbar-3.8.1-py3-none-any.whl (221 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 221.1/221.1 kB 33.9 MB/s eta 0:00:00
Collecting django-filter==22.1
  Downloading django_filter-22.1-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.9/80.9 kB 22.3 MB/s eta 0:00:00
Collecting django-graphiql-debug-toolbar==0.2.0
  Downloading django_graphiql_debug_toolbar-0.2.0-py3-none-any.whl (7.3 kB)
Collecting django-mptt==0.14
  Downloading django_mptt-0.14.0-py3-none-any.whl (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.6/115.6 kB 29.7 MB/s eta 0:00:00
Collecting django-pglocks==1.0.4
  Downloading django-pglocks-1.0.4.tar.gz (4.1 kB)
  Preparing metadata (setup.py) ... done
Collecting django-prometheus==2.2.0
  Downloading django_prometheus-2.2.0-py2.py3-none-any.whl (29 kB)
Collecting django-redis==5.2.0
  Downloading django_redis-5.2.0-py3-none-any.whl (30 kB)
Collecting django-rich==1.4.0
  Downloading django_rich-1.4.0-py3-none-any.whl (7.0 kB)
Collecting django-rq==2.6.0
  Downloading django_rq-2.6.0-py2.py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.2/48.2 kB 968.5 kB/s eta 0:00:00
Collecting django-tables2==2.4.1
  Downloading django_tables2-2.4.1-py2.py3-none-any.whl (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.1/93.1 kB 25.1 MB/s eta 0:00:00
Collecting django-taggit==3.1.0
  Downloading django_taggit-3.1.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.2/60.2 kB 18.3 MB/s eta 0:00:00
Collecting django-timezone-field==5.0
  Downloading django_timezone_field-5.0-py3-none-any.whl (10 kB)
Collecting djangorestframework==3.14.0
  Downloading djangorestframework-3.14.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 14.2 MB/s eta 0:00:00
Collecting drf-yasg[validation]==1.21.4
  Downloading drf_yasg-1.21.4-py3-none-any.whl (6.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 18.1 MB/s eta 0:00:00
Collecting graphene-django==3.0.0
  Downloading graphene_django-3.0.0-py2.py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.9/101.9 kB 32.4 MB/s eta 0:00:00
Collecting gunicorn==20.1.0
  Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 7.7 MB/s eta 0:00:00
Collecting Jinja2==3.1.2
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 1.7 MB/s eta 0:00:00
Collecting Markdown==3.3.7
  Downloading Markdown-3.3.7-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.8/97.8 kB 15.4 MB/s eta 0:00:00
Collecting mkdocs-material==8.5.11
  Downloading mkdocs_material-8.5.11-py3-none-any.whl (7.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 46.3 MB/s eta 0:00:00
Collecting mkdocstrings[python-legacy]==0.19.1
  Downloading mkdocstrings-0.19.1-py3-none-any.whl (25 kB)
Collecting netaddr==0.8.0
  Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 87.8 MB/s eta 0:00:00
Collecting Pillow==9.3.0
  Downloading Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 22.6 MB/s eta 0:00:00
Collecting psycopg2-binary==2.9.5
  Downloading psycopg2_binary-2.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 30.9 MB/s eta 0:00:00
Collecting PyYAML==6.0
  Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 682.2/682.2 kB 6.0 MB/s eta 0:00:00
Collecting sentry-sdk==1.11.1
  Downloading sentry_sdk-1.11.1-py2.py3-none-any.whl (168 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 169.0/169.0 kB 3.0 MB/s eta 0:00:00
Collecting social-auth-app-django==5.0.0
  Downloading social_auth_app_django-5.0.0-py3-none-any.whl (24 kB)
Collecting social-auth-core[openidconnect]==4.3.0
  Downloading social_auth_core-4.3.0-py3-none-any.whl (343 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.0/343.0 kB 36.7 MB/s eta 0:00:00
Collecting svgwrite==1.4.3
  Downloading svgwrite-1.4.3-py3-none-any.whl (67 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.1/67.1 kB 14.5 MB/s eta 0:00:00
Collecting tablib==3.3.0
  Downloading tablib-3.3.0-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.6/48.6 kB 11.1 MB/s eta 0:00:00
Collecting tzdata==2022.7
  Downloading tzdata-2022.7-py2.py3-none-any.whl (340 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 340.1/340.1 kB 33.6 MB/s eta 0:00:00
Collecting jsonschema==3.2.0
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 13.8 MB/s eta 0:00:00
Collecting six>=1.9.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting asgiref<4,>=3.5.2
  Downloading asgiref-3.6.0-py3-none-any.whl (23 kB)
Collecting sqlparse>=0.2.2
  Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 13.0 MB/s eta 0:00:00
Collecting django-js-asset
  Downloading django_js_asset-2.0.0-py3-none-any.whl (4.9 kB)
Collecting prometheus-client>=0.7
  Downloading prometheus_client-0.15.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.1/60.1 kB 1.1 MB/s eta 0:00:00
Collecting redis!=4.0.0,!=4.0.1,>=3
  Downloading redis-4.4.0-py3-none-any.whl (236 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 236.4/236.4 kB 19.3 MB/s eta 0:00:00
Collecting rich>=10.0.0
  Downloading rich-12.6.0-py3-none-any.whl (237 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 237.5/237.5 kB 44.2 MB/s eta 0:00:00
Collecting rq>=1.2
  Downloading rq-1.11.1-py2.py3-none-any.whl (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.8/70.8 kB 18.1 MB/s eta 0:00:00
Collecting pytz
  Downloading pytz-2022.7-py2.py3-none-any.whl (499 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 499.4/499.4 kB 26.9 MB/s eta 0:00:00
Collecting inflection>=0.3.1
  Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting packaging>=21.0
  Downloading packaging-22.0-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 10.9 MB/s eta 0:00:00
Collecting coreschema>=0.0.4
  Downloading coreschema-0.0.4.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Collecting ruamel.yaml>=0.16.13
  Downloading ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.5/109.5 kB 1.5 MB/s eta 0:00:00
Collecting uritemplate>=3.0.0
  Downloading uritemplate-4.1.1-py2.py3-none-any.whl (10 kB)
Collecting coreapi>=2.3.3
  Downloading coreapi-2.3.3-py2.py3-none-any.whl (25 kB)
Collecting swagger-spec-validator>=2.1.0
  Downloading swagger_spec_validator-3.0.3-py2.py3-none-any.whl (27 kB)
Collecting promise>=2.1
  Downloading promise-2.3.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
Collecting graphene<4,>=3.0
  Downloading graphene-3.2.1-py2.py3-none-any.whl (125 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.1/125.1 kB 1.9 MB/s eta 0:00:00
Collecting graphql-relay<4,>=3.1.1
  Downloading graphql_relay-3.2.0-py3-none-any.whl (16 kB)
Collecting graphql-core<4,>=3.1.0
  Downloading graphql_core-3.2.3-py3-none-any.whl (202 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.9/202.9 kB 46.0 MB/s eta 0:00:00
Collecting text-unidecode
  Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 kB 26.4 MB/s eta 0:00:00
Requirement already satisfied: setuptools>=3.0 in ./venv/lib/python3.10/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 19)) (59.6.0)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting mkdocs-material-extensions>=1.1
  Downloading mkdocs_material_extensions-1.1.1-py3-none-any.whl (7.9 kB)
Collecting mkdocs>=1.4.0
  Downloading mkdocs-1.4.2-py3-none-any.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 21.1 MB/s eta 0:00:00
Collecting pymdown-extensions>=9.4
  Downloading pymdown_extensions-9.9-py3-none-any.whl (219 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 219.5/219.5 kB 29.1 MB/s eta 0:00:00
Collecting pygments>=2.12
  Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 56.8 MB/s eta 0:00:00
Collecting requests>=2.26
  Downloading requests-2.28.1-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 15.0 MB/s eta 0:00:00
Collecting mkdocs-autorefs>=0.3.1
  Downloading mkdocs_autorefs-0.4.1-py3-none-any.whl (9.8 kB)
Collecting mkdocstrings-python-legacy>=0.2.1
  Downloading mkdocstrings_python_legacy-0.2.3-py3-none-any.whl (26 kB)
Collecting urllib3>=1.26.11
  Downloading urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 kB 2.9 MB/s eta 0:00:00
Collecting certifi
  Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 31.1 MB/s eta 0:00:00
Collecting python3-openid>=3.0.10
  Downloading python3_openid-3.2.0-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 kB 17.6 MB/s eta 0:00:00
Collecting oauthlib>=1.0.3
  Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 32.0 MB/s eta 0:00:00
Collecting defusedxml>=0.5.0rc1
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting requests-oauthlib>=0.6.1
  Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting cryptography>=1.4
  Downloading cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 55.0 MB/s eta 0:00:00
Collecting PyJWT>=2.0.0
  Downloading PyJWT-2.6.0-py3-none-any.whl (20 kB)
Collecting python-jose>=3.0.0
  Downloading python_jose-3.3.0-py2.py3-none-any.whl (33 kB)
Collecting attrs>=17.4.0
  Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.0/60.0 kB 758.9 kB/s eta 0:00:00
Collecting pyrsistent>=0.14.0
  Downloading pyrsistent-0.19.2-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 12.9 MB/s eta 0:00:00
Collecting itypes
  Downloading itypes-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 kB 57.7 MB/s eta 0:00:00
Collecting aniso8601<10,>=8
  Downloading aniso8601-9.0.1-py2.py3-none-any.whl (52 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.8/52.8 kB 425.3 kB/s eta 0:00:00
Collecting click>=7.0
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 1.9 MB/s eta 0:00:00
Collecting watchdog>=2.0
  Downloading watchdog-2.2.0-py3-none-manylinux2014_x86_64.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.7/78.7 kB 18.2 MB/s eta 0:00:00
Collecting ghp-import>=1.0
  Downloading ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting pyyaml-env-tag>=0.1
  Downloading pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB)
Collecting mergedeep>=1.3.4
  Downloading mergedeep-1.3.4-py3-none-any.whl (6.4 kB)
Collecting pytkdocs>=0.14
  Downloading pytkdocs-0.16.1-py3-none-any.whl (37 kB)
Collecting rsa
  Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting pyasn1
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 17.4 MB/s eta 0:00:00
Collecting ecdsa!=0.15
  Downloading ecdsa-0.18.0-py2.py3-none-any.whl (142 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.9/142.9 kB 1.2 MB/s eta 0:00:00
Collecting async-timeout>=4.0.2
  Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting idna<4,>=2.5
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 15.0 MB/s eta 0:00:00
Collecting charset-normalizer<3,>=2
  Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting commonmark<0.10.0,>=0.9.0
  Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 14.0 MB/s eta 0:00:00
Collecting ruamel.yaml.clib>=0.2.6
  Downloading ruamel.yaml.clib-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (485 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 485.6/485.6 kB 17.1 MB/s eta 0:00:00
Collecting typing-extensions
  Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 13.0 MB/s eta 0:00:00
Collecting python-dateutil>=2.8.1
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 1.8 MB/s eta 0:00:00
Building wheels for collected packages: django-pglocks, coreschema, promise
  Building wheel for django-pglocks (setup.py) ... done
  Created wheel for django-pglocks: filename=django_pglocks-1.0.4-py3-none-any.whl size=3875 sha256=1ced40da77d5065012ef50c67ecd3cee0774f014059ca367d3b105c1c076d455
  Stored in directory: /root/.cache/pip/wheels/95/5d/df/0cde733476a50adcd29f2ea74f758da71628a07bbceb1bbdfa
  Building wheel for coreschema (setup.py) ... done
  Created wheel for coreschema: filename=coreschema-0.0.4-py3-none-any.whl size=15030 sha256=5813c8b78bbe4349c488c9380198cf3de029a8bd65e99ce83d1722358cd06935
  Stored in directory: /root/.cache/pip/wheels/77/23/d2/e492f653c783d8e1acd784e804533145928ec2597cf10ff157
  Building wheel for promise (setup.py) ... done
  Created wheel for promise: filename=promise-2.3-py3-none-any.whl size=21501 sha256=22ae20c2491f361e90530d08979fdead17bb503c674bcf9faefb518382094201
  Stored in directory: /root/.cache/pip/wheels/76/40/54/417a4d64a01b61b247658d83597e1dc83c3de01fc0cef44972
Successfully built django-pglocks coreschema promise
Installing collected packages: webencodings, text-unidecode, pytz, pyasn1, netaddr, itypes, commonmark, aniso8601, watchdog, urllib3, uritemplate, tzdata, typing-extensions, tablib, svgwrite, sqlparse, six, ruamel.yaml.clib, rsa, PyYAML, pytkdocs, pyrsistent, PyJWT, pygments, pycparser, psycopg2-binary, prometheus-client, Pillow, packaging, oauthlib, mkdocs-material-extensions, mergedeep, MarkupSafe, Markdown, inflection, idna, gunicorn, graphql-core, django-timezone-field, defusedxml, click, charset-normalizer, certifi, attrs, async-timeout, asgiref, sentry-sdk, ruamel.yaml, rich, requests, redis, pyyaml-env-tag, python3-openid, python-dateutil, pymdown-extensions, promise, jsonschema, Jinja2, graphql-relay, ecdsa, django-prometheus, django-pglocks, Django, cffi, bleach, swagger-spec-validator, rq, requests-oauthlib, python-jose, graphene, ghp-import, djangorestframework, django-taggit, django-tables2, django-rich, django-redis, django-js-asset, django-filter, django-debug-toolbar, django-cors-headers, cryptography, coreschema, social-auth-core, mkdocs, graphene-django, django-rq, django-mptt, coreapi, social-auth-app-django, mkdocs-material, mkdocs-autorefs, drf-yasg, django-graphiql-debug-toolbar, mkdocstrings, mkdocstrings-python-legacy
Successfully installed Django-4.1.4 Jinja2-3.1.2 Markdown-3.3.7 MarkupSafe-2.1.1 Pillow-9.3.0 PyJWT-2.6.0 PyYAML-6.0 aniso8601-9.0.1 asgiref-3.6.0 async-timeout-4.0.2 attrs-22.2.0 bleach-5.0.1 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-2.1.1 click-8.1.3 commonmark-0.9.1 coreapi-2.3.3 coreschema-0.0.4 cryptography-38.0.4 defusedxml-0.7.1 django-cors-headers-3.13.0 django-debug-toolbar-3.8.1 django-filter-22.1 django-graphiql-debug-toolbar-0.2.0 django-js-asset-2.0.0 django-mptt-0.14.0 django-pglocks-1.0.4 django-prometheus-2.2.0 django-redis-5.2.0 django-rich-1.4.0 django-rq-2.6.0 django-tables2-2.4.1 django-taggit-3.1.0 django-timezone-field-5.0 djangorestframework-3.14.0 drf-yasg-1.21.4 ecdsa-0.18.0 ghp-import-2.1.0 graphene-3.2.1 graphene-django-3.0.0 graphql-core-3.2.3 graphql-relay-3.2.0 gunicorn-20.1.0 idna-3.4 inflection-0.5.1 itypes-1.2.0 jsonschema-3.2.0 mergedeep-1.3.4 mkdocs-1.4.2 mkdocs-autorefs-0.4.1 mkdocs-material-8.5.11 mkdocs-material-extensions-1.1.1 mkdocstrings-0.19.1 mkdocstrings-python-legacy-0.2.3 netaddr-0.8.0 oauthlib-3.2.2 packaging-22.0 prometheus-client-0.15.0 promise-2.3 psycopg2-binary-2.9.5 pyasn1-0.4.8 pycparser-2.21 pygments-2.13.0 pymdown-extensions-9.9 pyrsistent-0.19.2 python-dateutil-2.8.2 python-jose-3.3.0 python3-openid-3.2.0 pytkdocs-0.16.1 pytz-2022.7 pyyaml-env-tag-0.1 redis-4.4.0 requests-2.28.1 requests-oauthlib-1.3.1 rich-12.6.0 rq-1.11.1 rsa-4.9 ruamel.yaml-0.17.21 ruamel.yaml.clib-0.2.7 sentry-sdk-1.11.1 six-1.16.0 social-auth-app-django-5.0.0 social-auth-core-4.3.0 sqlparse-0.4.3 svgwrite-1.4.3 swagger-spec-validator-3.0.3 tablib-3.3.0 text-unidecode-1.3 typing-extensions-4.4.0 tzdata-2022.7 uritemplate-4.1.1 urllib3-1.26.13 watchdog-2.2.0 webencodings-0.5.1
Skipping local dependencies (local_requirements.txt not found)
Applying database migrations (python3 netbox/manage.py migrate)...
Operations to perform:
  Apply all migrations: admin, auth, circuits, contenttypes, dcim, django_rq, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization, wireless
Running migrations:
Traceback (most recent call last):
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute
    return self.cursor.execute(sql)
psycopg2.errors.InsufficientPrivilege: permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...
                     ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 70, in ensure_schema
    editor.create_model(self.Migration)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 447, in create_model
    self.execute(sql, params or None)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 199, in execute
    cursor.execute(sql, params)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...
                     ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/netbox/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 349, in handle
    post_migrate_state = executor.migrate(
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 107, in migrate
    self.recorder.ensure_schema()
  File "/opt/netbox/venv/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 72, in ensure_schema
    raise MigrationSchemaMissing(
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigint NOT NULL PRIMA...
                     ^
)
abhi1693 commented 1 year ago

Did you create the database with the user you have defined in your configuration as specified at https://docs.netbox.dev/en/stable/installation/1-postgresql/

navjotjsingh commented 1 year ago

Yes.