MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.84k stars 495 forks source link

NextCloud broken after dietpi-update from 8.5.1 to 8.7.1 #5698

Closed Phil1988 closed 2 years ago

Phil1988 commented 2 years ago

Creating a bug report/issue

Required Information

DietPi version G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=7 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng' G_LIVE_PATCH_STATUS[0]='not applicable'

Distro version bullseye

Kernel version Linux DietPi 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux

SBC model Virtual Machine (x86_64)

Steps to reproduce

I did an dietpi-update from 8.5.1to 8.7.1.

After this the nextcloud is not working correctly. A dietpi-services status does not show its active:

root@DietPi:~# dietpi-services status

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status

[  OK  ] DietPi-Services | vsftpd                active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | redis-server          active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | mariadb               active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | apache2               active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | blynkserver           active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | cron                  active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | ssh                   active (running) since Tue 2022                                                -08-23 11:37:25 CEST; 12min ago
[  OK  ] DietPi-Services | pihole-FTL            active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[  OK  ] DietPi-Services | unbound               active (running) since Tue 2022                                                -08-23 11:37:26 CEST; 12min ago
[ INFO ] DietPi-Services | dietpi-vpn            inactive (dead)
[ INFO ] DietPi-Services | dietpi-cloudshell     inactive (dead)
[  OK  ] DietPi-Services | dietpi-ramlog         active (exited) since Tue 2022-                                                08-23 11:37:24 CEST; 13min ago
[  OK  ] DietPi-Services | dietpi-preboot        active (exited) since Tue 2022-                                                08-23 11:37:24 CEST; 13min ago
[  OK  ] DietPi-Services | dietpi-postboot       active (exited) since Tue 2022-                                                08-23 11:37:25 CEST; 12min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor   inactive (dead)

The nextcloud is also not in maintainance mode

root@DietPi:~# ncc maintenance:mode --off
Maintenance mode already disabled

The nextcloud service also does not appear to be started on a fresh reboot: grafik

In the software manager, I can see its installed.

Looks like I have to somehow reactivate it.

(maybe again a mariaDB thing or anything similar?)

I will add more information as I try things ...

I tried a dietpi-software reinstall 114 and it did not bring the nextcloud back to life:

root@DietPi:~# dietpi-software reinstall 114
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated reinstall

[  OK  ] DietPi-Software | Reinstalling Nextcloud: File sync, sharing and collab                                                                                                                                                             oration platform
[  OK  ] DietPi-Software | DietPi-Userdata validation: /mnt/dietpi_userdata

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for conflicts and missing inputs

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for prerequisite software

[ INFO ] DietPi-Software | MariaDB will be reinstalled
[ INFO ] DietPi-Software | PHP will be reinstalled
[ INFO ] DietPi-Software | Redis will be reinstalled
[  OK  ] DietPi-Software | Checking IPv4 network connectivity
[  OK  ] DietPi-Software | Checking IPv6 network connectivity
[  OK  ] DietPi-Software | Checking DNS resolver
[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userd                                                                                                                                                             ata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www                                                                                                                                                              /opt /usr/local/bin
[  OK  ] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/d                                                                                                                                                             ietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/download                                                                                                                                                             s
[  OK  ] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_use                                                                                                                                                             rdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[ SUB1 ] DietPi-Services > unmask
[  OK  ] DietPi-Services | unmask : vsftpd
[  OK  ] DietPi-Services | unmask : redis-server
[  OK  ] DietPi-Services | unmask : mariadb
[  OK  ] DietPi-Services | unmask : apache2
[  OK  ] DietPi-Services | unmask : blynkserver
[  OK  ] DietPi-Services | unmask : cron
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : blynkserver
[  OK  ] DietPi-Services | stop : apache2
[  OK  ] DietPi-Services | stop : mariadb
[  OK  ] DietPi-Services | stop : redis-server
[  OK  ] DietPi-Services | stop : vsftpd
[ INFO ] DietPi-Software | APT update, please wait...
Hit:1 https://deb.debian.org/debian bullseye InRelease
Hit:2 https://deb.debian.org/debian bullseye-updates InRelease
Hit:3 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:4 https://deb.debian.org/debian bullseye-backports InRelease
Reading package lists...
[  OK  ] DietPi-Software | APT update

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing MariaDB: Persistent cached file-per-table database server

[ INFO ] DietPi-Software | Preparing database directory at: /mnt/dietpi_userdata                                                                                                                                                             /mysql
[ INFO ] DietPi-Software | /mnt/dietpi_userdata/mysql exists, will migrate conta                                                                                                                                                             ining databases
[  OK  ] DietPi-Software | rm -Rf /var/lib/mysql
[  OK  ] DietPi-Software | ln -s /mnt/dietpi_userdata/mysql /var/lib/mysql
[ INFO ] DietPi-Software | APT install for: mariadb-server, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
mariadb-server is already the newest version (1:10.5.15-0+deb11u1).
The following package was automatically installed and is no longer required:
  linux-image-5.10.0-9-amd64
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Software | APT install for: mariadb-server
[  OK  ] DietPi-Software | systemctl stop mariadb
[ INFO ] DietPi-Software | Removing obsolete SysV mysql service
[  OK  ] DietPi-Software | update-rc.d mysql remove

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing Redis: Volatile in-memory non-SQL database server

[ INFO ] DietPi-Software | APT install for: redis-server, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
redis-server is already the newest version (5:6.0.16-1+deb11u2).
The following package was automatically installed and is no longer required:
  linux-image-5.10.0-9-amd64
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Software | APT install for: redis-server
[  OK  ] DietPi-Software | systemctl stop redis-server
[  OK  ] DietPi-Software | phpenmod redis
[  OK  ] DietPi-Software | Desired setting in /etc/redis/redis.conf was already                                                                                                                                                              set: loglevel warning
[  OK  ] DietPi-Software | Desired setting in /etc/redis/redis.conf was already                                                                                                                                                              set: logfile ""
[  OK  ] DietPi-Software | Desired setting in /etc/redis/redis.conf was already                                                                                                                                                              set: syslog-enabled yes
[  OK  ] DietPi-Software | Desired setting in /etc/redis/redis.conf was already                                                                                                                                                              set: always-show-logo no

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing PHP: Hypertext Preprocessor for dynamic web content

[ INFO ] DietPi-Software | APT install for: php7.4-fpm php7.4-apcu php7.4-curl p                                                                                                                                                             hp7.4-gd php7.4-mbstring php7.4-xml php7.4-zip php7.4-mysql php7.4-sqlite3 php7.                                                                                                                                                             4-redis, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
php-apcu is already the newest version (5.1.19+4.0.11-3).
php-redis is already the newest version (5.3.2+4.3.0-2+deb11u1).
php7.4-curl is already the newest version (7.4.30-1+deb11u1).
php7.4-gd is already the newest version (7.4.30-1+deb11u1).
php7.4-mbstring is already the newest version (7.4.30-1+deb11u1).
php7.4-mysql is already the newest version (7.4.30-1+deb11u1).
php7.4-sqlite3 is already the newest version (7.4.30-1+deb11u1).
php7.4-xml is already the newest version (7.4.30-1+deb11u1).
php7.4-zip is already the newest version (7.4.30-1+deb11u1).
The following package was automatically installed and is no longer required:
  linux-image-5.10.0-9-amd64
Use 'apt autoremove' to remove it.
Suggested packages:
  php-pear
The following NEW packages will be installed:
  php7.4-fpm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1439 kB of archives.
After this operation, 4856 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian-security bullseye-security/main amd64 php7.4                                                                                                                                                             -fpm amd64 7.4.30-1+deb11u1 [1439 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1439 kB in 0s (7393 kB/s)
                                 Selecting previously unselected package php7.4-                                                                                                                                                             fpm.
(Reading database ... 31040 files and directories currently installed.)
Preparing to unpack .../php7.4-fpm_7.4.30-1+deb11u1_amd64.deb ...
Unpacking php7.4-fpm (7.4.30-1+deb11u1) ...
Setting up php7.4-fpm (7.4.30-1+deb11u1) ...

Creating config file /etc/php/7.4/fpm/php.ini with new version
NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Created symlink /etc/systemd/system/multi-user.target.wants/php7.4-fpm.service → /lib/systemd/system/php7.4-fpm.service.
Processing triggers for php7.4-fpm (7.4.30-1+deb11u1) ...
NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
[  OK  ] DietPi-Software | APT install for: php7.4-fpm php7.4-apcu php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml php7.4-zip php7.4-mysql php7.4-sqlite3 php7.4-redis
[  OK  ] DietPi-Software | systemctl stop php7.4-fpm
[ INFO ] DietPi-Software | APT purge for: libapache2-mod-php*, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  libapache2-mod-php7.4* linux-image-5.10.0-9-amd64*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
                                                              After this operation, 306 MB disk space will be freed.
(Reading database ... 31063 files and directories currently installed.)                                             (Reading database ...
Removing libapache2-mod-php7.4 (7.4.30-1+deb11u1) ...
Module php7.4 disabled.
apache2_invoke prerm: Disable module php7.4
Removing linux-image-5.10.0-9-amd64 (5.10.70-1) ...
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.0-17-amd64
Found initrd image: /boot/initrd.img-5.10.0-17-amd64
done
(Reading database ... 26288 files and directories currently installed.)
Purging configuration files for libapache2-mod-php7.4 (7.4.30-1+deb11u1) ...
apache2_invoke postrm: Purging state for php7.4
dpkg: warning: while removing libapache2-mod-php7.4, directory '/etc/php/7.4/apache2/conf.d' not empty so not removed
Purging configuration files for linux-image-5.10.0-9-amd64 (5.10.70-1) ...
[  OK  ] DietPi-Software | APT purge for: libapache2-mod-php*
[  OK  ] DietPi-Software | rm -Rf /etc/php/7.4/apache2 /var/lib/php/modules/7.4/apache2
[  OK  ] DietPi-Software | Setting in /etc/php/7.4/fpm/pool.d/www.conf adjusted: pm.max_children = 12
[  OK  ] DietPi-Software | Setting in /etc/php/7.4/fpm/pool.d/www.conf adjusted: pm.start_servers = 4
[  OK  ] DietPi-Software | Setting in /etc/php/7.4/fpm/pool.d/www.conf adjusted: pm.min_spare_servers = 4
[  OK  ] DietPi-Software | Setting in /etc/php/7.4/fpm/pool.d/www.conf adjusted: pm.max_spare_servers = 4
[  OK  ] DietPi-Software | Comment in /etc/php/7.4/fpm/pool.d/www.conf converted to setting: env[PATH] = /usr/local/bin:/usr/bin:/bin
[  OK  ] DietPi-Software | mkdir -p /run/php_sessions
[  OK  ] DietPi-Software | chmod 1733 /run/php_sessions
[  OK  ] DietPi-Software | Added setting session.save_path="/run/php_sessions" to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting upload_tmp_dir="/tmp" to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting upload_max_filesize=512M to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting post_max_size=512M to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting opcache.memory_consumption=129 to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting opcache.revalidate_freq=60 to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting apc.shm_size=64M to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | Added setting apc.ttl=259200 to end of file /etc/php/7.4/mods-available/dietpi.ini
[  OK  ] DietPi-Software | phpenmod gmp pdo_mysql mbstring redis bcmath mysqlnd sysvsem sqlite3 json opcache curl exif gettext intl ftp xmlreader ctype sysvmsg fileinfo phar ffi xsl calendar tokenizer pdo pdo_sqlite dom posix mysqli shmop apcu iconv readline gd igbinary dietpi simplexml xml sockets sysvshm dietpi-nextcloud xmlwriter zip
[ INFO ] DietPi-Software | G_THREAD_START_0 | curl -sSfL https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -o /var/www/opcache.php
[ INFO ] DietPi-Software | G_THREAD_START_1 | curl -sSfL https://raw.githubusercontent.com/krakjoe/apcu/master/apc.php -o /var/www/apc.php
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[  OK  ] DietPi-Software | a2enmod proxy_fcgi setenvif
[  OK  ] DietPi-Software | a2enconf php7.4-fpm

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing Nextcloud: File sync, sharing and collaboration platform

[ INFO ] DietPi-Software | Existing Nextcloud installation found, will NOT overwrite...
[ INFO ] DietPi-Software | Installing required PHP modules
[ INFO ] DietPi-Software | APT install for: php7.4-intl, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
php7.4-intl is already the newest version (7.4.30-1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Software | APT install for: php7.4-intl
[ INFO ] DietPi-Software | Enabling required PHP modules
[  OK  ] DietPi-Software | phpenmod ctype curl dom gd intl mbstring pdo_mysql posix simplexml xmlreader xmlwriter zip fileinfo opcache apcu redis exif json
[ INFO ] DietPi-Software | Apply PHP override settings for Nextcloud.
[  OK  ] DietPi-Software | phpenmod dietpi-nextcloud
[ INFO ] DietPi-Software | Apache webserver found, enabling Nextcloud specific configuration.
[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.conf/dps_114/apache.nextcloud.conf -o apache.nextcloud.conf
[  OK  ] DietPi-Software | mv apache.nextcloud.conf /etc/apache2/sites-available/dietpi-nextcloud.conf.dietpi-new
[  OK  ] DietPi-Software | systemctl restart mariadb
[  OK  ] DietPi-Software | systemctl restart redis-server
[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/nextcloud_data
[  OK  ] DietPi-Software | chown -R www-data:www-data /var/www/nextcloud /mnt/dietpi_userdata/nextcloud_data
[ INFO ] DietPi-Software | Nextcloud database found, will NOT overwrite.
[  OK  ] DietPi-Software | Desired setting in /var/www/nextcloud/config/config.php was already set:   'mysql.utf8mb4' => true,
[  OK  ] DietPi-Software | sed -i s|'http://localhost'|'http://localhost/nextcloud'| /var/www/nextcloud/config/config.php
[  OK  ] DietPi-Software | Current setting in /var/www/nextcloud/config/config.php will be preserved:   'htaccess.RewriteBase' => '/nextcloud',
.htaccess has been updated
[  OK  ] DietPi-Software | Current setting in /var/www/nextcloud/config/config.php will be preserved:   'memcache.local' => '\\OC\\Memcache\\APCu',
[ INFO ] DietPi-Software | Enabling Redis for transactional file locking.
[  OK  ] DietPi-Software | Current setting in /etc/redis/redis.conf will be preserved: unixsocket /run/redis/redis-server.sock
[  OK  ] DietPi-Software | Desired setting in /etc/redis/redis.conf was already set: unixsocketperm 770
[  OK  ] DietPi-Software | usermod -aG redis www-data
[  OK  ] DietPi-Software | systemctl restart redis-server
[  OK  ] DietPi-Software | Desired setting in /var/www/nextcloud/config/config.php was already set:   'filelocking.enabled' => true,
[  OK  ] DietPi-Software | Current setting in /var/www/nextcloud/config/config.php will be preserved:   'memcache.locking' => '\\OC\\Memcache\\Redis',
[  OK  ] DietPi-Software | Current setting in /var/www/nextcloud/config/config.php will be preserved:   'hashingThreads' => 2,
Set mode for background jobs to 'cron'
All tables already up to date!
Check columns of the comments table.
Done.
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Done.
Check primary keys.
Done.

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Finalising install

[  OK  ] DietPi-Software | systemctl daemon-reload
2022-08-23 12:05:00 [ INFO ] DietPi-RAMlog | Storing /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store...
2022-08-23 12:05:00 [  OK  ] DietPi-RAMlog | Stored /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store.
[ SUB1 ] DietPi-Services > dietpi_controlled
[  OK  ] DietPi-Services | dietpi_controlled : vsftpd
[  OK  ] DietPi-Services | dietpi_controlled : redis-server
[  OK  ] DietPi-Services | dietpi_controlled : mariadb
[  OK  ] DietPi-Services | dietpi_controlled : php7.4-fpm
[  OK  ] DietPi-Services | dietpi_controlled : apache2
[  OK  ] DietPi-Services | dietpi_controlled : blynkserver
[  OK  ] DietPi-Services | dietpi_controlled : cron

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Purging survey data
[ SUB1 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : vsftpd
[  OK  ] DietPi-Services | restart : redis-server
[  OK  ] DietPi-Services | restart : mariadb
[  OK  ] DietPi-Services | restart : php7.4-fpm
[  OK  ] DietPi-Services | restart : apache2
[  OK  ] DietPi-Services | restart : blynkserver
[  OK  ] DietPi-Services | restart : cron
root@DietPi:~#
Joulinar commented 2 years ago

What exactly is the error message you have?

Phil1988 commented 2 years ago

The error message regarding what?

The nextcloud does not seem to be active. The main issue here is that the service is not properly installed and can be started:

root@DietPi:~# dietpi-services start nextcloud
[FAILED] DietPi-Services | Service (nextcloud) could not be found.
root@DietPi:~#

Checking it via my browser gives me depending on the browser different erropages. Firefox says Fehlercode: SEC_ERROR_INADEQUATE_KEY_USAGE

while brave browser says NET::ERR_CERT_AUTHORITY_INVALID

Joulinar commented 2 years ago

Of course there is no Nextcloud service because it's a web server application. Nextcloud is provided by Apache2 web server.

The issue you have seems to be related to your SSL certificate. I found some issues related to Firefox. https://github.com/dotnet/AspNetCore.Docs/issues/20567

Maybe you could test other browsers like Chrome or Edge

Phil1988 commented 2 years ago

I thought Brave browser is similar to chrome. But ofc I also checked Edge and Chrome before posting here.

I got notified by the android DAVx5 app, that no sync is possible. Then checked the android nextcloud app and then the browers.

I am still checking, but I am 100% sure that its not a browser related problem.

Maybe a redirection problem on some configs, router etc.. (I will check that and let you know)

Phil1988 commented 2 years ago

This is surely not an issue to dietpi, but was a redirection issue. Im still not sure what triggered it (maybe the update was a part of it) but it was a router/DNS redirection problem what happen (randomly or partly related) right after the update.