nextcloud / nextcloudpi

📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, curl installer...
https://nextcloudpi.com
2.49k stars 295 forks source link

Nextcloud unreachable after I ran certbot with custom domain #1808

Closed HyperCriSiS closed 1 year ago

HyperCriSiS commented 1 year ago

Hi,

after I ran certbot with a custom domain, Nextcloud is not reachable anymore. Not via https://nextcloudpi/ and also not via the configured domain too access it from outside. What it the additional domain good for, which can be configured in the Let's encrypt menu?

This is the certbot log:

Installing template 'nextcloud.conf.sh'...
INFO: Letsencrypt domain is mydomain.com
INFO: Metrics enabled: no
Apache self check:
Syntax OK
System config value trusted_domains => 11 set to string mydomain.com
warning: No domain found. Defaulting to 'nextcloudpi'
System config value trusted_domains => 3 set to string nextcloudpi
System config value overwrite.cli.url set to string https://nextcloudpi/
System config value trusted_proxies => 11 set to string 127.0.0.1
System config value trusted_proxies => 12 set to string ::1
System config value trusted_proxies => 13 set to string nextcloudpi
System config value trusted_proxies => 14 set to empty string

This is the error I get when I try to reach Nextcloud:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

NextcloudPi version v1.52.4 NextcloudPi image NextCloudPi_RaspberryPi_v1.52.2.img OS Debian GNU/Linux 11. 5.15.61-v8+ (aarch64) automount no USB devices sda datadir /opt/ncdata/data data in SD yes data filesystem ext2/ext3 data disk usage 2.5G/118G rootfs usage 2.5G/118G swapfile /var/swap dbdir /var/lib/mysql Nextcloud check ok Nextcloud version 26.0.3.2 HTTPD service up PHP service up MariaDB service up Redis service up HPB service up Postfix service up Internet check ok Public IPv4 REMOVED SENSITIVE VALUE Public IPv6 REMOVED SENSITIVE VALUE Port 80 open Port 443 open IP REMOVED SENSITIVE VALUE Gateway REMOVED SENSITIVE VALUE Interface eth0 Certificates REMOVED SENSITIVE VALUE NAT loopback no Uptime 39min

</details>

<details>
<summary>Nextcloud configuration</summary>

{ "system": { "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusteddomains": { "0": "localhost", "7": "nextcloudpi", "5": "nextcloudpi.local", "8": "nextcloudpi.lan", "3": "nextcloudpi", "11": "mydomain.com", "1": "192.168.0.101", "14": "nextcloudpi" }, "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "26.0.3.2", "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": "\/opt\/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": "\/opt\/ncdata\/data\/nextcloud.log", "trusted_proxies": "REMOVED SENSITIVE VALUE", "loglevel": "2", "log_type": "file" } }

</details>

<details>
<summary>HTTPd logs</summary>

[Fri Aug 04 22:51:35.320677 2023] [ssl:warn] [pid 645:tid 548620067904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name [Fri Aug 04 22:51:35.320913 2023] [ssl:error] [pid 645:tid 548620067904] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=fv-az83-474 / issuer: CN=fv-az83-474 / serial: 138C9125F0C613A164DD420FEB2DF95A6552B53F / notbefore: Jul 19 12:36:44 2023 GMT / notafter: Jul 16 12:36:44 2033 GMT] [Fri Aug 04 22:51:35.320929 2023] [ssl:error] [pid 645:tid 548620067904] AH02604: Unable to configure certificate localhost:4443:0 for stapling [Fri Aug 04 22:51:35.362377 2023] [ssl:warn] [pid 824:tid 548620067904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name [Fri Aug 04 22:51:35.362649 2023] [ssl:error] [pid 824:tid 548620067904] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=fv-az83-474 / issuer: CN=fv-az83-474 / serial: 138C9125F0C613A164DD420FEB2DF95A6552B53F / notbefore: Jul 19 12:36:44 2023 GMT / notafter: Jul 16 12:36:44 2033 GMT] [Fri Aug 04 22:51:35.362668 2023] [ssl:error] [pid 824:tid 548620067904] AH02604: Unable to configure certificate localhost:4443:0 for stapling [Fri Aug 04 22:51:35.368801 2023] [mpm_event:notice] [pid 824:tid 548620067904] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Aug 04 22:51:35.368948 2023] [core:notice] [pid 824:tid 548620067904] AH00094: Command line: '/usr/sbin/apache2' [Fri Aug 04 22:56:17.224500 2023] [http2:warn] [pid 829:tid 548391915904] [client 192.168.0.2:60293] h2_stream(829-2-51,CLEANUP): started=1, scheduled=1, ready=0, out_buffer=0 [Fri Aug 04 22:56:20.659910 2023] [http2:warn] [pid 830:tid 547776082304] [client 192.168.0.2:60296] h2_stream(830-1-15,CLEANUP): started=1, scheduled=1, ready=0, out_buffer=0 [Fri Aug 04 22:56:57.713460 2023] [http2:warn] [pid 829:tid 548103233920] [client 192.168.0.2:60298] h2_stream(829-4-17,CLEANUP): started=1, scheduled=1, ready=0, out_buffer=0 [Fri Aug 04 22:56:57.713554 2023] [http2:warn] [pid 829:tid 548103233920] [client 192.168.0.2:60298] h2_stream(829-4-15,CLEANUP): started=1, scheduled=1, ready=0, out_buffer=0 [Fri Aug 04 22:59:43.962466 2023] [mpm_event:notice] [pid 824:tid 548620067904] AH00493: SIGUSR1 received. Doing graceful restart [Fri Aug 04 22:59:43.987471 2023] [ssl:warn] [pid 824:tid 548620067904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name [Fri Aug 04 22:59:43.990233 2023] [mpm_event:notice] [pid 824:tid 548620067904] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Aug 04 22:59:43.990259 2023] [core:notice] [pid 824:tid 548620067904] AH00094: Command line: '/usr/sbin/apache2' [Fri Aug 04 23:16:38.824900 2023] [mpm_event:notice] [pid 824:tid 548620067904] AH00493: SIGUSR1 received. Doing graceful restart [Fri Aug 04 23:16:38.857210 2023] [ssl:warn] [pid 824:tid 548620067904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name [Fri Aug 04 23:16:38.860105 2023] [mpm_event:notice] [pid 824:tid 548620067904] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Aug 04 23:16:38.860131 2023] [core:notice] [pid 824:tid 548620067904] AH00094: Command line: '/usr/sbin/apache2'

</details>

<details>
<summary>Database logs</summary>

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

</details>

<details>
<summary>Nextcloud logs</summary>

{"reqId":"o2OBM9BwdCOlBiPJDi8O","level":3,"time":"2023-07-19T13:00:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/base.php","line":701,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1169,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/cron.php","line":43,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/base.php","Line":282,"CustomMessage":"--"}} {"reqId":"vUTzb1xLbDe4JUIGFMBb","level":3,"time":"2023-07-19T13:05:06+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"str_starts_with(): Argument #1 ($haystack) must be of type string, null given","userAgent":"--","version":"26.0.3.2","exception":{"Exception":"TypeError","Message":"str_starts_with(): Argument #1 ($haystack) must be of type string, null given","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/photos/lib/Jobs/AutomaticPlaceMapperJob.php","line":107,"function":"str_starts_with"},{"file":"/var/www/nextcloud/apps/photos/lib/Jobs/AutomaticPlaceMapperJob.php","line":91,"function":"scanFolder","class":"OCA\Photos\Jobs\AutomaticPlaceMapperJob","type":"->"},{"file":"/var/www/nextcloud/apps/photos/lib/Jobs/AutomaticPlaceMapperJob.php","line":82,"function":"scanFilesForUser","class":"OCA\Photos\Jobs\AutomaticPlaceMapperJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\Photos\Jobs\AutomaticPlaceMapperJob","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\BackgroundJob\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\BackgroundJob\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\BackgroundJob\TimedJob","type":"->"}],"File":"/var/www/nextcloud/apps/photos/lib/Jobs/AutomaticPlaceMapperJob.php","Line":107,"CustomMessage":"--"}} {"reqId":"ZNdUOF0maOvl5836dqkg","level":2,"time":"2023-07-19T13:08:59+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"26.0.3.2","data":[]} {"reqId":"ZNdUOF0maOvl5836dqkg","level":2,"time":"2023-07-19T13:08:59+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"26.0.3.2","data":[]} {"reqId":"jLQiuhvhaw2RLSKFENh8","level":2,"time":"2023-07-19T13:09:03+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"26.0.3.2","data":[]} {"reqId":"jLQiuhvhaw2RLSKFENh8","level":2,"time":"2023-07-19T13:09:03+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"26.0.3.2","data":[]}

Did I something wrong? My domain btw. was not not masked as sensitive value.

Thanks and regards Hyper

HyperCriSiS commented 1 year ago

Seems it needed some time to think :) Maybe some tasks in the background were still running??