Closed edo0 closed 3 years ago
Hello,
Could you post the full output of apt update
and apt upgrade
?
Many thanks for your report. Please check which package would be downgraded. I remember WireGuard caused this.
... ah, ravenclaw900 was faster, yes the second command would show you which package would be downgraded and will ask you to confirm. If it's WireGuard, you can accept, as it is not really a downgrade, only the version string changed when it was added to the Buster backports repository.
Turns out the error was due to an outdated gpg for the packages.sury.org
repository I use not being updated
I therefore proceeded to updating the key and upgrading the packages
Afterwards I retried the upgrade process, and everything seemed to be working fine
dietpi-update
┌─────────────────────────────────────────────┤ DietPi-Patch ├─────────────────────────────────────────────┐
│ │
│ The Microsoft Visual Studio Code APT repository has been found on your system. │
│ │
│ This repository was added by the "raspberrypi-sys-mods" package from the Raspberry Pi Foundation, to │
│ support development around the new Raspberry Pi Pico. │
│ │
│ If you do no VS Code development, we suggest to remove this APT repository and its key from your system. │
│ │
│ <Keep it> <Remove it> │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
[ OK ] DietPi-Patch | rm -f /etc/apt/sources.list.d/vscode.list /etc/apt/trusted.gpg.d/microsoft.gpg /etc/
apt/preferences.d/3rd_parties.pref
[ OK ] DietPi-Patch | rmdir --ignore-fail-on-non-empty /var/lib/dietpi/dietpi-software/services
removed '/etc/udev/rules.d/10-wifi-disable-powermanagement.rules'
[ INFO ] DietPi-Update | APT autopurge, please wait...
(Reading database ... 23055 files and directories currently installed.)
Removing php5.6-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php5.6-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php5.6-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Removing php7.0-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php7.0-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php7.0-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Removing php7.1-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php7.1-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php7.1-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Removing php7.2-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php7.2-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php7.2-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Removing php7.3-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php7.3-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php7.3-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Removing php7.4-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Removing php7.4-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Removing php7.4-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
(Reading database ... 22892 files and directories currently installed.)
Purging configuration files for php7.2-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php7.0-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.4-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.4-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php5.6-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.3-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php7.3-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.1-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.3-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Purging configuration files for php5.6-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php7.0-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Purging configuration files for php7.1-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Purging configuration files for php7.2-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Purging configuration files for php5.6-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
Purging configuration files for php7.2-apcu (5.1.20+4.0.11-1+0~20210304.24+debian10~1.gbp1c3d4d) ...
Purging configuration files for php7.0-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php7.1-imagick (3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b) ...
Purging configuration files for php7.4-redis (5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead) ...
[ OK ] DietPi-Update | APT autopurge
[ OK ] DietPi-Update | Incremental patching to v7.0.2 completed
[ SUB2 ] DietPi-Update > Completed
[ INFO ] DietPi-Update | Current version : v7.0.2
[ INFO ] DietPi-Update | Latest version : v7.0.2
[ OK ] DietPi-Survey | Purging survey data
[ SUB3 ] DietPi-Services > restart
[ OK ] DietPi-Services | restart : redis-server
[ OK ] DietPi-Services | restart : mariadb
[ OK ] DietPi-Services | restart : php7.3-fpm
[ OK ] DietPi-Services | restart : nginx
[ OK ] DietPi-Services | restart : coturn
[ OK ] DietPi-Services | restart : cron
[FAILED] DietPi-Services | ncc maintenance:mode --off
[ OK ] DietPi-Patch | Everything done! Terminating the obsolete DietPi-Update parent instance...
Terminated
root@Pi:~#
root@Pi:~#
root@Pi:~# reboot now
However, the update seems to have broken the Nextcloud instance I was hosting. My website reports
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
Can you share status for all services
dietpi-services status
For reference, challenge with the PHP repository already described on post #4219
Sure!
root@Pi:~# dietpi-services status
DietPi-Services
─────────────────────────────────────────────────────
Mode: status
[ OK ] DietPi-Services | redis-server active (running) since Fri 2021-04-09 18:58:06 CEST; 45min ago
[ OK ] DietPi-Services | mariadb active (running) since Fri 2021-04-09 18:58:09 CEST; 45min ago
[ OK ] DietPi-Services | php7.3-fpm active (running) since Fri 2021-04-09 18:58:11 CEST; 45min ago
[ OK ] DietPi-Services | nginx active (running) since Fri 2021-04-09 18:58:11 CEST; 45min ago
[ OK ] DietPi-Services | coturn active (running) since Fri 2021-04-09 18:58:13 CEST; 45min ago
[ OK ] DietPi-Services | cron active (running) since Fri 2021-04-09 18:58:13 CEST; 45min ago
[ OK ] DietPi-Services | dropbear active (running) since Fri 2021-04-09 18:58:05 CEST; 45min ago
[ OK ] DietPi-Services | fail2ban active (running) since Fri 2021-04-09 18:57:46 CEST; 45min ago
[ INFO ] DietPi-Services | dietpi-ramlog inactive (dead)
[ OK ] DietPi-Services | dietpi-preboot active (exited) since Fri 2021-04-09 18:57:46 CEST; 45min ago
[ OK ] DietPi-Services | dietpi-boot active (exited) since Fri 2021-04-09 18:58:05 CEST; 45min ago
[ OK ] DietPi-Services | dietpi-postboot active (exited) since Fri 2021-04-09 18:58:05 CEST; 45min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor inactive (dead)
Ok all services running, can you try
ncc maintenance:mode --off
It gives me this error
root@Pi:~# ncc maintenance:mode --off
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 135168 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133
root@Pi:~#
Can you reboot your system
Rebooted: the nextcloud "homepage" displays the same error message, and equally
root@Pi:~# ncc maintenance:mode --off
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 135168 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133
root@Pi:~#
Seems like it may be related to this issue maybe? https://github.com/nextcloud/server/issues/25742 (I am running Nextcloud 21.0.1)
@Joulinar @MichaIng
Could be. This might be a workaround. https://github.com/nextcloud/server/issues/25742#issuecomment-783770628
Instead of PHP8, it should be PHP7.3 in your case
Strange, we actually apply apc.enable_cli=1
by default on Nextcloud install, so that should not happen: https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L8151
Can you check:
cat /etc/php/7.3/mods-available/dietpi-nextcloud.ini
grep -r 'apc.enable_cli' /etc/php/7.3/fpm
root@Pi:~# cat /etc/php/7.3/mods-available/dietpi-nextcloud.ini
; Nextcloud PHP settings
; priority=98
apc.enable_cli=1
opcache.enable=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
memory_limit=512M
root@Pi:~#
root@Pi:~# grep -r 'apc.enable_cli' /etc/php/7.3/fpm
root@Pi:~#
The second command does not give any output
Instead of PHP8, it should be PHP7.3 in your case
Nothing to do, that will not work unfortunately
root@Pi:~# cat /etc/php/7.3/cli/conf.d/20-apcu.ini
apc.enable_cli=1
Ah not sure if grep -r parses symlinks:
phpenmod dietpi-nextcloud
ls -l /etc/php/7.3/fpm/conf.d/98-dietpi-nextcloud.ini
root@Pi:~# phpenmod dietpi-nextcloud
root@Pi:~# ls -l /etc/php/7.3/fpm/conf.d/98-dietpi-nextcloud.ini
lrwxrwxrwx 1 root root 48 Oct 17 09:26 /etc/php/7.3/fpm/conf.d/98-dietpi-nextcloud.ini -> /etc/php/7.3/mods-available/dietpi-nextcloud.ini
root@Pi:~#
You broke the apcu.ini file. It's first two lines are essential to load the module and now missing. Let's see if we can restore or:
echo -e '; priority=20\nextension=apcu.so' > /etc/php/7.3/mods-available/apcu.ini
phpdismod apcu
phpenmod apcu
systemctl restart php7.3-fpm
Thank you for spotting it. I have inserted the commands you gave me, and this is the output if I try turning off maintenance mode
root@Pi:~# ncc maintenance:mode --off
PHP Warning: PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/lib/php/20180731/apcu.so (/usr/lib/php/20180731/apcu.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/apcu.so.so (/usr/lib/php/20180731/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 135168 bytes) in /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 1
It's the module not installed?
apt install php-apcu
I was missing indeed php7.3-acpu
Thank you, that solved the issue!!
Apparently I had php-apcu
(version 5), but not php7.3-acpu
. I think it was removed during the upgrade process?
Now Nextcloud is back to working perfectly
Ahh you have the sury.org repository installed, so unexpected PHP versions are installed. Did you install this repository intentionally or was it a Stretch image that was dist-upgraded to Buster?
Try:
apt install php7.3-apcu php7.3-redis
EDIT: Too slow :smiley:. Great that it works again.
Thank you very much, really!! I had added them to Stretch a couple of years ago, and when I moved to Buster (fresh install some months ago), I re-added them as a sort of automatism
That's not needed on Buster ☺️
@Joulinar Thank you for the tip. Would it be enough to remove the repo?
let's ask @MichaIng
When you remove the repo, don't forget to remove the key as well to fully clean it up. Generally, there is nothing bad about the repo, it ships newer PHP versions (also newer minor versions for older major versions like PHP7.3), but indeed the meta package names that do not contain the version string, like php-apcu
, always pull the newest officially released PHP version, currently PHP8.0, so it's important to install the specific versioned package names then. But to rule out that accidentally or as dependency of other packages the meta packages pulling PHP8.0 are installed, better remove it, so one thing less to worry about 😉.
Details:
Linux Pi 5.10.17-v8+ #1403 SMP PREEMPT Mon Feb 22 11:37:54 GMT 2021 aarch64 GNU/Linux
Steps to reproduce:
Expected behaviour:
Actual behaviour:
Extra details:
Additional logs: