NetBox 2.0.4 Install Problems

2,291 views
Skip to first unread message

Reed Waller

unread,
May 30, 2017, 9:55:56 PM5/30/17
to NetBox
Good evening everyone,

Apologies if this is the wrong place to post this, but I'm attempting to evaluate NetBox for use within my organization. I've had a hell of a time with the install instructions listed at http://netbox.readthedocs.io/en/stable/installation/netbox/#test-the-application, there were quite a few missing Python dependencies in Ubuntu 14.04. I finally got everything compiled and happy, and have hit a road block when trying to "Test the Application." I see the following output in PuTTY:

username@hostname:/opt/netbox/netbox$ sudo ./manage.py runserver 0.0.0.0:8000 --insecure
[sudo] password for username:
Performing system checks...

System check identified no issues (0 silenced).
May 31, 2017 - 01:47:05
Django version 1.11.1, using settings 'netbox.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

I've obviously replaced the username/hostname with generic values. When attempting to connect to the IP via http://IP, I get the standard "This page can't be displayed" error in Internet Explorer. Is this because my NetBox server doesn't have X installed, and this test is meant to only be performed locally from the server in question? I'm attempting to contact the server from my workstation, which is on a different subnet. I want to move on to configuring Nginx/Apache, but the instructions clearly state to stop if the page doesn't load:

"Warning

If the test service does not run, or you cannot reach the NetBox home page, something has gone wrong. Do not proceed with the rest of this guide until the installation has been corrected."


The most problematic section of the instructions involved running "sudo pip3 install -r requirements.txt." I had to repeatedly try this command, and each attempt I had to peruse the output and install <insert missing Python package here>. I was quite excited when it installed with no errors, and admittedly didn't expect to run into this issue. This is proving very tedious/challenging, I'm hoping to get my company away from using spreadsheets.

Much thanks,

-Snipe

Alex Sotelo

unread,
May 31, 2017, 4:21:49 AM5/31/17
to NetBox
Snipe,

Check your configuration.py file and make sure you are connecting to the value in ALLOWED_HOSTS.

Jeremy Stretch

unread,
May 31, 2017, 9:47:43 AM5/31/17
to Alex Sotelo, NetBox
> I've obviously replaced the username/hostname with generic values. When attempting to connect to the IP via http://IP, I get the standard "This page can't be displayed" error in Internet Explorer.

The development server runs on port 8000 by default, so you need to connect to http://<ip>:8000/

--
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/cc8b4fd4-9b9c-4154-ae33-55727b2dfab9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reed Waller

unread,
May 31, 2017, 1:14:46 PM5/31/17
to NetBox
I added the port and now it says "Bad Request (400)." I also received 4 emails from the system with a subject of "[NetBox] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: 'xxx.xxx.xxx.xxx:8000'. You may need to add 'xxx.xxx.xxx.xxx' to ALLOWED_HOSTS." I just checked and had a typo in the ALLOWED_HOSTS area...I must have been half asleep at EOD yesterday =(. Thanks everyone for your help, looking forward to getting this running!

-Snipe
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.

Reed Waller

unread,
May 31, 2017, 2:21:31 PM5/31/17
to NetBox
And I sadly spoke too soon, I've immediately hit another roadblock attempting to install nginx, it failed spectacularly so I installed Apache2. I then hit the same stumbling block attempting to install gunicorn and supervisor, and I'm afraid I don't even know where to begin troubleshooting this. Here's the log:

sudo apt-get install -y gunicorn supervisor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  python-meld3 python-setuptools
Suggested packages:
  python-tornado python-gevent python-pastedeploy python-setproctitle
The following NEW packages will be installed:
  gunicorn python-meld3 python-setuptools supervisor
0 upgraded, 4 newly installed, 0 to remove and 3 not upgraded.
Need to get 705 kB of archives.
After this operation, 3,112 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main python-setuptools all 3.3-1ubuntu2 [230 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main gunicorn all 17.5-2build1 [122 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty/universe python-meld3 amd64 0.6.10-1 [39.0 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/universe supervisor all 3.0b2-1 [314 kB]
Fetched 705 kB in 0s (780 kB/s)
Selecting previously unselected package python-setuptools.
(Reading database ... 68000 files and directories currently installed.)
Preparing to unpack .../python-setuptools_3.3-1ubuntu2_all.deb ...
Unpacking python-setuptools (3.3-1ubuntu2) ...
Selecting previously unselected package gunicorn.
Preparing to unpack .../gunicorn_17.5-2build1_all.deb ...
Unpacking gunicorn (17.5-2build1) ...
Selecting previously unselected package python-meld3.
Preparing to unpack .../python-meld3_0.6.10-1_amd64.deb ...
Unpacking python-meld3 (0.6.10-1) ...
Selecting previously unselected package supervisor.
Preparing to unpack .../supervisor_3.0b2-1_all.deb ...
Unpacking supervisor (3.0b2-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up python-setuptools (3.3-1ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-setuptools (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                          dpkg: dependency problems prevent configuration of gunicorn:
 gunicorn depends on python-setuptools; however:
  Package python-setuptools is not configured yet.

dpkg: error processing package gunicorn (--configure):
 dependency problems - leaving unconfigured
Setting up python-meld3 (0.6.10-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-meld3 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of supervisor:
 supervisor depends on python-meld3; however:
  Package python-meld3 is not configured yet.

dpkg: error processing package supervisor (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-setuptools
 gunicorn
 python-meld3
 supervisor
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems like ConfigParser.py is the cause of this, but I'm not sure how to proceed. Any help is greatly appreciated, I've been out of the Linux world for a few years and am quite rusty =(.

Much thanks,
-Snipe

Reed Waller

unread,
May 31, 2017, 3:01:11 PM5/31/17
to NetBox
Beginning to wonder if I should have tried to go the Python2 route instead of Python3, starting over because of a hunch sounds less than enjoyable though =/. The good news is I do have a snapshot of the OS in a fresh install state at the very least. Going to temporarily shelve this project until next steps are figured out.

-Snipe

Reed Waller

unread,
Jun 1, 2017, 3:33:05 PM6/1/17
to NetBox
Nginx successfully installed after I went back and used Python2 rather than Python3. I appreciate all of the help!

Thanks,
-Snipe
Reply all
Reply to author
Forward
0 new messages