Errors after restart, not sure the root cause

Upon reboot, I noticed that the “system information” would not come up in ncp webadmin, an there were errors in the nextcloud logs, so generated an ncp report to look at them. There seems to be a problem relating to the database, but I can’t tell what the root problem is.

For context, I was trying to correct a problem in another thread (“message”:“CORS requires basic auth”) and had just tried to reset my ncp password via the web panel, but I got messages saying to refresh the page. I noticed that System information showed that HPB was down, and other threads suggested a restart may fix this.

Errors such as the ones below made me suspect a database error.

<–! Paste this in GitHub report →

NextcloudPi diagnostics

NextcloudPi version  v1.54.3
NextcloudPi image    
OS                   Armbian 24.5.5 bookworm \l . 6.6.31-current-bcm2711 (aarch64)
automount            yes
USB devices          sda sdb 
datadir              /media/wb-2tb/3ncdata/data
data in SD           no
data filesystem      ext2/ext3
data disk usage      639G/1.8T
rootfs usage         5.5G/465G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    28.0.9.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              open
Port 443             open
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            end0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         yes
Uptime               50min

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nc.hxfam.com",
            "11": "100.36.103.67",
            "1": "192.168.226.201",
            "14": "nextcloudpi",
            "2": "nc.hxfam.com"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.9.1",
        "overwrite.cli.url": "https:\/\/nc.hxfam.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/media\/wb-2tb\/3ncdata\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/media\/wb-2tb\/3ncdata\/data\/nextcloud.log",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "loglevel": "2",
        "log_type": "file",
        "maintenance_window_start": 1,
        "htaccess.RewriteBase": "\/",
        "default_phone_region": "US",
        "default_timezone": "America\/NewYork",
        "lost_password_link": "disabled",
        "data-fingerprint": "30f70887228a9242d70f38aa702b5a59"
    }
}

HTTPd logs

[Fri Sep 06 14:18:35.536763 2024] [authz_host:error] [pid 1825:tid 1830] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /img/ncp-logo.svg failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:35.537884 2024] [authz_host:error] [pid 1825:tid 1831] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /css/ncp.css failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:35.931374 2024] [authz_host:error] [pid 1825:tid 1833] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:35.931415 2024] [authz_host:error] [pid 1825:tid 1832] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.137753 2024] [authz_host:error] [pid 1825:tid 1833] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.151053 2024] [authz_host:error] [pid 1825:tid 1832] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.167522 2024] [authz_host:error] [pid 1825:tid 1835] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /img/favicon.png failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.348441 2024] [authz_host:error] [pid 1825:tid 1835] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /img/favicon.png failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.560658 2024] [authz_host:error] [pid 1825:tid 1837] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:18:36.745440 2024] [authz_host:error] [pid 1825:tid 1837] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:17.394680 2024] [authz_host:error] [pid 1825:tid 1845] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:17.698480 2024] [authz_host:error] [pid 1825:tid 1845] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:17.698846 2024] [authz_host:error] [pid 1825:tid 1845] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /index.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:17.894790 2024] [authz_host:error] [pid 1825:tid 1845] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /index.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:22.579236 2024] [authz_host:error] [pid 1825:tid 1855] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:22.585846 2024] [authz_host:error] [pid 1825:tid 1857] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:22.775474 2024] [authz_host:error] [pid 1825:tid 1855] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:22.790950 2024] [authz_host:error] [pid 1825:tid 1857] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:23.417059 2024] [authz_host:error] [pid 1825:tid 1860] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Fri Sep 06 14:19:23.606225 2024] [authz_host:error] [pid 1825:tid 1860] [remote fe80::bafb:d59d:d80:f2c1%end0:46276] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Clean up abandoned apps","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Add possibly missing system config","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Add AI tasks cleanup job","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Queue a job to generate metadata","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Cache logo dimension to fix size in emails on Outlook","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"OC\\Repair\\Events\\RepairInfoEvent: Repair info: Updated logo dimensions: 500x500","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:13+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:33+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"28.0.5.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:33+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"28.0.9.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:33+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"28.0.9.1","data":{"app":"updater"}}
{"reqId":"Cvxg5ONtkBRJViVgVqYx","level":1,"time":"2024-09-04T16:32:33+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"28.0.9.1","data":{"app":"updater"}}
{"reqId":"ZtsFNvprG08wdayqQDBfjwAAAEA","level":3,"time":"2024-09-06T13:35:51+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFN_prG08wdayqQDBfkAAAAEE","level":3,"time":"2024-09-06T13:35:51+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/Videos","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFNzoBH8hzQNPgHigtVQAAAAA","level":3,"time":"2024-09-06T13:35:51+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory at /var/www/nextcloud/lib/private/DB/Connection.php#150","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFN_prG08wdayqQDBfkQAAAEI","level":3,"time":"2024-09-06T13:35:51+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory at /var/www/nextcloud/lib/private/DB/Connection.php#150","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFODoBH8hzQNPgHigtVgAAAAE","level":3,"time":"2024-09-06T13:35:52+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/InstantUpload","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFODoBH8hzQNPgHigtVwAAAAM","level":3,"time":"2024-09-06T13:35:52+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/Music","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFODoBH8hzQNPgHigtWAAAAAQ","level":3,"time":"2024-09-06T13:35:52+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/Photos","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFODoBH8hzQNPgHigtWQAAAAY","level":3,"time":"2024-09-06T13:35:52+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/Documents","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}
{"reqId":"ZtsFODoBH8hzQNPgHigtWgAAAAI","level":3,"time":"2024-09-06T13:35:52+00:00","remoteAddr":"192.168.226.210","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/patrickhi/GISdat","message":"Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /var/www/nextcloud/remote.php#62","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.3stable-Win64 (build 20240823) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"28.0.9.1","data":{"app":"PHP"}}

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory at /var/www/nextcloud/lib/private/DB/Connection.php#150

So I tried sudo -u www-data php /var/www/nextcloud/occ maintenance:repair but it completed without finding anything.

There is no /var/log/mysql folder, but since armbian uses systemd, I tried systemctl status mysql and most messages are normal, but I found the following line:

Sep 06 13:36:38 nextcloudpi mariadbd[2032]: 2024-09-06 13:36:38 4 [Warning] Aborted connection 4 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)

How can I find the root cause of these errors and correct them?

try running

journalctl -u mariadb

Hey, thanks Oliver.

All I get is

# journalctl -u mariadb
-- No entries --
# journalctl -u mysql   ##just in case
-- No entries --

Is there any other command I should try? Maybe this type of error is a bug that occurs when you restart the server, but then goes away.

It seems, that the database is not running.
Do a “service mariadb start” and check the error message (are you sure, that mariadb is installed?).

It’s definitely installed and running.

I don’t think service is the right command since it’s systemd not system V init? (I am not sure how init systems work, just that they switched to systemd at some point).

# systemctl status mysql
â—Ź mariadb.service - MariaDB 10.11.6 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─ncp-delay-automount.conf
     Active: active (running) since Tue 2024-09-10 04:01:34 UTC; 3 days ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 2432 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 2433 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 2435 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, stat>
    Process: 2524 ExecStartPre=/bin/sleep 20 (code=exited, status=0/SUCCESS)
    Process: 2546 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 2548 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 2534 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 11 (limit: 1580)
     Memory: 283.5M
        CPU: 7min 37.579s
     CGroup: /system.slice/mariadb.service
             └─2534 /usr/sbin/mariadbd

Notice: journal has been rotated since unit was started, output may be incomplete.

P.S. if anyone knows how to enable word wrap with three-backtick code blocks, I’ve been trying to figure it out…