Skip to content

NetBox API connection not found despite valid configuration #286

Open
@bicisteadm

Description

@bicisteadm

Environment

  • NetBox Community v4.2.8-Docker-3.2.1 deployed using HelmChart
  • Proxbox v0.0.6b2
  • Proxbox API emersonfelipesp/proxbox-api:latest running as a sidecar
  • Inside the sidecar container, pip shows:
    • proxbox_api==0.0.2
    • pynetbox_api==0.0.2
  • Proxmox 8.4.1

Issue

When triggering any synchronization (e.g., Sync Nodes), no objects are imported into NetBox, and the logs display:

Trying to establish connection to NetBox using SQL database...
proxmox_schemas: [ProxmoxSessionSchema(ip_address='172.16.1.10', domain='pve.example.net', http_port=8006, user='root@pam', password=None, token=ProxmoxTokenSchema(name='netbox', value='dummydummydummy'), ssl=False)]
INPUT is Pydantic Model ProxmoxSessionSchema
Using token to authenticate with Proxmox
Using domain pve.example.net to authenticate with Proxmox
NetBox API connection not found.
Trying to establish connection to NetBox using SQL database...
The request failed with code 400 Bad Request: {'tags': ['Invalid pk "0" - object does not exist.']}
NetBox API connection not found.
NetBox API connection not found.
NetBox API connection not found.
NetBox API connection not found.
NetBox API connection not found.
NetBox API connection not found.
netbox_device: {}
INFO:     127.0.0.1:41132 - "GET /dcim/devices/create HTTP/1.1" 200 OK

Despite this, in the NetBox GUI under Plugins → Proxbox, all components show Successful!.

ProxBox status

This behavior is consistent across all sync actions (Nodes, Virtual Machines).

Possible Causes (Based on Debugging)

  • The netboxendpoint table in the SQLite database does contain valid data (ip_address, domain, port, token, etc.).
  • Direct curl requests to /api/ and /api/status/ succeed (HTTP 200 OK) using the token from the database.
  • The _establish_from_sql() function in pynetbox_api.session does not appear to return a valid pynetbox.api object.
  • Debug logs such as Found NetBox endpoint are never printed, indicating that the NetBox endpoint is likely not loaded or returned as None.
  • All fallback connection strategies (e.g., using http://localhost:PORT) are attempted but seemingly fail silently.

Happy to provide more details if needed – just let me know!

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