[Support] Linuxserver.io - Netbox


Recommended Posts

linuxserver_medium.png?v=4&s=4000

 

Application Name: Netbox
Application Site: https://github.com/netbox-community/netbox
Docker Hub: https://hub.docker.com/r/linuxserver/netbox/
Github: https://github.com/linuxserver/docker-netbox

 

Please post any questions/issues relating to this docker you have in this thread.

If you are not using Unraid (and you should be!) then please do not post here, rather use the linuxserver.io forum for support.

Link to comment

Hello,

 

the installation went fine, but I can't to login for some reason. It keeps saying wrong username and password. (i did setup those in xml file)

 

I tried inside docker to run at: /app/netbox/netbox/ this command ./manage.py createsuperuser

 

getting this error: env: "python": no such file or directory

 

 

**** 

 

 

Also it would be a good idea maybe to add variable path for email notifications

 

And add variables for email setup:

# Email settings
EMAIL = {
    'SERVER': 'localhost',
    'PORT': 25,
    'USERNAME': '',
    'PASSWORD': '',
    'USE_SSL': False,
    'USE_TLS': False,
    'TIMEOUT': 10,  # seconds
    'FROM_EMAIL': '',
}
 


 

 

Edited by Korshakov
Link to comment
8 hours ago, Korshakov said:

Hello,

 

the installation went fine, but I can't to login for some reason. It keeps saying wrong username and password. (i did setup those in xml file)

 

I tried inside docker to run at: /app/netbox/netbox/ this command ./manage.py createsuperuser

 

getting this error: env: "python": no such file or directory

 

 

**** 

 

 

Also it would be a good idea maybe to add variable path for email notifications

 

And add variables for email setup:

# Email settings
EMAIL = {
    'SERVER': 'localhost',
    'PORT': 25,
    'USERNAME': '',
    'PASSWORD': '',
    'USE_SSL': False,
    'USE_TLS': False,
    'TIMEOUT': 10,  # seconds
    'FROM_EMAIL': '',
}
 


 

 

Which XML file are you talking about?

There are variables in the template to set up the superuser.

Try to not use any special characters in case unraid have an issue passing those to the run command.

Edited by saarg
Link to comment
19 minutes ago, saarg said:

Which XML file are you talking about?

There are variables in the template to set up the superuser.

Try to not use any special characters inn ASE unraid have an issue passing those to the run command.

Sorry I mean netbox template. I have tried simple passwords like "pass" and no luck should the user be actual email as written in template comments or just username?

Edited by Korshakov
Link to comment
8 hours ago, Korshakov said:

Sorry I mean netbox template. I have tried simple passwords like "pass" and no luck should the user be actual email as written in template comments or just username?

I haven't tried it myself, but might be you have to use an email address. Also don't use a too short password in case it needs a minimum of characters.

Link to comment

No luck there. I've tried to input email address also tried username, tried long simple passwords, complex passwords with special characters, complex passwords without special characters. No luck at all.

 

NOTE: with each try I have cleared database, appdata folder and redis.

Edited by Korshakov
Link to comment

I'm having an issue accessing the webui.  Getting a Bad Request (400) error.  I'm sure it's user error on my part, but I'm not sure what I'm doing wrong.
I filled in the required info on the template and left the non required fields blank.   I have since gone back and entered info into all the fields and I still get the same results. 
Any suggested troubleshooting?

Link to comment
On 9/27/2020 at 5:02 PM, Korshakov said:

Hello,

 

the installation went fine, but I can't to login for some reason. It keeps saying wrong username and password. (i did setup those in xml file)

 

I tried inside docker to run at: /app/netbox/netbox/ this command ./manage.py createsuperuser

 

getting this error: env: "python": no such file or directory

 

 

**** 

 

 

Also it would be a good idea maybe to add variable path for email notifications

 

And add variables for email setup:

# Email settings
EMAIL = {
    'SERVER': 'localhost',
    'PORT': 25,
    'USERNAME': '',
    'PASSWORD': '',
    'USE_SSL': False,
    'USE_TLS': False,
    'TIMEOUT': 10,  # seconds
    'FROM_EMAIL': '',
}
 


 

 

Try "python3 ./manage.py createsuperuser"

 

That worked for me.

Link to comment

that worked per

1 hour ago, cirialkilr said:

Try "python3 ./manage.py createsuperuser"

 

That worked for me.

Worked like charm! Thanks a mil.

 

For others make sure once you hit console button for your docker icon you need to be in correct directory to run that command.

commands:

 

1. get into correct directory with this command: "cd /app/netbox/netbox"

2. run "python3 ./manage.py createsuperuser"

3. type in info as it asks you

4. done

Link to comment
  • 2 weeks later...

I can't get this to work...

 

I get Bad Request (400) regardless of using IP or hostname.

 

My logs show this:

 

Quote

File "/usr/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name does not resolve

command "/usr/bin/python3 ./manage.py remove_stale_contenttypes --no-input" exited with non-zero code: 1
Wed Oct 14 15:04:28 2020 - FATAL hook failed, destroying instance
SIGINT/SIGQUIT received...killing workers...
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x55c3465d5ba0 pid: 258 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 258)
spawned uWSGI worker 1 (pid: 281, cores: 1)
[uwsgi-daemons] spawning "/usr/bin/python3 ./manage.py rqworker" (uid: 99 gid: 100)
Error -2 connecting to redis:6379. Name does not resolve.
daemon "/usr/bin/python3 ./manage.py rqworker" (pid: 282) annihilated

 

I tried setting 'Database Host:' to 127.0.0.1, but that didn't help. Any ideas?

Link to comment
24 minutes ago, UNRAID5 said:

I can't get this to work...

 

I get Bad Request (400) regardless of using IP or hostname.

 

My logs show this:

 

 

I tried setting 'Database Host:' to 127.0.0.1, but that didn't help. Any ideas?

Both your database and redis does not resolve. Is the redis and database container in the same custom bridge? If not, then use the IP instead of name.

Link to comment
On 10/14/2020 at 3:37 PM, saarg said:

Both your database and redis does not resolve. Is the redis and database container in the same custom bridge? If not, then use the IP instead of name.

I assumed the DB's would be built into the docker, is that not the case? Setting the IP as the host for both DB's renders the same result.

Link to comment
  • 3 weeks later...
On 10/16/2020 at 3:58 PM, saarg said:

You need both a redis and a database container.

I'm also having that issue despite having a PostgreSQL and a Redis server container ready and I'm not sure how to resolve it.

Although, the one thing that confuses me is how it's trying to connect to a server with the hostname « redis » while I actually supplied a REDIS_HOST that's way different than this. I also tried with an IP address but it's still looking for « redis »...
It's also throwing Python exceptions at me in the logs which is probably part of the cause of the container not functioning but I have a hard time understanding them. So, I'd like some help on that too, please. 😅

 

Please find the current state of the Netbox container log and a screenshot of the current configuration for it attached.

netbox.config.png

netbox.log

Link to comment
6 hours ago, campfred said:

I'm also having that issue despite having a PostgreSQL and a Redis server container ready and I'm not sure how to resolve it.

Although, the one thing that confuses me is how it's trying to connect to a server with the hostname « redis » while I actually supplied a REDIS_HOST that's way different than this. I also tried with an IP address but it's still looking for « redis »...
It's also throwing Python exceptions at me in the logs which is probably part of the cause of the container not functioning but I have a hard time understanding them. So, I'd like some help on that too, please. 😅

 

Please find the current state of the Netbox container log and a screenshot of the current configuration for it attached.

netbox.config.png

netbox.log 13.92 kB · 0 downloads

You have not supplied the correct IP or hostname for either redis or postgres. Not sure what you have entered as host for those two fields.

Link to comment
3 minutes ago, saarg said:

You have not supplied the correct IP or hostname for either redis or postgres. Not sure what you have entered as host for those two fields.

Well, that's weird because that's exactly what I've done : Supplying the actual hostname (or even the IP address as I mentioned in your quote). 🤔
Maybe you missed part of my message because I already assessed the IP possibility.

But just for re-checking what I said previously, I entered the IP address instead and I got exactly the same result where the container still looks for something else than what I said. You will find attached a screenshot of the configuration using IP addresses instead and also another copy of the container's logs following that configuration using IP addresses where it still wants to talk to « redis » instead of what I actually supplied (172.17.0.14).

Also, for the sake of answering you correctly, what you see in the screenshot that I put as the Redis server and the PostgreSQL server are the identifiers of the two containers respectively. They show up as that hostname when checked from inside the containers. Attached is a GIF that shows how I get them from the consoles.

netbox.config.png

2020-11-03_17-01-55.gif

netbox.log

Link to comment
22 minutes ago, campfred said:

Well, that's weird because that's exactly what I've done : Supplying the actual hostname (or even the IP address as I mentioned in your quote). 🤔
Maybe you missed part of my message because I already assessed the IP possibility.

But just for re-checking what I said previously, I entered the IP address instead and I got exactly the same result where the container still looks for something else than what I said. You will find attached a screenshot of the configuration using IP addresses instead and also another copy of the container's logs following that configuration using IP addresses where it still wants to talk to « redis » instead of what I actually supplied (172.17.0.14).

Also, for the sake of answering you correctly, what you see in the screenshot that I put as the Redis server and the PostgreSQL server are the identifiers of the two containers respectively. They show up as that hostname when checked from inside the containers. Attached is a GIF that shows how I get them from the consoles.

netbox.config.png

2020-11-03_17-01-55.gif

netbox.log 13.75 kB · 0 downloads

You should use the unraid IP and not the internal docker IP as they change. Also, if you want to use host names, the containers need to be on a custom bridge and you use the container name.

Do you use the standard ports or have you changed them? Try setting them to the ports you use for the postgres and redis instead of blank.

 

It's much easier if you supply the docker run command instead of screenshots.

Link to comment
On 11/3/2020 at 5:51 PM, saarg said:

You should use the unraid IP and not the internal docker IP as they change. Also, if you want to use host names, the containers need to be on a custom bridge and you use the container name.

Do you use the standard ports or have you changed them? Try setting them to the ports you use for the postgres and redis instead of blank.

 

It's much easier if you supply the docker run command instead of screenshots.

Sorry about the assle with the screenshots. I didn't know it was possible to extract docker run commands from the configuration done inside the unRAID interface...but I can't find how to do that. How is it done?

Edited by campfred
That's not the current version of the message I posted. (Form issue?)
Link to comment

While my searches on doing that didn't give me a meaningful answer so far, I although found the location of the configuration files (or user template files actually).
So, have attached the current state of the container template for Netbox where I've put in the host's IP address instead as suggested and the log from the container where it is still looking for a « redis » hostname instead.
Oh, and sorry for forgetting to respond about the ports, I do use the standard ports. I can give the container template files for both of them too if you want to check them out.

my-netbox.xml netbox.log

Link to comment
3 hours ago, campfred said:

While my searches on doing that didn't give me a meaningful answer so far, I although found the location of the configuration files (or user template files actually).
So, have attached the current state of the container template for Netbox where I've put in the host's IP address instead as suggested and the log from the container where it is still looking for a « redis » hostname instead.
Oh, and sorry for forgetting to respond about the ports, I do use the standard ports. I can give the container template files for both of them too if you want to check them out.

my-netbox.xml 6.26 kB · 0 downloads netbox.log 13.46 kB · 0 downloads

How to get the docker run command is in the docker faq stickied in this subforum.

You change something in the template and change it back, then you hit apply, and in the popup you have the docker run command.

 

Post all 3 commands and also set the ports in the netbox template as I asked you to in my previous post. And set the IP to the correct one.

Link to comment
23 hours ago, saarg said:

How to get the docker run command is in the docker faq stickied in this subforum.

You change something in the template and change it back, then you hit apply, and in the popup you have the docker run command.

 

Post all 3 commands and also set the ports in the netbox template as I asked you to in my previous post. And set the IP to the correct one.

Sorry for missing out on that. I never checked on that window that appears. I always just ran it and went to other things while it was working on the server and come back on the web panel to check on things through the logs.

 

Also, sorry for missing the sticky posts. My screen reader just goes past them and I have no idea as to why it skips these items in the posts table, so I never have been aware they were there. My apologies.

 

Here are the command equivalent to the deployment of the containers so far!

 

docker run -d --name='Postgres11' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'POSTGRES_PASSWORD'='//REDACTED//' -e 'POSTGRES_USER'='postgres' -e 'POSTGRES_DB'='postgres' -p '5432:5432/tcp' -v '/mnt/user/Applications/Postgres11':'/var/lib/postgresql/data':'rw' 'postgres:11' f8adc057221fdd1ff0b1a101899abfd73a3b956894a4057219a7184a58597fc4

 

docker run -d --name='redis' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'ALLOW_EMPTY_PASSWORD'='no' -e 'REDIS_PASSWORD'='//REDACTED//' -e 'REDIS_AOF_ENABLED'='yes' -p '6379:6379/tcp' -v '/mnt/user/Applications/redis/data':'/bitnami/redis/data':'rw' 'bitnami/redis:latest' ba73d23de343538c1b5cd900c98e254af20bdb0dfef2d177175960b46dcb6c95

 

docker run -d --name='netbox' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'SUPERUSER_EMAIL'='admin' -e 'SUPERUSER_PASSWORD'='//REDACTED//' -e 'ALLOWED_HOST'='' -e 'DB_NAME'='' -e 'DB_USER'='postgres' -e 'DB_PASSWORD'='//REDACTED//' -e 'DB_HOST'='192.168.10.10' -e 'DB_PORT'='' -e 'REDIS_HOST'='192.168.10.10' -e 'REDIS_PORT'='' -e 'REDIS_PASSWORD'='//REDACTED//' -p '8000:8000/tcp' -v '/mnt/user/Applications/netbox':'/config':'rw' 'linuxserver/netbox' 7f755b848a9c09526dce30a1b5673e22971a9b963d7b7c10943f533d06a707fc

Link to comment
1 hour ago, campfred said:

Sorry for missing out on that. I never checked on that window that appears. I always just ran it and went to other things while it was working on the server and come back on the web panel to check on things through the logs.

 

Also, sorry for missing the sticky posts. My screen reader just goes past them and I have no idea as to why it skips these items in the posts table, so I never have been aware they were there. My apologies.

 

Here are the command equivalent to the deployment of the containers so far!

 

docker run -d --name='Postgres11' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'POSTGRES_PASSWORD'='//REDACTED//' -e 'POSTGRES_USER'='postgres' -e 'POSTGRES_DB'='postgres' -p '5432:5432/tcp' -v '/mnt/user/Applications/Postgres11':'/var/lib/postgresql/data':'rw' 'postgres:11' f8adc057221fdd1ff0b1a101899abfd73a3b956894a4057219a7184a58597fc4

 

docker run -d --name='redis' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'ALLOW_EMPTY_PASSWORD'='no' -e 'REDIS_PASSWORD'='//REDACTED//' -e 'REDIS_AOF_ENABLED'='yes' -p '6379:6379/tcp' -v '/mnt/user/Applications/redis/data':'/bitnami/redis/data':'rw' 'bitnami/redis:latest' ba73d23de343538c1b5cd900c98e254af20bdb0dfef2d177175960b46dcb6c95

 

docker run -d --name='netbox' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'SUPERUSER_EMAIL'='admin' -e 'SUPERUSER_PASSWORD'='//REDACTED//' -e 'ALLOWED_HOST'='' -e 'DB_NAME'='' -e 'DB_USER'='postgres' -e 'DB_PASSWORD'='//REDACTED//' -e 'DB_HOST'='192.168.10.10' -e 'DB_PORT'='' -e 'REDIS_HOST'='192.168.10.10' -e 'REDIS_PORT'='' -e 'REDIS_PASSWORD'='//REDACTED//' -p '8000:8000/tcp' -v '/mnt/user/Applications/netbox':'/config':'rw' 'linuxserver/netbox' 7f755b848a9c09526dce30a1b5673e22971a9b963d7b7c10943f533d06a707fc

Set the ports in the netbox template and also the DB name.

If that doesn't work, try deleting /mnt/user/Applications/netbox and change something in the template and change back and hit apply.

Link to comment
12 hours ago, saarg said:

Set the ports in the netbox template and also the DB name.

If that doesn't work, try deleting /mnt/user/Applications/netbox and change something in the template and change back and hit apply.

Alright. 'Done it but I still get the exceptions and it's still looking for the « redis » hostname...

 

Commands :

docker run -d --name='Postgres11Netbox' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'POSTGRES_PASSWORD'='(ThePassword)' -e 'POSTGRES_USER'='postgres' -e 'POSTGRES_DB'='Netbox' -p '5432:5432/tcp' -v '/mnt/user/Applications/Postgres11':'/var/lib/postgresql/data':'rw' 'postgres:11'

docker run -d --name='redis' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'ALLOW_EMPTY_PASSWORD'='no' -e 'REDIS_PASSWORD'='(ThePassword)' -e 'REDIS_AOF_ENABLED'='yes' -p '6379:6379/tcp' -v '/mnt/user/Applications/redis/data':'/bitnami/redis/data':'rw' 'bitnami/redis:latest'

docker run -d --name='netbox' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'SUPERUSER_EMAIL'='admin' -e 'SUPERUSER_PASSWORD'='(ThePassword)' -e 'ALLOWED_HOST'='' -e 'DB_NAME'='Netbox' -e 'DB_USER'='postgres' -e 'DB_PASSWORD'='(ThePassword)' -e 'DB_HOST'='192.168.10.10' -e 'DB_PORT'='5432' -e 'REDIS_HOST'='192.168.10.10' -e 'REDIS_PORT'='6379' -e 'REDIS_PASSWORD'='(ThePassword)' -p '8000:8000/tcp' -v '/mnt/user/Applications/netbox':'/config':'rw' 'linuxserver/netbox'

Of course, you'll find the container's log attached.

netbox.log

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.