Nextcloud version: 21.0.3
Operating system and version: Ubuntu 20.04.2 LTS Installed via snap
PHP version: 7.4.21
Attempting to get notify_push set up due to incredibly slow and non responsive Nextcloud client syncs: Nextcloud Client Not Syncing
When I run âsudo nextcloud.occ notify_push:setupâ, I am prompted to create the notify_push.service file at /etc/systemd/system/ and copy and paste the following content into that file:
[Unit] Description = Push daemon for Nextcloud clients
However when I try to start the notify_push.service, I am seeing the following errors:
0: Failed to connect to Nextcloud database 1: error communicating with the server: No such file or directory (os error 2) 2: No such file or directory (os error 2) Location: /tmp/krankerl.P1VaKOfPDklj/notify_push/src/storage_mapping.rs:57 notify_push[406185]: Backtrace omitted.
If I change my âdbhostâ section in config.php to just âlocalhostâ the notify_push service will start successfully, but access to my Nextcloud is broken:
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.
Obviously not a fix so Iâve reverted changes but figured it was worth mentioningâŚ
Your database socket is contained within a randomized subdirectory of /tmp, which the snap thinks is /tmp but actually isnât on the host (this is part of the confinement model-- the snap canât write all over your hostâs /tmp). Which means your config.php only has meaning within the context of the snap, not the host. If you try to find the database socket using that config, you wonât find it. Iâm not sure thereâs a good solution to this. I feel like this should be connecting to a REST API hosted by a Nextcloud app instead of trying to share the database.
Hey, that means itâs not randomized anymore eh? Okay that seems like a fine solution. Still seems weird to want to hit the db directly, but no matter.
@kyrofa Has something changed with the database/snap environment here within the last few days? It stopped working over last night, like it feels. I have no idea whatâs wrong here. The only idea I have is that the database path is not valid anymore due to updates of snapd or something like this.
The notify_push app has been updated over two months ago. Since then it definitively worked. If Iâm not wrong, it did even work yesterday and send instantly push notifications to my Desktop client multiple times over the day.
EDIT: Wait a sec, it failed since months as journalctltells me. But how can occ notify_push:self-test be fine a few days ago and the desktop client successfully arrive push notifications when the services failes to start? Whatâs wrong here? o.o