nextcloud / notify_push

Update notifications for nextcloud clients
GNU Affero General Public License v3.0
228 stars 42 forks source link

notify_push could not be started via systemd at boot time #358

Open particeps1 opened 11 months ago

particeps1 commented 11 months ago

Hello,

Sadly, I did not succeed in starting notify_push automatically at boot time

systemd log:

Nov 12 19:57:49 obfuscated systemd[1]: Started notify_push.service - Push daemon for Nextcloud clients.
Nov 12 19:57:49 obfuscated systemd[1]: Stopping notify_push.service - Push daemon for Nextcloud clients...
Nov 12 19:57:49 obfuscated systemd[1]: notify_push.service: Deactivated successfully.
                                      *** the previous 3 protocol lines are repeated 5 times ***
Nov 12 19:57:49 obfuscated systemd[1]: notify_push.service: Start request repeated too quickly.
Nov 12 19:57:49 obfuscated systemd[1]: notify_push.service: Failed with result 'start-limit-hit'.
Nov 12 19:57:49 obfuscated systemd[1]: Failed to start notify_push.service - Push daemon for Nextcloud clients.

Setting debug for logging does not provide any further information either. The content of my notify_push.service:

[Unit]
Description = Push daemon for Nextcloud clients
Documentation = https://github.com/nextcloud/notify_push
Wants = network-online.target apache2.service redis-server.service
After=network-online.target redis-server.service mariadb.service apache2.service php8.2-fpm.service

[Service]
Environment = PORT=7867
ExecStart = /mypath/apps/notify_push/bin/x86_64/notify_push /mypath/config/config.php
User=www-data

[Install]
WantedBy = multi-user.target

ubuntu 23.10

joshtrichards commented 11 months ago

Environment = PORT=7867.

Does that period at the end of your port actually exist in your startup script?

particeps1 commented 11 months ago

No, that was a space, which my editor displays as a dimmed dot. So unfortunately a copy/paste error. I've corrected my post. Thanks for the feedback.

nursoda commented 11 months ago

Please check the execution rights on your push service binary /mypath/apps/notify_push/bin/x86_64/notify_push – that must be executable by www-data as stated in your .service file for Apache above (user http in my NGINX case).

In my case, I am sure that I once made it executable, and after some past update, the eXecute bit was missing. chmod ug+x …/apps/notify_push/bin/x86_64/notify_push and systemctl restart …/notify_push.service were sufficient to solve the issue in my case.

@particeps1 If that solves it for you, too – then the question is whether the app can set an eXecute bit when installing that binary. If it can, then this is the issue to be solved @joshtrichards .

particeps1 commented 11 months ago

Thanks for the tip. That also worked for me. No more errors when booting, I will check the file permissions with the next update. This issue has been resolved for me.

smorkgl commented 11 months ago

hello i have the same problem with certificate