-
|
I have a self-hosted zerotier server using the ztnet frontend. I recently upgraded the server from Debian 12 to Debian 13 about a month ago. Since doing the upgrade I have not needed to login with ztnet until today. Initially, I was able to get to the login screen, but was not able to log in and received an error that the prisma database server was unreachable. I was able to track down an issue with the postgresql configuration file related to timezone format and correct those. With the configuration file corrected and postgresql restarted, I was then able login to ztnet, however my browser immediately started reporting an internal server error. I began looking at logs and found postgresql is reporting a collation mismatch. Excerpt from the postgresql log:
From what I have been able to find this appears to be a common occurrence when upgrading from Debian 12 to Debian 13 due to package and library versions. As described in the log and with a little searching it appears the fix is to run:
However, I am not able to login to the database using psql. Using the username "postgres" per the environment options page (https://ztnet.network/installation/options) and the default password, as well as the POSTGRES_PASSWORD in my /opt/ztnet/.env file results in the error: Not really sure where to go from here. Am I correct in that I need to login to the postgresql server via psql? Should I be attacking this another way? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Following up for anyone that may run into this issue. The process I was following was correct, the problem was related to unfamiliarity with postgresql. I was able to determine the peer authentication error was caused by the operating system and database user names not matching, not incorrect credentials as I believed. To log in I need to specify the user to run the psql as by using "sudo -u postgres psql". This allowed me to log in and perform the REINDEX and version refresh on the postgres database. I then needed to specify "-d ztnet" with the previous command to access the ztnet database and do the same. After fixing the databases, I was still unable to access the ztnet GUI via browser with a connection refused error. I ended up removing then reinstalling ztnet which corrected the problem and I was able to log in via existing credentials. |
Beta Was this translation helpful? Give feedback.
Following up for anyone that may run into this issue.
The process I was following was correct, the problem was related to unfamiliarity with postgresql. I was able to determine the peer authentication error was caused by the operating system and database user names not matching, not incorrect credentials as I believed. To log in I need to specify the user to run the psql as by using "sudo -u postgres psql". This allowed me to log in and perform the REINDEX and version refresh on the postgres database. I then needed to specify "-d ztnet" with the previous command to access the ztnet database and do the same.
After fixing the databases, I was still unable to access the ztnet GUI via browser…