[English is not my native language so i used a translator, sorry for all mistakes]
I have a server with TrueNAS Scale, on which I installed Nextcloud as an application(Docker) from TrueCharts. Nextcloud was configured and everything worked, except for two errors in the protocol, which were:
Exception HMAC does not match. Could not decrypt or decode encrypted session data
and
Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name “nextcloud-postgres” to address: Temporary failure in name resolution Exception thrown: Doctrine\DBAL\Exception
Despite these errors, it was possible to use Nextcloud normally, only sometimes there were problems with logging in, which could be solved by refreshing the browser. However, I wanted to solve these problems, so inside the Nextcloud container I logged in as the www-data user and executed the command occ maintenance:repair
. Since the execution of this command and the restart of the Nextcloud container, it does not want to start anymore, the following error appears in the container log:
172.16.0.1 - - [09/Apr/2024:12:26:17 +0000] “GET /status.php HTTP/1.1” 500 410 “-” “kube-probe/1.26”
and in the nextcloud.log file I have such an error: {“reqId”:“4ZXCjLB6GMgJAJVS9QBW”,“level”:3,“time”:“2024-04-08T15:47:54+00:00”,“remoteAddr”:“172.16.0.1”,“user”:“–”,“app”:“remote”,“method”:“GET”,“url”:“/status.php”,“message”:“Exception thrown: OCP\HintException”,“userAgent”:“kube-probe/1.26”,“version”:“”,“exception”:{“Exception”:“OCP\HintException”,“Message”:“Configuration was not read or initialized correctly, not overwriting /var/www/html/config/config.php”,“Code”:0,“Trace”:[{“file”:“/var/www/html/lib/private/Config.php”,“line”:143,“function”:“writeData”,“class”:“OC\Config”,“type”:“->”,“args”:[]},{“file”:“/var/www/html/lib/private/SystemConfig.php”,“line”:149,“function”:“setValue”,“class”:“OC\Config”,“type”:“->”,“args”:[“instanceid”,“ocp7utl3sd23”]},{“file”:“/var/www/html/lib/private/legacy/OC_Util.php”,“line”:850,“function”:“setValue”,“class”:“OC\SystemConfig”,“type”:“->”,“args”:[“instanceid”,“ocp7utl3sd23”]},{“file”:“/var/www/html/lib/base.php”,“line”:442,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:“::”,“args”:[]},{“file”:“/var/www/html/lib/base.php”,“line”:705,“function”:“initSession”,“class”:“OC”,“type”:“::”,“args”:[]},{“file”:“/var/www/html/lib/base.php”,“line”:1200,“function”:“init”,“class”:“OC”,“type”:“::”,“args”:[]},{“file”:“/var/www/html/status.php”,“line”:37,“args”:[“/var/www/html/lib/base.php”],“function”:“require_once”}],“File”:“/var/www/html/lib/private/Config.php”,“Line”:266,“Hint”:“Configuration was not read or initialized correctly, not overwriting /var/www/html/config/config.php”,“CustomMessage”:“Exception thrown: OCP\HintException”}}
Now I need to somehow find the specific cause of this problem and solve it, unfortunately, a clean reinstallation of Nextcloud is not an option. My theory of the origin of this problem is that the command occ maintenance:repair did not interpret changes in the context of using the container and perhaps the connection to the directory hosting Nextcloud outside the container was lost (or something simillar), as this was configured during the installation of this application in TrueNAS, in order to facilitate access to the Nextcloud configuration file and logs, as constantly entering the inside of the container is less convenient. Thanks for help.