Hello,

Suddenly my nextcloud 16.0 proxmox LXC-installation says internal server error after updating. The update upgraded: libpcre3 php-imagick php-pear php-redis php7.2-common php7.2-imagick and php7.2-redis

I restored the backup on Proxmox and apt update and then apt-list --upgradable says:

libpcre3/unknown 2:8.44-2+0~20210301.9+debian10~1.gbpa278ad amd64 [upgradable from: 2:8.43-1+0~20200703.7+debian10~1.gbpbfc49f]
php-imagick/unknown 3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b amd64 [upgradable from: 3.4.4+php8.0+3.4.4-6+0~20210222.27+debian10~1.gbp25c811]
php-pear/unknown 1:1.10.12+submodules+notgz+20210212-1+0~20210228.21+debian10~1.gbpf2b98f all [upgradable from: 1:1.10.12+submodules+notgz+20210212-1+0~20210215.18+debian10~1.gbpf2b98f]
php-redis/unknown 5.3.2+4.3.0-7+0~20210228.34+debian10~1.gbp893bd4 amd64 [upgradable from: 5.3.2+4.3.0-1+0~20201211.30+debian10~1.gbp404a40]
php7.2-common/unknown 7.2.34-18+0~20210223.60+debian10~1.gbpb21322 amd64 [upgradable from: 7.2.34-16+0~20210220.59+debian10~1.gbp716ae9]
php7.2-imagick/unknown 3.4.4+php8.0+3.4.4-7+0~20210305.28+debian10~1.gbpdcb27b amd64 [upgradable from: 3.4.4+php8.0+3.4.4-6+0~20210222.27+debian10~1.gbp25c811]
php7.2-redis/unknown 5.3.2+4.3.0-7+0~20210228.34+debian10~1.gbp893bd4 amd64 [upgradable from: 5.3.2+4.3.0-1+0~20201211.30+debian10~1.gbp404a40]

 

php -v:

PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies


nextcloud version: Nextcloud 20.0.7

Thank you for any advice

Peter

Forum: 
Tags: 
Jeremy Davis's picture

Firstly, thanks so much for reporting this! It looks like there is a bug in our v16.0 appliance. And I was just about to release an updated v16.1 including the same bug! So your post is incredibly timely. Thanks for doing your bit to make TurnKey better! :)

So the first thing that jumped out at me was that there are 2 different versions of PHP installed. Initially I thought it might have been something that you did, but after poking a round a bit, I see that it's actually us (doh!). I've opened a bug that explains what happened... I'll fix that for v16.1.

I suspect that's related, but I'll download it and have a poke around to confirm that's the issue. Hopefully, I'll have a workaround for you shortly... (I intend to post both here and on the issue)

Jeremy Davis's picture

[NOTE: After a little more testing, I have just updated these instructions (plus including them in the issue . If you have already applied them, please be sure to re-run the apt lines from the "fix" below.]

I was sort of right... So it appears that whilst the sury.org PHP repo is enabled, by default no packages should be installed from it. And the sury.org repo isn't included in the sec updates. So I'm not completely clear how you managed to end up with them actually installed (unless perhaps you were upgrading from a v15.x appliance?). Regardless, it should be fairly straight forward to resolve. To remove any errant sury.og PHP packages, and ensure that only Debian ones are installed, try this:

# disable the 3rd party sury.org repo (and pinning)
mv /etc/apt/sources.list.d/php.list /etc/apt/sources.list.d/php.list.disabled
mv /etc/apt/preferences.d/php-sury.pref /etc/apt/preferences.d/php-sury.pref.disabled

# clean the apt cache
apt clean

# pull latest updates
apt update

# purge all php7.2 pkgs explicitly
apt purge -y php7.2*

# force re-install (possibly downgrade) of a few specific pkgs (php & deps):
apt install --reinstall -y php-igbinary=3.0.0-1 php-imagick=3.4.3-4.1 php-redis=4.2.0-1 \
    php-pear=1:1.10.6+submodules+notgz-1.1+deb10u1 libpcre3=2:8.39-12 libzip4=1.5.1-4

# reinstall all desired php packages (to ensure that you have the right ones...)
apt install -y --reinstall php-mysql php-cli php-gd php-curl php-json php-intl php-xml php-mbstring \
    php-zip php-pear php-imagick php-igbinary php-redis php-ldap php-imap php-gmp libapache2-mod-php

Now if you restart Apache, all should be well:

systemctl restart apache2

Hopefully that fixes it. Let me know how you go...

Jeremy Davis's picture

Peter respond via email. It should have auto-posted as a response, but for some reason it didn't, so I'l repost here manually.

Hello Jeremy,

Thank you for your quick response. I tried your solution on a fresh installed version of turnkey-nextcloud. And WOW, problem solved. Then I tried it on the existing installation (already upgraded to nextcloud 21) WOW again. Perfect.!!

Nextcloud 21 missed svn for imagick. I had to install libmagickcore-6.q16-6-extra. Might be a good idea for version turnkey-nextcloud 16.1.

Thank you again. I love turnkey on my Proxmox: I use: concrete5, nextcloud, joomla, lamp, core, nginx, matoma. It's great!

Bye

Peter

Sascha's picture

Hello Jeremy, I ran into the same issue as Peter. Your solution worked for me, thanks!

Add new comment