Hello Folks!
I’m a newbee but very motivated to get thing correctly working.
I had a working NextCloudPi for a few weeks running.
I have a Backup of my SD Card with NextcloudPi 23.0.2 and PHP8.0
On a raspberry Pi not in docker.
I duplicated it and i upgraded via sudo `ncp-dist-upgrade’.
Nextcloud is coming up after reboot. And i can’t log in into the backend.
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.
NextCloudPi Panel says this:
Something went wrong. Try refreshing the page
In general i think it is a database permission issue.
I was able to log in several times and get some ‘Failed to connect to the database …’ errors.
Unfortunately i can’t roll back, because the original system (Buster) can’t acess the external Data Base (USB) anymore.
How can i correctly start to debug whats going on.
I have access to the System via ssh.
systemctl status mariadb.service
● mariadb.service - MariaDB 10.5.12 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─ncp-delay-automount.conf
Active: activating (start-pre) since Mon 2022-03-14 23:53:32 GMT; 4s ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 10248 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 10249 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 10251 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && syst>
Cntrl PID: 10347 (sleep)
Tasks: 1 (limit: 8987)
CPU: 260ms
CGroup: /system.slice/mariadb.service
└─10347 /bin/sleep 20
Mar 14 23:53:32 nextcloudpi systemd[1]: Starting MariaDB 10.5.12 database server...
lines 1-17/17 (END)
Previously i moved the Database to :
/media/myCloudDrive/Database/
But i didn’t see anything about it that its working in that directory
Here is the additional output of ncp-report
<–! Paste this in GitHub report →
NextCloudPi diagnostics
NextCloudPi version v1.46.9
NextCloudPi image NextCloudPi_10-08-21
OS Debian GNU/Linux 11. 5.10.103-v8+ (aarch64)
automount yes
USB devices sda sdb
datadir /media/myCloudDrive/Data/data
data in SD no
data filesystem ext2/ext3
data disk usage 155G/4.6T
rootfs usage 7.7G/59G
swapfile /var/swap
dbdir /media/myCloudDrive/Database
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service down
Redis service up
HPB service down
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP ***REMOVED SENSITIVE VALUE***
gateway ***REMOVED SENSITIVE VALUE***
interface eth0
certificates ***REMOVED SENSITIVE VALUE***
NAT loopback no
uptime 53min
Nextcloud configuration
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(109): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(300): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(972): OC\AppConfig->getValues()
#9 /var/www/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}()
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#13 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#19 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#21 /var/www/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}()
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#25 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#27 /var/www/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#29 /var/www/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}()
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
#33 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#35 /var/www/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1087): OC::init()
#38 /var/www/nextcloud/console.php(48): require_once('...')
#39 /var/www/nextcloud/occ(11): require_once('...')
#40 {main}
HTTPd logs
[Tue Mar 15 00:00:01.688235 2022] [ssl:warn] [pid 1219] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Mar 15 00:00:01.701171 2022] [ssl:error] [pid 1219] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=archlinux / issuer: CN=archlinux / serial: 18C088C8F787E3CFD6C7C76280DC1F392C6E3DC2 / notbefore: Oct 8 19:39:52 2021 GMT / notafter: Oct 6 19:39:52 2031 GMT]
[Tue Mar 15 00:00:01.701227 2022] [ssl:error] [pid 1219] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Mar 15 00:00:01.701329 2022] [http2:warn] [pid 1219] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Tue Mar 15 00:00:01.841867 2022] [mpm_prefork:notice] [pid 1219] AH00163: Apache/2.4.52 (Debian) OpenSSL/1.1.1k configured -- resuming normal operations
[Tue Mar 15 00:00:01.841965 2022] [core:notice] [pid 1219] AH00094: Command line: '/usr/sbin/apache2'
Database logs
2022-03-14 9:08:19 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-03-14 9:08:19 0 [Note] InnoDB: 10.3.31 started; log sequence number 9544089836; transaction id 9150026
2022-03-14 9:08:19 0 [Note] InnoDB: Loading buffer pool(s) from /media/myCloudDrive/Database/ib_buffer_pool
2022-03-14 9:08:19 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-03-14 9:08:20 0 [Note] Server socket created on IP: '127.0.0.1'.
2022-03-14 9:08:20 0 [Note] Reading of all Master_info entries succeeded
2022-03-14 9:08:20 0 [Note] Added new Master_info '' to hash table
2022-03-14 9:08:20 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.31-MariaDB-0+deb10u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 10
2022-03-14 9:08:33 0 [Note] InnoDB: Buffer pool(s) load completed at 220314 9:08:33
2022-03-14 12:15:59 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2022-03-14 12:15:59 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-03-14 12:15:59 0 [Note] InnoDB: FTS optimize thread exiting.
2022-03-14 12:15:59 0 [Note] InnoDB: Starting shutdown...
2022-03-14 12:15:59 0 [Note] InnoDB: Dumping buffer pool(s) to /media/myCloudDrive/Database/ib_buffer_pool
2022-03-14 12:15:59 0 [Note] InnoDB: Buffer pool(s) dump completed at 220314 12:15:59
2022-03-14 12:16:01 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-03-14 12:16:01 0 [Note] InnoDB: Shutdown completed; log sequence number 9551642138; transaction id 9156778
2022-03-14 12:16:01 0 [Note] /usr/sbin/mysqld: Shutdown complete
Thank you for your help!
Tea