nextcloud / nextcloudpi

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

Errors in curl installer on RPi / Debian Bullseye #1746

Open luxzg opened 1 year ago

luxzg commented 1 year ago

System information

<--! Paste this in GitHub report -->

NextcloudPi diagnostics ``` NextcloudPi version v1.51.0 NextcloudPi image NextcloudPi_03-17-23 OS Debian GNU/Linux 11. 5.15.84-v8+ (aarch64) automount no USB devices none datadir /opt/ncdata/data data in SD yes data filesystem ext2/ext3 data disk usage 2.8G/3.4G rootfs usage 2.8G/3.4G swapfile /var/swap dbdir /var/lib/mysql Nextcloud check ok Nextcloud version 25.0.3.2 HTTPD service up PHP service up MariaDB service up Redis service up HPB service down Postfix service up Internet check ok Public IPv4 ***REMOVED SENSITIVE VALUE*** Public IPv6 ***REMOVED SENSITIVE VALUE*** Port 80 closed Port 443 closed IP ***REMOVED SENSITIVE VALUE*** Gateway ***REMOVED SENSITIVE VALUE*** Interface eth0 Certificates ***REMOVED SENSITIVE VALUE*** NAT loopback no Uptime 50min ```
Nextcloud configuration ``` { "system": { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": { "0": "localhost", "7": "nextcloudpi", "5": "nextcloudpi.local", "8": "nextcloudpi.lan", "3": "nextcloudpi", "11": "178.17.116.16", "1": "192.168.0.13", "14": "nextcloudpi" }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "25.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" } } ```
HTTPd logs ``` [Fri Mar 17 18:55:23.248240 2023] [core:notice] [pid 22586:tid 548662920256] AH00094: Command line: '/usr/sbin/apache2' [Fri Mar 17 19:32:13.034882 2023] [mpm_event:notice] [pid 22586:tid 548662920256] AH00492: caught SIGWINCH, shutting down gracefully [Fri Mar 17 19:32:13.625563 2023] [ssl:warn] [pid 41218:tid 547796046912] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Fri Mar 17 19:32:13.626204 2023] [ssl:error] [pid 41218:tid 547796046912] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=nextcloudpi / issuer: CN=nextcloudpi / serial: 68763A4C0CFC5F0ECBF989B0B42ABF959386F6F1 / notbefore: Mar 17 17:46:57 2023 GMT / notafter: Mar 14 17:46:57 2033 GMT] [Fri Mar 17 19:32:13.626248 2023] [ssl:error] [pid 41218:tid 547796046912] AH02604: Unable to configure certificate localhost:443:0 for stapling [Fri Mar 17 19:32:13.671381 2023] [ssl:warn] [pid 41219:tid 547796046912] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Fri Mar 17 19:32:13.673578 2023] [ssl:error] [pid 41219:tid 547796046912] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=nextcloudpi / issuer: CN=nextcloudpi / serial: 68763A4C0CFC5F0ECBF989B0B42ABF959386F6F1 / notbefore: Mar 17 17:46:57 2023 GMT / notafter: Mar 14 17:46:57 2033 GMT] [Fri Mar 17 19:32:13.673714 2023] [ssl:error] [pid 41219:tid 547796046912] AH02604: Unable to configure certificate localhost:443:0 for stapling [Fri Mar 17 19:32:13.683147 2023] [mpm_event:notice] [pid 41219:tid 547796046912] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Mar 17 19:32:13.683347 2023] [core:notice] [pid 41219:tid 547796046912] AH00094: Command line: '/usr/sbin/apache2' [Fri Mar 17 20:17:16.088609 2023] [ssl:warn] [pid 548:tid 548292731968] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Fri Mar 17 20:17:16.118279 2023] [ssl:error] [pid 548:tid 548292731968] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=nextcloudpi / issuer: CN=nextcloudpi / serial: 68763A4C0CFC5F0ECBF989B0B42ABF959386F6F1 / notbefore: Mar 17 17:46:57 2023 GMT / notafter: Mar 14 17:46:57 2033 GMT] [Fri Mar 17 20:17:16.118362 2023] [ssl:error] [pid 548:tid 548292731968] AH02604: Unable to configure certificate localhost:443:0 for stapling [Fri Mar 17 20:17:16.264691 2023] [ssl:warn] [pid 653:tid 548292731968] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [Fri Mar 17 20:17:16.282971 2023] [ssl:error] [pid 653:tid 548292731968] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=nextcloudpi / issuer: CN=nextcloudpi / serial: 68763A4C0CFC5F0ECBF989B0B42ABF959386F6F1 / notbefore: Mar 17 17:46:57 2023 GMT / notafter: Mar 14 17:46:57 2033 GMT] [Fri Mar 17 20:17:16.283038 2023] [ssl:error] [pid 653:tid 548292731968] AH02604: Unable to configure certificate localhost:443:0 for stapling [Fri Mar 17 20:17:16.292206 2023] [mpm_event:notice] [pid 653:tid 548292731968] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Mar 17 20:17:16.292409 2023] [core:notice] [pid 653:tid 548292731968] AH00094: Command line: '/usr/sbin/apache2' [Fri Mar 17 20:28:43.725318 2023] [proxy_fcgi:error] [pid 655:tid 548081631616] [client ::1:48842] AH01067: Failed to read FastCGI header [Fri Mar 17 20:28:43.725519 2023] [proxy_fcgi:error] [pid 655:tid 548081631616] (104)Connection reset by peer: [client ::1:48842] AH01075: Error dispatching request to : ```
Database logs ``` tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory ```
Nextcloud logs ``` {"reqId":"leuCzzLcez5tKm4IxtYs","level":3,"time":"2023-03-17T17:55:03+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":680,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1144,"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":284,"CustomMessage":"--"}} {"reqId":"Fhe8RD5XgKP4MHu2XZjD","level":3,"time":"2023-03-17T18:00:04+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":680,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1144,"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":284,"CustomMessage":"--"}} {"reqId":"kgllbzsv6oB9oGhqyKuR","level":3,"time":"2023-03-17T18:05:13+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":680,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1144,"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":284,"CustomMessage":"--"}} {"reqId":"SJ2EEv5ayHSyagiZfK8F","level":3,"time":"2023-03-17T18:10: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":680,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1144,"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":284,"CustomMessage":"--"}} {"reqId":"c8Rvncx92KhmkLRCSa3D","level":3,"time":"2023-03-17T18:13:10+00:00","remoteAddr":"","user":"ncp","app":"PHP","method":"","url":"--","message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"--","version":"25.0.3.2","exception":{"Exception":"Error","Message":"exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":641,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":692,"function":"emit_file_hooks_post","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":257,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":216,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":553,"function":"copySkeleton","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":403,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":616,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":355,"function":"loginWithPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Setup.php","line":433,"function":"login","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/core/Command/Maintenance/Install.php","line":105,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Maintenance\\Install","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/occ","line":11,"args":["/var/www/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}} {"reqId":"KNARWR9Gi1ZQWhY1sIbD","level":2,"time":"2023-03-17T18:17:41+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":"25.0.3.2","data":[]} {"reqId":"KNARWR9Gi1ZQWhY1sIbD","level":2,"time":"2023-03-17T18:17:41+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":"25.0.3.2","data":[]} {"reqId":"Jpraj79tOcka7bjJeTo4","level":2,"time":"2023-03-17T18:17:43+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":"25.0.3.2","data":[]} {"reqId":"Jpraj79tOcka7bjJeTo4","level":2,"time":"2023-03-17T18:17:43+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":"25.0.3.2","data":[]} ```
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

I have RPi 3B and installed official RPi Debian Bullseye via official RPi Imager, enabled SSH and created user while preparing SD card.

After installation I've ran apt update & apt upgrade, then ran curl install.sh command.

There are 3 errors I see in my logs:

Error 1

...
Processing triggers for php8.1-cli (8.1.17-1+0~20230316.37+debian11~1.gbp0c3ecb) ...
PHP Warning:  include(/var/www/nextcloud/config/config.php): Failed to open stream: No such file or directory in Command line code on line 1
PHP Warning:  include(): Failed opening '/var/www/nextcloud/config/config.php' for inclusion (include_path='.:/usr/share/php') in Command line code on line 1
PHP Warning:  Undefined variable $CONFIG in Command line code on line 1
PHP Warning:  Trying to access array offset on value of type null in Command line code on line 1
Created symlink /etc/systemd/system/multi-user.target.wants/nc-provisioning.service → /lib/systemd/system/nc-provisioning.service.
Running nc-nextcloud
Downloading Nextcloud 25.0.3...
...

I've narowed it down to: script: https://github.com/nextcloud/nextcloudpi/blob/master/bin/ncp/CONFIG/nc-nextcloud.sh line: 52 : $APTINSTALL -t $RELEASE php${PHPVER}-redis

It is just a PHP Warning, unsure if something could get broken by that.

Error 2

...
apache2_invoke: Enable module security2
apache2_reload: Your configuration is broken. Not restarting Apache 2
apache2_reload: apache2: Syntax error on line 147 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/mods-enabled/security2.conf: Syntax error on line 5 of /usr/share/modsecurity-crs/owasp-crs.load: Could not open configuration file /etc/modsecurity/crs/crs-setup.conf: No such file or directory
Setting up modsecurity-crs (3.3.0-1+deb11u1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...
Module security2 disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
...

Found this to be connected to: script: https://github.com/nextcloud/nextcloudpi/blob/master/bin/ncp/SECURITY/modsecurity.sh line: 14 : apt-get install -y --no-install-recommends libapache2-mod-security2 modsecurity-crs

Should I be ignoring this, because next line in the script is a2dismod security2 which would disable the module that was installed and threw the error. But then again, I guess somewhere down the line this could still be needed, otherwise why install it just to disable it?

Error 3

...
--2023-03-17 19:08:48--  https://github.com/nachoparker/noip-DDNS/archive/master/latest.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/nachoparker/noip-DDNS/tar.gz/refs/heads/master [following]
--2023-03-17 19:08:48--  https://codeload.github.com/nachoparker/noip-DDNS/tar.gz/refs/heads/master
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘STDOUT’
-                                                        [ <=>                ] 136.62K  --.-KB/s    in 0.1s
2023-03-17 19:08:49 (1.19 MB/s) - written to stdout [139904]
/tmp/nextcloudpi.UVDIce/nextcloudpi
gcc -Wall -g -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2
noip2.c: In function ‘dynamic_update’:
noip2.c:1595:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
 1595 |  int i, x, is_group, retval, response;
      |      ^
noip2.c: In function ‘domains’:
noip2.c:1826:13: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
 1826 |         int x;
      |             ^
noip2.c: In function ‘hosts’:
noip2.c:1838:20: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
 1838 |         int     x, y, z;
      |                    ^
noip2.c: In function ‘autoconf’:
noip2.c:2538:19: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
 2538 |  sprintf(line, "%s%s%s%s", USTRNG, login, PWDSTRNG, password);
      |                   ^~               ~~~~~
noip2.c:2538:2: note: ‘sprintf’ output between 16 and 526 bytes into a destination of size 256
 2538 |  sprintf(line, "%s%s%s%s", USTRNG, login, PWDSTRNG, password);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/nextcloudpi.UVDIce/nextcloudpi
Installing samba
...

Now this looks like more serious, and I can see it's actual error when doing make on external project. Script in question is: https://github.com/nextcloud/nextcloudpi/blob/master/bin/ncp/NETWORKING/no-ip.sh line: 19 : wget -O- --content-disposition https://github.com/nachoparker/noip-DDNS/archive/master/latest.tar.gz \ then error gets triggered by line 23 make

I've tried manually downloading said tar file, extracting, and it threw same error on make. But that github repo is 5 years old. I haven't tried but I guess "no-ip" functionality would be broken. Is there a fix? Better substitution?

Anyway, I hope some of these errors are useful. I've captured whole SSH session if it's needed, and I can replicate same on my Pi. I'm still just playing and trying out stuff on RPi + NextcloudPi, so I can easily erase and start from scratch at this point. But I'm uncertain about using such setup for real data, it's hard for me to judge as these three could be insignificant to me at this point. I'll probably wait for Nextcloud 26 to try again anyway, but if someone can either check these or just reassure me that they're not significant errors, I'd be thankful, before setting up the Pi + NextcloudPi for "production" (home cloud). Thanks!

Edit: I've searched this repo, but also "googled" online all three errors before posting, couldn't find anything exact about their causes or possible effects on Nextcloud installation.

Edit 2: Forgot to also post the final errors/exception.

Error 4

Just at the end of installation it says:

Running nc-datadir
Maintenance mode enabled
moving data directory from /var/www/nextcloud/data to /opt/ncdata...
{"reqId":"tcLfbEgU8HmEtUhIlQSQ","level":2,"time":"2023-03-17T18:17:40+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":"25.0.3.2","data":[]}
{"reqId":"tcLfbEgU8HmEtUhIlQSQ","level":2,"time":"2023-03-17T18:17:40+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":"25.0.3.2","data":[]}
Nextcloud is in maintenance mode, hence the database isn't accessible.
Cannot perform any command except 'maintenance:mode --off'

Your data directory is invalid.
Ensure there is a file called ".ocdata" in the root of the data directory.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('...')
#2 {main}Nextcloud is in maintenance mode, hence the database isn't accessible.
Cannot perform any command except 'maintenance:mode --off'

System config value logfile set to string /opt/ncdata/data/nextcloud.log
Nextcloud is in maintenance mode, hence the database isn't accessible.
Cannot perform any command except 'maintenance:mode --off'

System config value tempdirectory set to string /opt/ncdata/data/tmp
Installing template 'php/opcache.ini.sh'...
Maintenance mode disabled
Installing template 'ncp-metrics.cfg.sh'...
The NC data directory has been moved successfully.
/home/luxzg
Done.

Is this expected and normal? Or would that mean data directory is broken? I've left that one last as I couldn't really figure it out or find which script does that part of setup... Edit 3: for error 4 it seems that maybe install.sh should just add touch after mkdir Script: https://github.com/nextcloud/nextcloudpi/blob/master/install.sh Line: 73 : mkdir -p /opt/ncdata Adding something like this just after it: touch /opt/ncdata/.ocdata

twojstaryzdomu commented 1 year ago

I've likely hit the same errors you do whilst installing NC. For specific fixes, you might want to review the commits in the bookworm branch in my repo: https://github.com/twojstaryzdomu/nextcloudpi It shouldn't be too difficult to cherry picking the commits needed to fix those bugs. NC 26 runs nicely on Rpi3B. On your error #3, these are c compiler warnings, not errors. For a solution to error #4, see: https://github.com/twojstaryzdomu/nextcloudpi/commit/b174e4c4ceb1fed9207a8f8478937e51abce687b Errors #1 & #2 are a side-effect to re-running install.sh, with nextcloud specific site configuration already present. php8.1-fpm service is being restarted during a re-installation and picking up configuration file for nextcloud (config.php) that would otherwise be there had install.sh not been re-run. Disregard if the installation completes and the systemd services of nextcloud (mysqld, redis-server, php8.1-fpm, apache2) are running or do following a restart. Missing log file directories can prevent some of these failing to run, see the commits: https://github.com/twojstaryzdomu/nextcloudpi/commit/ee672aa5ac9f55ab6e523e67ed0fbc9375be22f7 https://github.com/twojstaryzdomu/nextcloudpi/commit/ab8f1d9c2454b14feb6a26ab35b2a9d623abed15

luxzg commented 1 year ago

Thanks for the infos. In the meantime I've switched my focus a little, mostly due to getting reminded that RPi3B has 100Mbps ethernet, and my library is quite huge. I've had another SFF x86 PC lying around, with more RAM and way better specs overall, and will try running NCPi or standard NC from it this weekend. I still appreciate the comments, both as a learning experience, and maybe I encounter them again on my x86 alternative.