notify_push icon indicating copy to clipboard operation
notify_push copied to clipboard

Self test reports "push server can't connect to the Nextcloud server" frequently

Open arnowelzel opened this issue 1 month ago • 5 comments

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Install and configure notify push
  2. Use php occ notify_push:self-test to test it

Expected behaviour

The test works with the following result:

✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
✓ push server can connect to the Nextcloud server
✓ push server is a trusted proxy
✓ push server is running the same version as the app

Actual behaviour

The test fails in many cases:

✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server

Also see the screenshot of my console - some tests work, many don't:

Image

If the test cannot connect reliable, I assume, the push service itself also does not work reliable as well.

Server configuration

Web server: Apache

Database: Maria

PHP version: 8.4

Nextcloud version: 32.0.1

List of activated apps
Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - app_api: 32.0.0
  - bookmarks: 16.0.1
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.0.3
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - collectives: 3.3.0
  - comments: 1.22.0
  - contacts: 8.0.6
  - contactsinteraction: 1.13.1
  - dav: 1.34.2
  - dav_push: 1.0.0
  - deck: 1.16.0
  - drawio: 3.1.2
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - flow_notifications: 3.0.0
  - impersonate: 3.0.0
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - memories: 7.7.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.3
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.1
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - previewgenerator: 5.10.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - richdocuments: 9.0.1
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.2
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.1
  - theming: 2.7.0
  - theming_customcss: 1.19.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_webauthn: 2.4.1
  - updatenotification: 1.22.0
  - viewer: 5.0.0-dev.0
  - webhook_listeners: 1.3.0
  - whiteboard: 1.4.1
  - workflowengine: 2.14.0
Disabled:
  - dashboard: 7.12.0 (installed 7.8.0)
  - dicomviewer: 2.3.1 (installed 2.3.1)
  - encryption: 2.20.0 (installed 2.13.0)
  - files_external: 1.24.0 (installed 1.19.0)
  - recommendations: 5.0.0-dev.0 (installed 0.4.0)
  - related_resources: 3.0.0-dev.0 (installed 1.1.0-alpha1)
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_ldap: 1.23.0
  - user_status: 1.12.0 (installed 1.5.0)
  - weather_status: 1.12.0 (installed 1.3.0)
Nextcloud configuration
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "32.0.1.2",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "maintenance": false,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbpersistent": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0
        },
        "knowledgebaseenabled": false,
        "theme": "",
        "simpleSignUpLink.shown": false,
        "loglevel": 2,
        "log_authfailip": true,
        "mysql.utf8mb4": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 180",
        "has_rebuilt_cache": true,
        "default_language": "de",
        "default_phone_region": "DE",
        "check_data_directory_permissions": false,
        "log_rotate_size": 52428800,
        "profile.enabled": false,
        "preview_max_x": 1920,
        "preview_max_y": 1920,
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": true,
        "mail_smtpport": "465",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "reference_opengraph": false,
        "integrity.check.disabled": false,
        "defaultapp": "files",
        "maintenance_window_start": 2,
        "apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "app_install_overwrite": [],
        "forbidden_filename_characters": [
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            ".filepart",
            ".part"
        ],
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.index.path.blacklist": "***REMOVED SENSITIVE VALUE***",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\Imaginary"
        ],
        "dbtableprefix": "oc_",
        "memories.gis_type": 1,
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "enable_previews": true,
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***"
    }
}

arnowelzel avatar Nov 08 '25 21:11 arnowelzel

I modifed the test a bit at the point, where the test fails. The cookies don't match very often and thus the test fails:

nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.663668939.', cookie from server: '.650971087.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.959116016.', cookie from server: '.663668939.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.254273197.', cookie from server: '.663668939.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.1024750562.', cookie from server: '.254273197.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.334830413.', cookie from server: '.254273197.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
🗴 push server can't connect to the Nextcloud server (cookie: '.156428706.', cookie from server: '.254273197.'
nextcloud@main:/var/www/nextcloud$ php occ notify_push:self-test
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
✓ push server can connect to the Nextcloud server
✓ push server is a trusted proxy
✓ push server is running the same version as the app

What baffles me is the fact, that it sometimes work, but only in rare cases.

arnowelzel avatar Nov 08 '25 21:11 arnowelzel

Same issue here after updating NC to 32.0.1. Debian 12, PHP8.3-FPM. OPcache enabled.

idressos avatar Nov 16 '25 12:11 idressos

👍 Same issue. NC 32.0.2 / ClientPush 1.21 / Php8.4 / Manjaro.

-vvv has no effect on display.

With log level bump to : 9:38:52.183150 +01:00] DEBUG [notify_push] /build/source/src/lib.rs:322: got remote 1.2.3.4 when trying to set remote 1.2.3.4 9:38:53.907223 +01:00] DEBUG [notify_push] /build/source/src/lib.rs:441: Received test cookie 955392068 9:38:53.929302 +01:00] DEBUG [notify_push] /build/source/src/lib.rs:273: current test cookie is 955392068 9:38:53.933601 +01:00] DEBUG [notify_push] /build/source/src/lib.rs:303: storage mapping count for 3 = 1 9:38:53.971360 +01:00] DEBUG [notify_push] /build/source/src/lib.rs:282: got remote test cookie 52213731

Cromagnon31 avatar Nov 27 '25 08:11 Cromagnon31

I am hitting the same Bug already while setup. Debug shows returning the remote test cookie from the request before. So looks like a bad shifting or so.

rkorn86 avatar Dec 05 '25 07:12 rkorn86

I have the same problem, sometimes it works, sometimes it doesn't. I'm a little surprised how few people have responded so far. Perhaps our installations have something in common that others don't? I have:

  • Webserver: Apache 2.4.65
  • Database: MariaDB 10.11.14
  • PHP: 8.3.28
  • Redis: 7.0.15
  • Nextcloud: 32.0.2

mritzmann avatar Dec 09 '25 12:12 mritzmann