Skip to content

Netbox 4.0 failures #134

Open
Open
@kollross

Description

@kollross

Since upgrading to Netbox 4.0, I'm running into an error when running nb-dt-import.py. I've performed a git pull but with no updates. I also performed a "[root@netbox-dev] # pip install -r requirements.txt", which updates some packages but nothing resolving the issue.

Netbox 4.0
Python 3.10.12
pynetbox 7.3.3

.env file

NETBOX_URL=https://netbox.mydomain.com
NETBOX_TOKEN=11111112222222223333333444444444
REPO_URL=https://github.com/netbox-community/devicetype-library.git
REPO_BRANCH=master
IGNORE_SSL_ERRORS=False
#SLUGS=c9300-48u isr4431 isr4331

Here is the error:

Package devicetype-library is already installed, updating /opt/Device-Type-Library-Import/repo
Traceback (most recent call last):
  File "/opt/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
    main()
  File "/opt/Device-Type-Library-Import/./nb-dt-import.py", line 17, in main
    netbox = NetBox(settings)
  File "/opt/Device-Type-Library-Import/netbox_api.py", line 28, in __init__
    self.verify_compatibility()
  File "/opt/Device-Type-Library-Import/netbox_api.py", line 50, in verify_compatibility
    version_split = [int(x) for x in self.netbox.version.split('.')]
  File "/opt/Device-Type-Library-Import/venv/lib/python3.10/site-packages/pynetbox/core/api.py", line 109, in version
    ).get_version()
  File "/opt/Device-Type-Library-Import/venv/lib/python3.10/site-packages/pynetbox/core/query.py", line 187, in get_version
    raise RequestError(req)
pynetbox.core.query.RequestError: The request failed with code 403 Forbidden: {'detail': 'Authentication credentials were not provided.'}

On the Netbox side I'm seeing this error in the logs

2024-05-08 09:12:29,896 django.request WARNING: Forbidden: /api/
2024-05-08 09:12:38,751 django.request WARNING: Forbidden: /api/
2024-05-08 09:12:54,906 django.request WARNING: Forbidden: /api/
2024-05-08 09:13:47,340 django.request WARNING: Forbidden: /api/
2024-05-08 09:19:24,318 django.request WARNING: Forbidden: /api/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions