Update notify_push to 0.6.8 today makes notify_push unstartable (database config -> empty)

Support intro

Error Message: Failed to parse database configuration: error with configuration: empty

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.5.x
Operating system and version (eg, Ubuntu 20.04): ubuntu-server 22.04.3
Apache or nginx version (eg, Apache 2.4.25): NGinx
PHP version (eg, 7.4): 8.2.14

The issue you are facing:


Jan 24 08:56:53 cloud systemd[1]: Started Push daemon for Nextcloud clients.
Jan 24 08:56:53 cloud notify_push[54967]: Error:   × Failed to parse database configuration: error with configuration: empty
Jan 24 08:56:53 cloud notify_push[54967]:   │ host
Jan 24 08:56:53 cloud notify_push[54967]:   ├─▶ error with configuration: empty host
Jan 24 08:56:53 cloud notify_push[54967]:   ╰─▶ empty host
Jan 24 08:56:53 cloud systemd[1]: notify_push.service: Main process exited, code=exited, status=1/FAILURE
Jan 24 08:56:53 cloud systemd[1]: notify_push.service: Failed with result 'exit-code'.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. i updated notify_push app to version 0.6.8 via occ update
  2. i restarted the services
  3. remarked that notify_push:self-test ended with Bad Gayteway 502 Error
  4. tried to verify by journalctl -eu notify_push that the service can’t parse the config concerning database
  5. i use PostgreSQL by unix socket

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
Configuration (config/config.php)

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "192.168.55.16",
        "MY_DOMAIN"
    ],
    "dns_pinning": true,
    "activity_expire_days": 14,
    "auth.bruteforce.protection.enabled": true,
    "blacklisted_files": [
        ".htaccess",
        "Thumbs.db",
        "thumbs.db"
    ],
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "overwritehost": "MY_DOMAIN",
    "overwriteconaddr": "^192\\.168\\.55\\.90$",
    "overwriteprotocol": "https",
    "forward_for_headers": [
        "X_FORWARDED_FOR",
        "HTTP_X_FORWARDED_FOR"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/MY_DOMAIN",
    "dbtype": "pgsql",
    "version": "27.1.5.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "htaccess.RewriteBase": "\/",
    "logtimezone": "Europe\/Berlin",
    "default_phone_region": "DE",
    "logfile": "\/media\/cloud\/data\/nextcloud.log",
    "log_rotate_size": 10485760,
    "cron_log": true,
    "installed": true,
    "filesystem_check_changes": 0,
    "quota_include_external_storage": false,
    "skeletondirectory": "",
    "share_folder": "\/Freigaben",
    "knowledgebaseenabled": false,
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
    "ldapUserCleanupInterval": 20,
    "bulkupload.enabled": false,
    "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
    },
    "mail_smtpmode": "sendmail",
    "mail_smtpsecure": "ssl",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtptimeout": 10,
    "mail_smtpauth": 0,
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "integrity.check.disabled": false,
    "updater.release.channel": "stable",
    "enable_previews": true,
    "preview_Movie_path": "\/usr\/bin\/ffmpeg",
    "preview_ffmpeg_path": "\/usr\/bin\/ffmpeg",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\Movie",
        "OC\\Preview\\PDF",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\HEIC",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\MSOffice2003",
        "OC\\Preview\\MSOfficeDoc",
        "OC\\Preview\\Image",
        "OC\\Preview\\Photoshop",
        "OC\\Preview\\SVG",
        "OC\\Preview\\Font",
        "OC\\Preview\\MKV",
        "OC\\Preview\\MP4",
        "OC\\Preview\\AVI",
        "OC\\Preview\\TIFF"
    ],
    "preview_max_x": 2048,
    "preview_max_y": 2048,
    "preview_max_memory": 4096,
    "preview_max_filesize_image": 256,
    "preview_max_scale_factor": 1,
    "trashbin_retention_obligation": "auto, 2",
    "loglevel": 3,
    "mail_sendmailmode": "smtp",
    "data-fingerprint": "FINGERPRINT",
    "onlyoffice": {
        "verify_peer_off": true,
        "jwt_header": "Authorization",
        "jwt_secret": "***REMOVED SENSITIVE VALUE***"
    },
    "encryption.legacy_format_support": false,
    "encryption.key_storage_migrated": false,
    "defaultapp": "dashboard",
    "theme": "",
    "allow_local_remote_servers": true,
    "files_external_allow_create_new_local": true,
    "simpleSignUpLink.shown": false,
    "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.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
    "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
    "memories.gis_type": 2,
    "session_keepalive": true,
    "memories.vod.disable": false,
    "memories.video_default_quality": "-2"
}

The output of /run/postgresql says

root@nextcloud:/# ls -la /run/postgresql/
insgesamt 8
drwxrwsr-x  2 postgres postgres  100 Jan 24 08:56 .
drwxr-xr-x 43 root     root     1360 Jan 24 09:08 ..
-rw-r--r--  1 postgres postgres    6 Jan 24 08:56 16-main.pid
srwxrwxrwx  1 postgres postgres    0 Jan 24 08:56 .s.PGSQL.5432
-rw-------  1 postgres postgres   70 Jan 24 08:56 .s.PGSQL.5432.lock

So PostgreSQL is up and running.
There is also no /tmp dir involved to deliver the unix socket path

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

root@nextcloudcloud:/# systemctl status notify_push
× notify_push.service - Push daemon for Nextcloud clients
Loaded: loaded (/etc/systemd/system/notify_push.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-01-24 09:08:50 CET; 10min ago
Process: 58389 ExecStart=/var/www/nextcloud/apps/notify_push/bin/x86_64/notify_push /var/www/nextcloud/config/config.php (code=exited, status=1/FAILURE)
Main PID: 58389 (code=exited, status=1/FAILURE)
CPU: 5ms

Jan 24 09:08:50 cloud systemd[1]: Started Push daemon for Nextcloud clients.
Jan 24 09:08:50 cloud notify_push[58389]: Error: × Failed to parse database configuration: error with configuration: empty
Jan 24 09:08:50 cloud notify_push[58389]: │ host
Jan 24 09:08:50 cloud notify_push[58389]: ├─▶ error with configuration: empty host
Jan 24 09:08:50 cloud notify_push[58389]: ╰─▶ empty host
Jan 24 09:08:50 cloud systemd[1]: notify_push.service: Main process exited, code=exited, status=1/FAILURE
Jan 24 09:08:50 cloud systemd[1]: notify_push.service: Failed with result ‘exit-code’.

I am a little bit lost how to get notify_push to talk to database again.

Nextcloud itself is up and running → logins are possible etc. but the HPB is unusable for the moment.

My services file in systemd is configured as follows (and worked for long time till the latest update)

[Unit]
Description = Push daemon for Nextcloud clients
After=nginx.service php8.2-fpm.service postgresql.service redis.service

[Service]
Environment = PORT=7867
Environment = NEXTCLOUD_URL=https://MY_DOMAIN[FQDN]
ExecStart = /var/www/nextcloud/apps/notify_push/bin/x86_64/notify_push /var/www/nextcloud/config/config.php
User=www-data

[Install]
WantedBy = multi-user.target

I found the following:

and switched my config from

'dbtype' => 'pgsql',
  'version' => '27.1.5.1',
  'dbname' => 'DB_NAME',
  'dbhost' => '/run/postgresql/',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'DB_USER',
  'dbpassword' => '',

to

'dbtype' => 'pgsql',
  'version' => '27.1.5.1',
  'dbname' => 'DB_NAME',
  'dbhost' => 'localhost:/var/run/postgresql/.s.PGSQL.5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'DB_USER',
  'dbpassword' => 'DB_PASSWORD',

after that i modified /etc/postgresql/pg_hba.conf

from
local all all peer
to
local all all md5

Then i restarted the server once again and my notify_push re-connected to the nextcloud database.

Does anyone know why the notify_push version 0.6.8 does make this change nescessary??
Thanks for enlighten me :bulb:

If I had to take a wild guess, it might be related to a workaround that had to be done to address a problem with a dependency[1]. Maybe there were side effects.

Might be worth opening an issue in that repo with your experience.