Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.46
PHP version (eg, 7.4): 7.4
The issue you are facing: cannot start the notify_push systemd unit
Is this the first time you’ve seen this error? (Y/N):Y
Hello, I’m facing some problems trying to connect the notify_push app to the mariadb instance which is on another machine in another subnet.
The connection between the nextcloud server and the nextcloud db is encrypted and it’s working fine since a year and a half, here’s my config.php snippet:
'dbname' => 'nextcloud',
'dbhost' => 'tsrv01:3306',
'dbdriveroptions' =>
array (
1007 => '/etc/mysql/ssl/client-key.pem',
1008 => '/etc/mysql/ssl/client-cert.pem',
1009 => '/etc/mysql/ssl/ca_cert.pem',
1014 => 'false',
),
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'PASSWORD',
Here’s the output of the systemctl status notify_push command :
notify_push.service - Push daemon for Nextcloud clients
Loaded: loaded (/lib/systemd/system/notify_push.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-04-15 11:32:10 CEST; 9min ago
Process: 38548 ExecStart=/var/www/html/nextcloud/apps/notify_push/bin/x86_64/notify_push /var/www/html/nextcloud/config/config.php (code=exited, status=1/FAILURE)
Main PID: 38548 (code=exited, status=1/FAILURE)
apr 15 11:32:10 dsrv01 notify_push[38548]: 0: Failed to connect to Nextcloud database
apr 15 11:32:10 dsrv01 notify_push[38548]: 1: error communicating with the server: invalid certificate: BadDER
apr 15 11:32:10 dsrv01 notify_push[38548]: 2: invalid certificate: BadDER
apr 15 11:32:10 dsrv01 notify_push[38548]: Location:
apr 15 11:32:10 dsrv01 notify_push[38548]: /tmp/krankerl.PNFmShx8gZmS/notify_push/src/storage_mapping.rs:57
apr 15 11:32:10 dsrv01 notify_push[38548]: Backtrace omitted.
apr 15 11:32:10 dsrv01 notify_push[38548]: Run with RUST_BACKTRACE=1 environment variable to display it.
apr 15 11:32:10 dsrv01 notify_push[38548]: Run with RUST_BACKTRACE=full to include source snippets.
apr 15 11:32:10 dsrv01 systemd[1]: notify_push.service: Main process exited, code=exited, status=1/FAILURE
apr 15 11:32:10 dsrv01 systemd[1]: notify_push.service: Failed with result 'exit-code'.
I’ve tried to add some environment variables to my systemd unit file but still no luck:
[Unit]
Description = Push daemon for Nextcloud clients
[Service]
Environment = PORT=7867 DATABASE_URL=mysql://nextcloud:PASSWORD@tsrv01:3306 DATABASE_PREFIX=oc_
ExecStart = /var/www/html/nextcloud/apps/notify_push/bin/x86_64/notify_push /var/www/html/nextcloud/config/config.php
User=www-data
[Install]
WantedBy = multi-user.target
Thanks!
Enrico