I think i have a similar problem too.
First my config
NC Server on cloudserver
ubuntu 20.04.2
PHP 8.0.3
PostgreSQL 13.2
Nginx 1.19.x
Reverse Proxy on RevProxy
RaspberryPi4 with ubuntu server 20.04.2
nginx 1.18.x
In RevProxy i entered the following lines to my /etc/nginx/conf.d/cloud.conf
location /push/ {
proxy_pass http://$upstream:7867/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
set $upstream LOCAL-IP-OF-MY-NC-SERVER
In my /etc/nginx/conf.d/nextcloud.conf on my NC-Server i entered the following lines
location /push/ {
proxy_pass https://127.0.0.1:7867/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
I followed this instructure
But when enabling the service i got this error
(systemctl restart notify_push, 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 Sat 2021-04-10 11:56:39 CEST; 11min ago
Process: 39178 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: 39178 (code=exited, status=1/FAILURE)
Apr 10 11:56:39 cloud notify_push[39178]: 0: Failed to connect to Nextcloud database
Apr 10 11:56:39 cloud notify_push[39178]: 1: error occurred while attempting to establish a TLS connection: InvalidDNSNameError
Apr 10 11:56:39 cloud notify_push[39178]: 2: InvalidDNSNameError
Apr 10 11:56:39 cloud notify_push[39178]: Location:
Apr 10 11:56:39 cloud notify_push[39178]: /tmp/krankerl.CxmLAzrEoja5/notify_push/src/storage_mapping.rs:57
Apr 10 11:56:39 cloud notify_push[39178]: Backtrace omitted.
Apr 10 11:56:39 cloud notify_push[39178]: Run with RUST_BACKTRACE=1 environment variable to display it.
Apr 10 11:56:39 cloud notify_push[39178]: Run with RUST_BACKTRACE=full to include source snippets.
Apr 10 11:56:39 cloud systemd[1]: notify_push.service: Main process exited, code=exited, status=1/FAILURE
Apr 10 11:56:39 cloud systemd[1]: notify_push.service: Failed with result ‘exit-code’.
Does anybody knows what the error message
1: error occurred while attempting to establish a TLS connection: InvalidDNSNameError
and
2: InvalidDNSNameError
mean?
My /etc/systemd/system/notify_push.service looks like
[Unit]
Description = Push daemon for Nextcloud clients
[Service]
Environment = PORT=7867 # Change if you already have something running on this port
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
So in fact that i got errors with starting the service i got errors by activating the url
command sudo -u www-data php /var/www/nextcloud/occ notify_push:self-test
responsed with
🗴 no push server configured
What to do?
Update: I have to append that i have a working https://NC-Server config running secured by Let’s Encrypt Certificates (rsa and ecc)
And Port 7876 is not in use by another service as far i have checked.