Page Doesn't Render

410 views
Skip to first unread message

Shane P

unread,
Oct 11, 2016, 3:54:27 AM10/11/16
to NetBox
Hi there, I've managed to work through the install and after much difficulty with nginx 502 bad gateway (selinux the culprit) the home page now doesn't render as per the attached.
My skill set isn't great with linux so it's been bit of a battle to get to this stage.

When I run the test step as per the docs it all works fine:
./manage.py runserver 0.0.0.0:8000 --insecure


I'm running CentOS 7 and I've just followed the steps as per the doco, if there's config files needed to help troubleshoot please let me know.

Would greatly appreciate any nudge in the right direction!
Cheers
netbox.png

Jeremy Stretch

unread,
Oct 11, 2016, 1:18:21 PM10/11/16
to Shane P, NetBox
This happens when the HTTP service isn't serving static content (CSS, JavaScript, etc.) for some reason. Double-check your nginx config. It should have a stanza like this within the server config:

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

Make sure the path is correct. If it is, check the access logs to see what nginx is doing with these requests.

Hope that helps!

Jeremy

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/1cef4a44-b082-4234-bca7-2449a121e96c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Volkan Yalçın

unread,
Oct 12, 2016, 10:54:21 AM10/12/16
to NetBox
Hi,

I had similar problem too. Then I found it is because of debug variable. Debug should be True at line 27 in settings.py file. 

DEBUG = getattr(configuration, 'DEBUG', True)

Could you please test this?

Thank you.

Volkan Yalçın

unread,
Oct 12, 2016, 11:05:08 AM10/12/16
to NetBox
Hi again,

I forgot to say, please don't forget to clear cache before check.

Jeremy Stretch

unread,
Oct 12, 2016, 11:17:03 AM10/12/16
to Volkan Yalçın, NetBox
DEBUG is only to be used for development and troubleshooting purposes. It is not suitable for production use, and not required to serve static content.

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.

Shane P

unread,
Oct 13, 2016, 6:53:30 PM10/13/16
to NetBox
I spent some time reviewing all of the configs and they appeared as to what is stated in the docs. In the end I think my lack skills to be honest got the better of me.
I decided to go with deploying via docker which was super easy and I have netbox running without any issues.
I don't see in the docs how to upgrade to a new release utilising docker, is there perhaps some instructions you could share Jeremy?

So far pretty happy with the little amount of content I've added so far, so great stuff in releasing this to the community. Time to do away with spreadsheets I think.

Cheers


On Thursday, October 13, 2016 at 1:17:03 AM UTC+10, Jeremy Stretch wrote:
DEBUG is only to be used for development and troubleshooting purposes. It is not suitable for production use, and not required to serve static content.
On Wed, Oct 12, 2016 at 11:05 AM, Volkan Yalçın <vlya...@gmail.com> wrote:
Hi again,

I forgot to say, please don't forget to clear cache before check.

On Wednesday, October 12, 2016 at 5:54:21 PM UTC+3, Volkan Yalçın wrote:
Hi,

I had similar problem too. Then I found it is because of debug variable. Debug should be True at line 27 in settings.py file. 

DEBUG = getattr(configuration, 'DEBUG', True)

Could you please test this?

Thank you.

On Tuesday, October 11, 2016 at 10:54:27 AM UTC+3, Shane P wrote:
Hi there, I've managed to work through the install and after much difficulty with nginx 502 bad gateway (selinux the culprit) the home page now doesn't render as per the attached.
My skill set isn't great with linux so it's been bit of a battle to get to this stage.

When I run the test step as per the docs it all works fine:
./manage.py runserver 0.0.0.0:8000 --insecure


I'm running CentOS 7 and I've just followed the steps as per the doco, if there's config files needed to help troubleshoot please let me know.

Would greatly appreciate any nudge in the right direction!
Cheers

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.

Terry McKenna

unread,
Oct 28, 2016, 8:02:23 AM10/28/16
to NetBox
Shane,

How did you resolve the "502 Bad Gateway" error?

Thanks

Terry McKenna

unread,
Nov 1, 2016, 7:53:36 AM11/1/16
to NetBox
I am seeing the same issue "Page Doesn't Render" with the development server: /opt/netbox/netbox$ manage.py runserver 0.0.0.0:8000

I followed all the steps in the install guide and did not encounter any issues.

Any suggestions?

Terry McKenna

unread,
Nov 1, 2016, 3:25:55 PM11/1/16
to NetBox
From the Django documentation:

Serving the files

In addition to these configuration steps, you’ll also need to actually serve the static files.

During development, if you use django.contrib.staticfiles, this will be done automatically by runserver when DEBUG is set to True (see django.contrib.staticfiles.views.serve()).

This method is grossly inefficient and probably insecure, so it is unsuitable for production.

See Deploying static files for proper strategies to serve static files in production environments.

The main page now displays correctly. I am doing a POC so this is fine for now. I'll deploy a web server is we go live with NetBox.

Jeremy Stretch

unread,
Nov 1, 2016, 3:31:17 PM11/1/16
to Terry McKenna, NetBox
FYI NetBox will be noticeably slower when running with DEBUG enabled.

Jeremy

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/f6d2ca49-0534-4c64-a6f1-61372fff4c5a%40googlegroups.com.

Marian Franko

unread,
Nov 8, 2016, 4:03:37 AM11/8/16
to NetBox
Hello gentlemen,

please may you help me with my installation?
I've followed the setup instructions twice (on new server) but still stuck on the same error.
The page is not rendered correctly and I've got this error: "configuration error:  couldn't perform authentication. AuthType not set!: /static/js/forms.js, referer: http://netbox.server.local/"
I'm running without the LDAP (yet) and nor "debug" option not helped.

Thank you.
BR

Dňa utorok, 11. októbra 2016 9:54:27 UTC+2 Shane P napísal(-a):

Shane P

unread,
Nov 13, 2016, 11:46:08 PM11/13/16
to NetBox
I couldn't work it out, I did get my POC running via docker.
Eventually found a guide here: http://packetpushers.net/install-netbox-centos-7/ 
Took two attempts, first attempt ended up with the same not able to render the pages, second attempt I got it working.

Now I'm trying to get ldap working!

Sorry I cant shed anymore light.

Aina Anjary Fenomamy

unread,
Mar 9, 2017, 9:28:40 AM3/9/17
to NetBox
Hello all,
I  have also got the same issue  for  dev environnement , I've activated the debug mode and it works.
Thank you ;)
Aina

On Wednesday, October 12, 2016 at 5:54:21 PM UTC+3, Volkan Yalçın wrote:
Reply all
Reply to author
Forward
0 new messages