Server Not Found when auto-uploading from Android App

After a debacle of a data directory move, in a desperate attempt to fix the mess I made, I did a backup using ncp-backup and then restored to a new vm. That worked! Mostly… I am now having the issue that when I try to auto-upload from my android phone, I get an error that “Server not found,” and “Folder error.”

Manual uploads from the app, and automatic uploads from an iphone work fine. My attempts to “google” this issue have born no fruit.

Can some kind person please help me troubleshoot or resolve this issue?

It looks like my nextcloud.log is getting absolutely hammered. Here is the first hundred lines:

https://pastebin.com/9qCUFGV9

The output of my ncp logs can be found here:

NextCloudPi diagnostics

/usr/local/bin/ncp-diag: line 38: swapon: command not found
NextCloudPi version  v1.46.10
NextCloudPi image    NextCloudPi_03-01-22
OS                   Debian GNU/Linux 11. 5.10.0-13-amd64 (x86_64)
automount            no
USB devices          sdd 
datadir              /media/wdred/ncdata/data
data in SD           no
data filesystem      btrfs
data disk usage      330G/1.0T
rootfs usage         4.7G/20G
swapfile             none
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    20.0.11.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               6:56

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "5": "nextcloudpi.local",
            "7": "nextcloudpi",
            "8": "nextcloudpi.lan",
            "11": "75.68.160.139",
            "1": "192.168.1.252",
            "14": "nextcloudpi",
            "3": "nextcloudpi"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.11.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/media\/wdred\/ncdata\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/media\/wdred\/ncdata\/data\/nextcloud.log",
        "loglevel": "2",
        "log_type": "file",
        "cache_path": "\/media\/wdred\/ncdata\/cache",
        "theme": "",
        "data-fingerprint": "ddadf625296cc3c702e25800e5b22c2c"
    }
}

HTTPd logs

[Tue Apr 05 10:25:43.874149 2022] [ssl:error] [pid 463:tid 140662384799040] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Apr 05 10:25:43.992195 2022] [ssl:warn] [pid 513:tid 140662384799040] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 10:25:43.992315 2022] [ssl:error] [pid 513:tid 140662384799040] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=ncp-vm / issuer: CN=ncp-vm / serial: 471911E306419F7C745EDCA101D4DFB11A5A9A83 / notbefore: Mar  1 21:30:57 2022 GMT / notafter: Feb 27 21:30:57 2032 GMT]
[Tue Apr 05 10:25:43.992328 2022] [ssl:error] [pid 513:tid 140662384799040] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Apr 05 10:25:43.996860 2022] [mpm_event:notice] [pid 513:tid 140662384799040] AH00489: Apache/2.4.53 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Tue Apr 05 10:25:43.996910 2022] [core:notice] [pid 513:tid 140662384799040] AH00094: Command line: '/usr/sbin/apache2'
[Tue Apr 05 10:41:44.096438 2022] [proxy_fcgi:error] [pid 520:tid 140662242178816] [client 192.168.1.113:48954] AH01067: Failed to read FastCGI header
[Tue Apr 05 10:41:44.096532 2022] [proxy_fcgi:error] [pid 520:tid 140662242178816] (104)Connection reset by peer: [client 192.168.1.113:48954] AH01075: Error dispatching request to :4443: 
[Tue Apr 05 10:41:44.329146 2022] [mpm_event:notice] [pid 513:tid 140662384799040] AH00492: caught SIGWINCH, shutting down gracefully
[Tue Apr 05 10:50:26.470901 2022] [ssl:warn] [pid 447:tid 140204033039680] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 10:50:26.484906 2022] [ssl:error] [pid 447:tid 140204033039680] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=ncp-vm / issuer: CN=ncp-vm / serial: 471911E306419F7C745EDCA101D4DFB11A5A9A83 / notbefore: Mar  1 21:30:57 2022 GMT / notafter: Feb 27 21:30:57 2032 GMT]
[Tue Apr 05 10:50:26.484932 2022] [ssl:error] [pid 447:tid 140204033039680] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Apr 05 10:50:26.544120 2022] [ssl:warn] [pid 465:tid 140204033039680] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 10:50:26.544329 2022] [ssl:error] [pid 465:tid 140204033039680] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=ncp-vm / issuer: CN=ncp-vm / serial: 471911E306419F7C745EDCA101D4DFB11A5A9A83 / notbefore: Mar  1 21:30:57 2022 GMT / notafter: Feb 27 21:30:57 2032 GMT]
[Tue Apr 05 10:50:26.544344 2022] [ssl:error] [pid 465:tid 140204033039680] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Apr 05 10:50:26.570595 2022] [mpm_event:notice] [pid 465:tid 140204033039680] AH00489: Apache/2.4.53 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Tue Apr 05 10:50:26.570665 2022] [core:notice] [pid 465:tid 140204033039680] AH00094: Command line: '/usr/sbin/apache2'
[Tue Apr 05 10:50:26.921159 2022] [proxy:error] [pid 466:tid 140203823277824] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.4-fpm.sock (*) failed
[Tue Apr 05 10:50:26.921234 2022] [proxy_fcgi:error] [pid 466:tid 140203823277824] [client 192.168.1.113:48958] AH01079: failed to make connection to backend: httpd-UDS
[Tue Apr 05 16:36:39.420274 2022] [proxy_fcgi:error] [pid 466:tid 140203553380096] [client 192.168.1.247:59374] AH01071: Got error 'Primary script unknown', referer: http://jnc.duckdns.org/wp-login.php

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Full logs:
https://pastebin.com/grM04ni0

P.S. I have posted about this in another thread of my creation, but the content has deviated quite a bit from my original issue on account of the new vm instance, so I am hoping that this new thread will catch the attention of someone with experience with this issue.

I should have noted that my server is behind an nginx proxy manager reverse proxy. Last night I tried many combinations of adjusting my nginx proxy manager config (e.g. http vs https, ports 80, 444, or 443, hsts on, etc.) to no avail. I also adjusted my trusted_proxies in config.php, and updated nextcloud to nextcloud 23.0.2.1. I also changed overwrite.cli.url to use my duckdns address, both with http and then with https, all to no avail. At various points I went from not being able to use auto-upload, to not being able to upload anything from the app at all.

From following one of the many intertangeld threads I found that pertain in some way to this issue (as far as I understand it), I ended up here:

root@nextcloudpi:/# ncc config:system:set trusted_proxies 15 --value=192.168.1.247
System config value trusted_proxies => 15 set to string 192.168.1.247
root@nextcloudpi:/# ncc notify_push:setup https://<myaddress>.duckdns.org/push
✓ 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 not a trusted proxy, please add '192.168.1.247' to the list of trusted proxies or  configure any existing reverse proxy to forward the 'x-forwarded-for' send by the push server.
  See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies for how to set trusted proxies.
  The following trusted proxies are currently configured: "192.168.1.247", "127.0.0.1", "::1", "<myaddress>.duckdns.org", "75.68.160.139", "192.168.1.247"
    of which the following seem to be invalid: "<myaddress>.duckdns.org"
  The following x-forwarded-for header was received by Nextcloud: 192.168.1.1
    from the following remote: 192.168.1.247

  If you're having issues getting the trusted proxy setup working, you can try bypassing any existing reverse proxy
  in your setup by setting the `NEXTCLOUD_URL` environment variable to point directly to the internal Nextcloud webserver url
  (You will still need the ip address of the push server added as trusted proxy)
root@nextcloudpi:/#