Workarounds für bekannte Nextcloud 18 Fehler

Fehler und Lösungen:

  1. value of type null for Compiler.php im nextcloud.log
  2. Document Server not installable – cURL error #28
  3. File changes are shown in OnlyOffice but don’t appear in Files app

1. Compiler.php im Nextcloud.log

https://github.com/nextcloud/server/issues/18996

Dieser Fehler lässt sich adhoc mit einem Downgrade auf PHP7.2 beheben.

sudo -s
service php7.4-fpm stop && apt remove php7.4-* -y
apt install php7.2-fpm php7.2-gd php7.2-mysql php7.2-curl php7.2-xml php7.2-zip php7.2-intl php7.2-mbstring php7.2-json php7.2-bz2 php7.2-ldap php-apcu imagemagick php-imagick php-redis -y
cp /etc/php/7.2/fpm/pool.d/www.conf /etc/php/7.2/fpm/pool.d/www.conf.bak
cp /etc/php/7.2/cli/php.ini /etc/php/7.2/cli/php.ini.bak
cp /etc/php/7.2/fpm/php.ini /etc/php/7.2/fpm/php.ini.bak
cp /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/php-fpm.conf.bak
sed -i "s/;env[HOSTNAME] = /env[HOSTNAME] = /" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/;env[TMP] = /env[TMP] = /" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/;env[TMPDIR] = /env[TMPDIR] = /" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/;env[TEMP] = /env[TEMP] = /" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/;env[PATH] = /env[PATH] = /" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/pm.max_children =./pm.max_children = 120/" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/pm.start_servers =./pm.start_servers = 12/" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/pm.min_spare_servers =./pm.min_spare_servers = 6/" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/pm.max_spare_servers =./pm.max_spare_servers = 18/" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/;pm.max_requests =./pm.max_requests = 1000/" /etc/php/7.2/fpm/pool.d/www.conf
sed -i "s/output_buffering =./output_buffering = 'Off'/" /etc/php/7.2/cli/php.ini
sed -i "s/max_execution_time =./max_execution_time = 3600/" /etc/php/7.2/cli/php.ini
sed -i "s/max_input_time =./max_input_time = 3600/" /etc/php/7.2/cli/php.ini
sed -i "s/post_max_size =./post_max_size = 10240M/" /etc/php/7.2/cli/php.ini
sed -i "s/upload_max_filesize =./upload_max_filesize = 10240M/" /etc/php/7.2/cli/php.ini
sed -i "s/;date.timezone./date.timezone = Europe\/\Berlin/" /etc/php/7.2/cli/php.ini
sed -i "s/memory_limit = 128M/memory_limit = 512M/" /etc/php/7.2/fpm/php.ini
sed -i "s/output_buffering =./output_buffering = 'Off'/" /etc/php/7.2/fpm/php.ini
sed -i "s/max_execution_time =./max_execution_time = 3600/" /etc/php/7.2/fpm/php.ini
sed -i "s/max_input_time =./max_input_time = 3600/" /etc/php/7.2/fpm/php.ini
sed -i "s/post_max_size =./post_max_size = 10240M/" /etc/php/7.2/fpm/php.ini
sed -i "s/upload_max_filesize =./upload_max_filesize = 10240M/" /etc/php/7.2/fpm/php.ini
sed -i "s/;date.timezone./date.timezone = Europe\/\Berlin/" /etc/php/7.2/fpm/php.ini
sed -i "s/;session.cookie_secure./session.cookie_secure = True/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.enable=./opcache.enable=1/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.enable_cli=./opcache.enable_cli=1/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.memory_consumption=./opcache.memory_consumption=128/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.interned_strings_buffer=./opcache.interned_strings_buffer=8/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.max_accelerated_files=./opcache.max_accelerated_files=10000/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.revalidate_freq=./opcache.revalidate_freq=1/" /etc/php/7.2/fpm/php.ini
sed -i "s/;opcache.save_comments=.*/opcache.save_comments=1/" /etc/php/7.2/fpm/php.ini
sed -i "$aapc.enable_cli=1" /etc/php/7.2/mods-available/apcu.ini

Ändern Sie den PHP-HANDLER auf php7.2

nano /etc/nginx/nginx.conf
#server unix:/run/php/php7.4-fpm.sock;
server unix:/run/php/php7.2-fpm.sock;

und starten dann sowohl den Webserver nginx, als auch PHP neu:

service php7.2-fpm restart && service nginx restart

Der Fehler sollte nun nicht mehr auftreten.


2. Document Server not installable – cURL error 28

Known Nextcloud 18 issue/bug

Tritt dieser Fehler beim Download bspw. des Document Servers oder anderer Apps auf,

cURL error 28: Operation timed out after 30000 milliseconds with 73837972 out of 305964280 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

so können Sie einen Workaround etablieren. Bearbeiten Sie die nachfolgende Datei

sudo -u www-data nano /var/www/nextcloud/lib/private/Http/Client/Client.php

und passen darin den Wert 30 auf bspw. 600 an:

RequestOptions::TIMEOUT => 30,

zu

RequestOptions::TIMEOUT => 600,

3. File changes are shown in OnlyOffice but don’t appear in Files app

Erweitern Sie den cronjob wie folgt:

sudo -u www-data -e crontab
*/5 * * * * php -f /var/www/nextcloud/occ documentserver:flush; php -f /var/www/nextcloud/cron.php > /dev/null 2>&1

Let’s cross fingers, that the next Onlyoffice release will fix this issue.

© Carsten Rieger IT-Services