User has no config #8718
Replies: 18 comments 10 replies
-
Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports. |
Beta Was this translation helpful? Give feedback.
-
Excuse me, but what other steps need to be specified? This is exactly what happens to me: I try to log in and I get a window with this error. |
Beta Was this translation helpful? Give feedback.
-
Per the bug report template:
You have not provided any such detail. Obviously merely logging into NetBox does not reproduce the problem, as you can verify for yourself here. If you'd like someone to look into this, you'll need to spend some time determining how to reproduce it. |
Beta Was this translation helpful? Give feedback.
-
During today I've narrowed down the possible issues: a fresh installation of netbox (by the way, this is centos8.5, and nginx1.20, and with ldap) does indeed work fine. My netbox installation is an upgraded installation from version 3.1. As soon as i dump its database to a fresh installation i immediately get the same error. I have a suspicion that the update script did not make some necessary migrations (while the data itself is present in the database, I checked) |
Beta Was this translation helpful? Give feedback.
-
During today I've narrowed down the possible issues: a fresh installation of netbox (by the way, this is centos8.5, and nginx1.20, and with ldap) does indeed work fine. My netbox installation is an upgraded installation from version 3.1. As soon as i dump its database to a fresh installation i immediately get the same error. I have a suspicion that the update script did not make some necessary migrations (while the data itself is present in the database, I checked) |
Beta Was this translation helpful? Give feedback.
-
When i try to login in DEBUG mode in test server, i get on console: How I can further understand, what gives me such an error? |
Beta Was this translation helpful? Give feedback.
-
I found! when i manually do: this error disappears. hence the questions: |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. Any news? |
Beta Was this translation helpful? Give feedback.
-
same issue here... |
Beta Was this translation helpful? Give feedback.
-
I've just hit the same issue. In my case, I'm trying to build a NetBox installation running on Kubernetes on a cluster of Raspberry Pi's in my home lab. So, under the hood I am running the following containers:
It took some effort to get this environment up and running, partly because I think the instructions for the Kubernetes install are still based on NetBox 2.11 but, having got all the containers running, I'm now hitting the same issue/bug when I try and log in with my super user account admin/admin. What isn't yet clear to me, and I'll try and work it out, is whether this is something to do with NetBox or something to do with the process that creates the super user in netbox-docker which I believe is somewhat different to the documented netbox install process. If there is a bug to fix, I guess I (we) need first to work out whose issues that bug should sit under! |
Beta Was this translation helpful? Give feedback.
-
Just to reiterate from the thread above, I've opened #9741 to add an additional check for a missing UserConfig during login. Although we haven't been able to pinpoint the exact issue within Docker, this addition should avoid the issue entirely. Thanks @cpmills1975 for all your work in tracking this down! |
Beta Was this translation helpful? Give feedback.
-
I'm my case, I was trying to specify a user and password other than admin/admin in the docker compose yaml. |
Beta Was this translation helpful? Give feedback.
-
Thanks @jeremystretch for looking in to this so quickly. I suspect my issue was an edge case, but your belt and braces approach may help others - it was hitting this error that lead me to this discussion. So to dig further in to the root cause of this, I deleted the NetBox deployment (leaving the database untouched), changed the superuser account name, in my case in the Kubernetes configmap, but I guess the Docker compose file would be equivalent, then recreated the deployment and I can confirm that my second admin account was properly created along with a UserConfig. |
Beta Was this translation helpful? Give feedback.
-
This bug just started happening to me after upgrading our NetBox instance from v3.5.2 to v3.6.4. The problem appears to be, when I create a new user, it doesn't add a new row to the users_userconfig table for that id. I tried creating and deleting several users before I finally figured this out. Manually adding an "empty" config row to users_userconfig with the new id appears to work around the problem. |
Beta Was this translation helpful? Give feedback.
-
@jeremystretch - should I open a new issue or did you want to revive the existing issue: #9741 ? |
Beta Was this translation helpful? Give feedback.
-
Hello, But that is definitely a bug. |
Beta Was this translation helpful? Give feedback.
-
I guess we'll need to create a new issue... |
Beta Was this translation helpful? Give feedback.
-
How do I fix this on a brand new install after trying to login ? |
Beta Was this translation helpful? Give feedback.
-
NetBox version
v.3.1.8
Python version
3.9
Steps to Reproduce
Expected Behavior
Correct login
Observed Behavior
<class 'django.contrib.auth.models.User.config.RelatedObjectDoesNotExist'>
User has no config.
Python version: 3.9.7
NetBox version: 3.1.8
Beta Was this translation helpful? Give feedback.
All reactions