Static Media Failure #3842

Closed
opened 2025-12-29 18:31:34 +01:00 by adam · 2 comments
Owner

Originally created by @emmanuelhaine on GitHub (Jul 8, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: v2.8.7

Steps to Reproduce

  1. Linux CentOS 7.8
  2. Follow the steps provided in https://netbox.readthedocs.io/en/stable/installation/
  3. Install nginx as web server and configure a vhost with ssl

Make sure nginx is serving the static directory

location /static/ {
alias /opt/netbox/netbox/static/;
}

Expected Behavior

Open the page without any problem

Observed Behavior

When I try to access the application I got the message below:

Static Media Failure
The following static media file failed to load: css/base.css
Check the following:

manage.py collectstatic was run during the most recent upgrade. This installs the most recent iteration of each static file into the static root path.
The HTTP service (e.g. Nginx or Apache) is configured to serve files from the STATIC_ROOT path. Refer to the installation documentation for further guidance.
STATIC_URL: /static/
The file css/base.css exists in the static root directory and is readable by the HTTP process.
Click here to attempt loading NetBox again.

After some tests, I changed the owner and group from root to nginx in /opt/netbox recursively. And even this way I'm getting the error. I just open the page successfully when I change the user to root in /etc/nginx/ngxin.conf file.

Originally created by @emmanuelhaine on GitHub (Jul 8, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.8 * NetBox version: v2.8.7 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Linux CentOS 7.8 2. Follow the steps provided in https://netbox.readthedocs.io/en/stable/installation/ 3. Install nginx as web server and configure a vhost with ssl 4. Make sure nginx is serving the static directory location /static/ { alias /opt/netbox/netbox/static/; } <!-- What did you expect to happen? --> ### Expected Behavior Open the page without any problem <!-- What happened instead? --> ### Observed Behavior When I try to access the application I got the message below: Static Media Failure The following static media file failed to load: css/base.css Check the following: manage.py collectstatic was run during the most recent upgrade. This installs the most recent iteration of each static file into the static root path. The HTTP service (e.g. Nginx or Apache) is configured to serve files from the STATIC_ROOT path. Refer to the installation documentation for further guidance. STATIC_URL: /static/ The file css/base.css exists in the static root directory and is readable by the HTTP process. Click here to attempt loading NetBox again. After some tests, I changed the owner and group from root to nginx in /opt/netbox recursively. And even this way I'm getting the error. I just open the page successfully when I change the user to root in /etc/nginx/ngxin.conf file.
adam closed this issue 2025-12-29 18:31:34 +01:00
Author
Owner

@Inopio commented on GitHub (Jul 8, 2020):

Same issue for me, I hope to see an answer...

@Inopio commented on GitHub (Jul 8, 2020): Same issue for me, I hope to see an answer...
Author
Owner

@jeremystretch commented on GitHub (Jul 8, 2020):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

@jeremystretch commented on GitHub (Jul 8, 2020): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/netbox-community/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3842