After NCP-Reinstall the dbpassword is regularly being changed back in config.php

I have ncp running on a R Pi 4 and a while ago the SD card got corrupted. Since I had DB and data on an external HHD, I installed the ncp image onto a new SD card and imported the configuration. However, I regularly (daily?) have the problem that I get this error message in the browser when I try to access NC:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

In the logs (journalctl) I can see [Warning] Access denied for user 'ncadmin'@'localhost' and when I check NC’s config.php the dbpassword is set back to the one that was created when I installed the new image. Could it be that NCP has some magic that adjusts the DB config of NC?

I just found that /usr/local/bin/ reads the DB password from /root/.my.cnf and there the old password was still there …

Did that help? I get that error all the time and it magically solves itself by restarting my docker container a random amount of time…
Can you explain what I have to do with the to get things right again?

For me, everytime I restart the docker container I get a new password set for the databases.

Doc you see any differences in the start-up log of your container for the cases when it does work and when not?

I assume that the is run from time to time (maybe some systemd timer?). The script reads the db password from /root/.my.cnf and replaces the dbpassword in config/config.php.

So, for me I only had to adjust the password that is configured in /home/roor/.my.cnf to the correct one and for now the password stays the right one.

1 Like