NCP: Internal Server Error following upgrade

On Saturday I upgraded ncp and nextcloud.
Everything seemed to go OK, but today when I try to access Nextcloud from the web interface I get

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.

I’m also unable to access my files and synced calender’s from mobile and desktop client’s.

I can access ncp via the web interface, I tried rolling back to the backup I made before the upgrade, but I still have the same problem.

I found a post in the forum that suggested I try
sudo -u www-data php /var/www/nextcloud/occ maintenance:repair

But that has not fixed the issue, does anyone have any suggestions as to what else I can try?

The only log I could find was /var/log/ncp.log which ended with

[ nc-backup ] (Sat Mar  6 12:48:45 GMT 2021)
Cannot load Zend OPcache - it was already loaded
check free space...
Cannot load Zend OPcache - it was already loaded
Maintenance mode enabled
backup database...
backup files...
backup /media/USBdrive/ncp-backups/nextcloud-bkp_20210306_1615034925.tar generated
Cannot load Zend OPcache - it was already loaded
Maintenance mode disabled

[ nc-update ] (Sat Mar  6 12:50:58 GMT 2021)
Downloading updates
Performing updates
Running unattended-upgrades
[ unattended-upgrades ] (Sat Mar  6 12:51:18 GMT 2021)
Unattended upgrades active: yes (autoreboot true)
Unattended upgrades active: yes (autoreboot true)

Update to buster available. Type 'sudo ncp-dist-upgrade' to upgrade
Cannot load Zend OPcache - it was already loaded
wall: cannot get tty name: Inappropriate ioctl for device
ls: cannot access '/etc/php/7.3/fpm/conf.d/*-opcache.ini': No such file or directory
ls: cannot access '/etc/php/7.3/cli/conf.d/*-opcache.ini': No such file or directory
NextCloudPi updated to version v1.35.0

[ nc-update-nextcloud ] (Sat Mar  6 12:53:22 GMT 2021)
Cannot load Zend OPcache - it was already loaded
Current   Nextcloud version 20.0.2.2
Available Nextcloud version 20.0.8
Download Nextcloud 20.0.8...
Back up current instance...
Cannot load Zend OPcache - it was already loaded
check free space...
Cannot load Zend OPcache - it was already loaded
Maintenance mode enabled
backup database...
backup files...
backup /var/www//nextcloud-bkp_20210306_1615035237.tar.gz generated
Cannot load Zend OPcache - it was already loaded
Maintenance mode disabled
Install Nextcloud 20.0.8...
Fix permissions...
Upgrade...
Cannot load Zend OPcache - it was already loaded
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: apporder
Disabled incompatible app: calendar
Disabled incompatible app: contacts
Disabled incompatible app: deck
Disabled incompatible app: files_readmemd
Disabled incompatible app: files_trackdownloads
Disabled incompatible app: news
Disabled incompatible app: notes
Disabled incompatible app: polls
Disabled incompatible app: tasks
Updating <activity> ...
Updated <activity> to 2.13.4
Updating <dav> ...
Fix broken values of calendar objects

 Starting ...
    0/0 [>---------------------------]   0%
Updated <dav> to 1.16.2
Updating <files_sharing> ...
Updated <files_sharing> to 1.12.2
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.10.2
Updating <photos> ...
Updated <photos> to 1.2.3
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in appstore 
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore 
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in appstore 
Checking for update of app comments in appstore
Checked for update of app "comments" in appstore 
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in appstore 
Checking for update of app dashboard in appstore
Checked for update of app "dashboard" in appstore 
Checking for update of app dav in appstore
Checked for update of app "dav" in appstore 
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in appstore 
Checking for update of app federation in appstore
Checked for update of app "federation" in appstore 
Checking for update of app files in appstore
Checked for update of app "files" in appstore 
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in appstore 
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in appstore 
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in appstore 
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in appstore 
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in appstore 
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in appstore 
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in appstore 
Checking for update of app logreader in appstore
Checked for update of app "logreader" in appstore 
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in appstore 
Checking for update of app nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in appstore 
Checking for update of app nextcloudpi in appstore
Checked for update of app "nextcloudpi" in appstore 
Checking for update of app notifications in appstore
Checked for update of app "notifications" in appstore 
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in appstore 
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in appstore 
Checking for update of app photos in appstore
Checked for update of app "photos" in appstore 
Checking for update of app previewgenerator in appstore
Update app previewgenerator from appstore
Checked for update of app "previewgenerator" in appstore 
Checking for update of app privacy in appstore
Checked for update of app "privacy" in appstore 
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in appstore 
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in appstore 
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in appstore 
Checking for update of app settings in appstore
Checked for update of app "settings" in appstore 
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in appstore 
Checking for update of app support in appstore
Checked for update of app "support" in appstore 
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in appstore 
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in appstore 
Checking for update of app text in appstore
Checked for update of app "text" in appstore 
Checking for update of app theming in appstore
Checked for update of app "theming" in appstore 
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in appstore 
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in appstore 
Checking for update of app user_status in appstore
Checked for update of app "user_status" in appstore 
Checking for update of app viewer in appstore
Checked for update of app "viewer" in appstore 
Checking for update of app weather_status in appstore
Checked for update of app "weather_status" in appstore 
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore 
Checking for update of app apporder in appstore
Checked for update of app "apporder" in appstore 
Checking for update of app calendar in appstore
Checked for update of app "calendar" in appstore 
Checking for update of app contacts in appstore
Checked for update of app "contacts" in appstore 
Checking for update of app deck in appstore
Checked for update of app "deck" in appstore 
Checking for update of app files_readmemd in appstore
Checked for update of app "files_readmemd" in appstore 
Checking for update of app files_trackdownloads in appstore
Checked for update of app "files_trackdownloads" in appstore 
Checking for update of app news in appstore
Checked for update of app "news" in appstore 
Checking for update of app notes in appstore
Checked for update of app "notes" in appstore 
Checking for update of app polls in appstore
Checked for update of app "polls" in appstore 
Checking for update of app tasks in appstore
Checked for update of app "tasks" in appstore 
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
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.
Adding cards_abiduri index to the cards table, this can take some time...
cards table updated successfully.
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.
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
Check columns of the comments table.
Done.
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
Check primary keys.
Done.
Cannot load Zend OPcache - it was already loaded
Cannot load Zend OPcache - it was already loaded
Following columns will be updated:

* federated_reshares.share_id
* files_trash.auto_id
* share_external.id
* share_external.parent

This can take up to hours, depending on the number of files in your instance!
Backup stored at /media/USBdrive/ncdata/ncp-update-backups/nextcloud-bkp_20210306_1615035237-20.0.2.2.tar.gz
Clean up...

[ nc-update-nc-apps ] (Sat Mar  6 13:48:26 GMT 2021)
Cannot load Zend OPcache - it was already loaded


[ nc-previews-auto ]

[ nc-previews-auto ]
[ nc-limits ] (Mon  8 Mar 04:01:14 GMT 2021)
Using 728297472B for PHP
Using 6 PHP threads
Using 192434176 memory for the database
Warning: mysql.service changed on disk. Run 'systemctl daemon-reload' to reload units.

[ nc-limits ] (Mon  8 Mar 09:40:06 GMT 2021)
Using 728297472B for PHP
Using 6 PHP threads
Using 192434176 memory for the database

I tried the command listed in the warning

systemctl daemon-reload

but this did not seem to do anything.

Any help would be appreciated.

DAve

I should also have mentioned I’m running on a Raspberry Pi 3

I after more searching I found a post which suggested I change

'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',

to

'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',

But this did not fix the issue, and another post on the Raspberry Pi Forums which suggested this should be

'memcache.local' => '\OC\Memcache\APCu',

which I seem to recognize from an earlier NextCloud install, but that still did not fix my issue.

‘memcache.local’ => ‘\\OC\\Memcache\\Redis’,
‘memcache.locking’ => ‘\\OC\\Memcache\\Redis’,

Is the setting on my RPi2B+ running
NCP v1.35.0
NC 20.0.8.1
NextCloudPi image NextCloudPi_03-09-19
Raspbian GNU/Linux 10

Cheers @OliverV,

That is what my setting used to be, so I have reverted to that, but I still have the same issue.

My system config (after rolling back the update to 20.0.8 which seem to have caused this) is
Pi3
NCP v1.35.0
NC 20.0.2.2
NextCloudPi image NextCloudPi_03-09-19
distribution Raspbian GNU/Linux 9
datadir /media/USBdrive/ncdata
data filesystem ext2/ext3
swapfile /var/swap
dbdir /media/USBdrive/ncdatabase
Nextcloud check ok

I notice you are Buster while I am still on Stretch, could that be the issue?

I did not notice the dist_upgrade until I ssh’ed in following my problem, and did not want to run that update in case it made my problem worse.

I can still get to the ncp web interface, just not nc.

Very likely, I’d make backups if needed, and upgrade to Buster.

1 Like

I tried running the upgrade, and had some errors

I’ve listed the full output below, but it looks like the main error is

The following packages have unmet dependencies:
 php7.3-bz2 : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed

Does anyone know how I can fix this?

DAve

Full output…

NextCloudPi v1.35.0 is up to date
Update to buster available. Type 'sudo ncp-dist-upgrade' to upgrade
Last login: Mon Mar 15 13:19:01 2021 from 192.168.1.100
pi@nextcloudpi:~ $ sudo ncp-dist-upgrade

>>> ATTENTION <<<
This is a dangerous process that is only guaranteed to work properly if you
have not made manual changes in the system. Backup the SD card first and
proceed at your own risk.

Note that this is not a requirement for NCP to continue working properly.
The current distribution will keep receiving updates for some time.

Do you want to continue? [y/N]
y
sudo: php: command not found
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Fetched 15.0 kB in 1s (14.7 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.2-common' instead of 'php7.2-fileinfo'
Package 'php7.2' is not installed, so not removed
Package 'php7.2-bz2' is not installed, so not removed
Package 'php7.2-cli' is not installed, so not removed
Package 'php7.2-curl' is not installed, so not removed
Package 'php7.2-fpm' is not installed, so not removed
Package 'php7.2-gd' is not installed, so not removed
Package 'php7.2-intl' is not installed, so not removed
Package 'php7.2-json' is not installed, so not removed
Package 'php7.2-ldap' is not installed, so not removed
Package 'php7.2-mbstring' is not installed, so not removed
Package 'php7.2-opcache' is not installed, so not removed
Package 'php7.2-xml' is not installed, so not removed
Package 'php7.2-zip' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php7.2-mysql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.2-redis
E: Couldn't find any package by glob 'php7.2-redis'
E: Couldn't find any package by regex 'php7.2-redis'
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.2-common' instead of 'php7.2-exif'
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.2-imagick
E: Couldn't find any package by glob 'php7.2-imagick'
E: Couldn't find any package by regex 'php7.2-imagick'
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.3-common' instead of 'php7.3-fileinfo'
php7.3-common is already the newest version (7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.3-bz2 : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-cli : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
              Depends: php7.3-readline but it is not going to be installed
 php7.3-curl : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-fpm : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-gd : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-intl : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-json : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-ldap : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-mbstring : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-opcache : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-xml : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
 php7.3-zip : Depends: php7.3-common (= 7.3.27-1~deb10u1) but 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6 is to be installed
E: Unable to correct problems, you have held broken packages.
Something went wrong. Fix it and try again

OK,

I managed to fix that blockage by removing php7.3-common

sudo apt remove php7.3-common

then re-running

sudo ncp-dist-upgrade

However now it has stopped at

Reading state information... Done
Package php7.3-redis is a virtual package provided by:
  php-redis 4.2.0-1 [Not candidate version]

E: Package 'php7.3-redis' has no installation candidate
Something went wrong. Fix it and try again

And my Google-fu has definitely failed me this time.

Does anyone have any ideas how I can fix this?

I have this problem too. Did you manage to solve it?

I still have this also,

Cannot load Zend OPcache - it was already loaded
PHP Fatal error: Maximum execution time of 0 seconds exceeded in /data/

I am using manjaro arm rpi4, docker cleaned and reset docker container/image
docker pull myownbits/nextcloudpi:latest