-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade from 4.1.7 to 4.2.1 fails with current database's encoding is not supported with this provider #18416
Comments
You should never, never, NEVER use https://wiki.postgresql.org/wiki/Don%27t_Do_This Unfortunately the NetBox installation guide does not explicitly mention it (because PostgreSQL's default encoding is fine), but don't. |
Some distros (ahem Debian) have SQL_ASCII as the default encoding. Providing documentation clarity is not a bad thing. |
I installed Postgres from the Postgres repo on CentOS Stream 9 |
For those who are in the same situation, this is how I fixed it (and so far, no issues popped-up afterwards) 1/ Before starting this: shutdown netbox services
2/ Dump the netbox db
3/ kill all remaining connections to the netbox database
4/ change the template1 database to your preferred encoding/collation/type:
5/ Drop the netbox db
6/ Create the new netbox db
7/ Verify the new database is created with the correct encoding/collation
8/ import the netbox data (same steps as restoring netbox)
9/ Restart netbox
10/ Logon to netbox and validate the data is there (you may have to wait a minute or two after restarting) |
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.7
Python Version
3.12
Steps to Reproduce
Expected Behavior
Upgrade process completed
Observed Behavior
Upgrade process fails with the error below:
checking some basic things:
(I never had issues with this database before)
in configuration.py
Investigating further, it seems that the lack of mentioning the requirement of UTF8 for the database in the installation docs is still missing, although it was reported in the past (and set to resolved?) #5760
But I could not find it in the documentation: https://netboxlabs.com/docs/netbox/en/stable/installation/1-postgresql/
The text was updated successfully, but these errors were encountered: