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.75k stars 2.54k forks source link

Debug toolbar fails to load css and scripts #17158

Closed theS1LV3R closed 2 weeks ago

theS1LV3R commented 4 weeks ago

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.11

Steps to Reproduce

  1. Set INTERNAL_IPS to the correct IPs and DEBUG to true to allow the toolbar to be loaded

Expected Behavior

Toolbar loads with correct styling and functionality

Observed Behavior

HTML loads correctly, and requests are made by the browser to load css and js as well, however netbox returns a 404 and fails the loading.

Requests are made to /static/debug_toolbar/css/toolbar.css, /static/debug_toolbar/css/print.css and /static/debug_toolbar/js/toolbar.js, all three returns the same 404.

arthanson commented 3 weeks ago

@theS1LV3R can you please double-check, I run debug toolbar all day and just retried it, pip installed clean and cleared caches and it was fine.

theS1LV3R commented 3 weeks ago

I forgot to mention that I am running with Docker, if that affects anything. However I am using the standard netbox Docker image.

But I have now retried, and still failed to load CSS and JS. I'll attempt a fresh install with the toolbar and update further. Would be weird if it occurred in docker but not otherwise.

theS1LV3R commented 3 weeks ago

The debug toolbar loads successfully when running the dev server as per the installation instructions. Is this maybe a docker specific issue in this case?

Reason for attempting to load the debug toolbar in the docker container is to investigate some slowness we're experiencing in our installation at my company that doesn't seem to be caused by hardware limitations, so we were hoping the debug toolbar may point us in the right direction.

arthanson commented 2 weeks ago

@theS1LV3R sounds like a docker issue as it loads successfully using the default install. I'd suggest opening up a discussion (https://github.com/netbox-community/netbox/discussions) as there are a lot in the community running under docker and they could help debug it. Closing this issue.