Upgrade from 19.0.2.2 to 20.0 Internal Server Error help!

Hi,

I’ve upgraded Nextcloud from 19.0.2.2 to 20.0 since then, Nextcloud returns INTERNAL SERVER ERROR

I don’t know how to resolve it, please help me !!

Nextcloud version 20.0
Operating system Freenas 11.3 U5
Apache or nginx version : sorry, i don’t know, httpd -v returns “command not found”
PHP version v7.4.11

my config.php file output :
> <?php

    $CONFIG = array (
      'apps_paths' =>
      array (
        0 =>
        array (
          'path' => '/usr/local/www/nextcloud/apps',
          'url' => '/apps',
          'writable' => true,
        ),
        1 =>
        array (
          'path' => '/usr/local/www/nextcloud/apps-pkg',
          'url' => '/apps-pkg',
          'writable' => true,
        ),
      ),
      'logfile' => '/var/log/nextcloud/nextcloud.log',
      'memcache.local' => '\\OC\\Memcache\\APCu',
      'passwordsalt' => xxxxxxxxxxxxxxxxxxxxx',
      'secret' => 'xxxxxxxxxxxxxxxxxx',
      'trusted_domains' =>
      array (
        0 => 'xxxxxx.duckdns.org',
        1 => '192.168.0.17',
      ),
      'datadirectory' => '/usr/local/www/nextcloud/data',
      'dbtype' => 'mysql',
      'version' => '19.0.2.2',
      'overwrite.cli.url' => 'http://localhost',
      'dbname' => 'nextcloud',
      'dbhost' => 'localhost',
      'dbport' => '',
      'dbtableprefix' => 'oc_',
      'mysql.utf8mb4' => true,
      'dbuser' => 'oc_ncadmin',
      'dbpassword' => 'XXXXXXXXXXXXXXXXXX',

My NGINX error.log :

2020/10/16 04:34:59 [error] 15636#101621: accept4() failed (53: Software caused connection abort)
2020/10/16 10:09:29 [error] 15636#101621: *105 access forbidden by rule, client: 128.127.105.122, server: xxxxxx.duckdns.org, request: "GET /.env HTTP/1.1", host: "xxx.xxx.xxx.xxx"
2020/10/17 02:57:27 [error] 15635#101458: accept4() failed (53: Software caused connection abort)
2020/10/17 03:06:38 [error] 15635#101458: accept4() failed (53: Software caused connection abort)
2020/10/17 09:12:37 [error] 15636#101621: accept4() failed (53: Software caused connection abort)
2020/10/17 09:57:00 [error] 15636#101621: accept4() failed (53: Software caused connection abort)
2020/10/17 15:24:37 [error] 15635#101458: accept4() failed (53: Software caused connection abort)

Your Upgrade probably didn’t finish, the config.php still shows version 19.0.2.

Which user is the web-user, www? Check out the owner of the files in /usr/local/www/nextcloud:
ls -lisa /usr/local/www/nextcloud
(I suppose in the following that it is www)

You can try to finish the update run:

cd /usr/local/www/nextcloud
su -m www -c 'php occ upgrade'

thanks for your help !

owner of the files in /usr/local/www/nextcloud:
> root@nextcloud:~ # ls -lisa /usr/local/www/nextcloud

total 232
103353 12 drwxr-x---  15 www   www       32 Oct 24 09:55 .
103352 12 drwxr-xr-x   5 root  wheel      6 Oct 24 09:55 ..
305695  7 -rw-r--r--   1 root  www     3032 Oct  2 18:49 .htaccess
305696  7 -rw-rw-r--   1 www   www      101 Oct  2 18:49 .user.ini
476619 12 drwxr-xr-x  41 www   www       48 Oct 24 09:55 3rdparty
121942 12 drwxr-xr-x  47 www   www       47 Sep  7 17:09 apps
312092 12 drwxr-xr-x  47 root  wheel     47 Oct  2 18:50 apps-pkg
295186  1 -rw-r--r--   1 root  www        0 Oct 18 19:16 apps-pkg,
295183  1 -rw-r--r--   1 root  www        0 Oct 18 19:16 apps,
312090 12 -rw-r--r--   1 root  wheel  17234 Oct  2 18:49 AUTHORS
118914 12 drwxr-xr-x   2 www   www       10 Oct 24 09:55 config
321928  7 -rw-r--r--   1 root  wheel   3967 Oct  2 18:49 console.php
312091 24 -rw-r--r--   1 root  wheel  34520 Oct  2 18:49 COPYING
475673 12 drwxr-xr-x  22 www   www       29 Oct 24 09:55 core
323294  7 -rw-r--r--   1 root  wheel   5140 Oct  2 18:49 cron.php
121943 12 drwxrwx---   9 www   www       13 Oct 18 14:17 data
295193  1 -rw-r--r--   1 root  www        0 Oct 18 19:16 data,
323295  7 -rw-r--r--   1 root  wheel    156 Oct  2 18:49 index.html
323296  7 -rw-r--r--   1 root  wheel   2960 Oct  2 18:49 index.php
475413 12 drwxr-xr-x   6 www   www        9 Oct 24 09:55 lib
325020  7 -rw-r--r--   1 root  wheel    283 Oct  2 18:49 occ
325021  1 drwxr-xr-x   2 root  www        3 Oct 24 09:55 ocm-provider
325025  1 drwxr-xr-x   2 root  www        5 Oct 24 09:55 ocs
325023  1 drwxr-xr-x   2 root  www        3 Oct 24 09:55 ocs-provider
325029  7 -rw-r--r--   1 root  wheel   3102 Oct  2 18:49 public.php
325030  7 -rw-r--r--   1 root  wheel   5332 Oct  2 18:49 remote.php
325031 12 drwxr-xr-x   4 root  www        8 Oct 24 09:55 resources
325044  1 -rw-r--r--   1 root  wheel     26 Oct  2 18:49 robots.txt
325045  7 -rw-r--r--   1 root  wheel   2379 Oct  2 18:49 status.php
325046  1 drwxr-xr-x   3 root  www        4 Oct 24 09:55 themes
121939  1 drwxr-x---   2 www   www        4 Oct 24 09:55 updater
325067  7 -rw-r--r--   1 root  wheel    362 Oct  2 18:51 version.php

result off su -m www -c 'php occ upgrade :

root@nextcloud:/usr/local/www/nextcloud # su -m www -c 'php occ upgrade'
**/root/.acme.sh/acme.sh.csh: Permission denied.**
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
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: audio-player
Updating <accessibility> ...
Migrate old user config
Done
4/4 [============================] 100%
Updated <accessibility> to 1.6.0
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.1.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.10.1
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.0.1
Updating <files_rightclick> ...
Updated <files_rightclick> to 0.17.0
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.9.0
Updating <logreader> ...
Updated <logreader> to 2.5.0
Updating <photos> ...
Updated <photos> to 1.2.0
Updating <privacy> ...
Updated <privacy> to 1.4.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.10.0
Updating <recommendations> ...
Updated <recommendations> to 0.8.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.10.0
Updating <settings> ...
Updated <settings> to 1.2.0
Updating <support> ...
Updated <support> to 1.3.0
Updating <survey_client> ...
Updated <survey_client> to 1.8.0
Updating <text> ...
Updated <text> to 3.1.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.9.0
Updating <updatenotification> ...
Updated <updatenotification> to 1.10.0
Updating <viewer> ...
Updated <viewer> to 1.4.0
Updating <federation> ...
Updated <federation> to 1.10.1
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.8.0
Updating <oauth2> ...
Updated <oauth2> to 1.8.0
Updating <password_policy> ...
Updated <password_policy> to 1.10.1
Updating <files> ...
Updated <files> to 1.15.0
Updating <activity> ...
Updated <activity> to 2.13.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.3.0
Updating <dav> ...
Fix broken values of calendar objects
Done
0/0 [----->----------------------] 0%
Updated <dav> to 1.16.0
Updating <files_external> ...
Updated <files_external> to 1.11.1
Updating <files_sharing> ...
Updated <files_sharing> to 1.12.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.10.1
Updating <files_versions> ...
Updated <files_versions> to 1.13.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.10.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.2.0
Updating <comments> ...
Updated <comments> to 1.10.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.9.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.9.0
Updating <notifications> ...
Updated <notifications> to 2.8.0
Updating <systemtags> ...
Updated <systemtags> to 1.10.0
Updating <theming> ...
Updated <theming> to 1.11.0
Checking for update of app accessibility in app-store
Checked for update of app "accessibility" in app-store
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore
Checking for update of app bruteforcesettings in appstore
Checked for update of app "bruteforcesettings" 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 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_external in appstore
Checked for update of app "files_external" 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 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 app-store
Checking for update of app photos in app-store
Checked for update of app "photos" 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 app-store
Checked for update of app "settings" in app-store
Checking for update of app sharebymail in app-store
Checked for update of app "sharebymail" in app-store
Checking for update of app support in app-store
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 viewer in appstore
Checked for update of app "viewer" in appstore
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore
Checking for update of app audioplayer in appstore
Update app audioplayer from appstore
Checked for update of app "audioplayer" in appstore
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
root@nextcloud:/usr/local/www/nextcloud # Command: login -p -f root failed!
Console failed!
The cause could be bad permissions for 
/mnt/Saperlipopette/iocage/jails/nextcloud/root/usr/lib. 

…still not working…

this might help :

root@Saperlipopette[~]# ls -lisa /mnt/Saperlipopette/iocage/jails/nextcloud/root/usr/lib
total 57755

everything is Root Wheel

I’m really a noob, help would be really appreciated !

Where is this coming from? A second setup?

sorry tflidd, report from result off su -m www -c 'php occ upgrade was miss quoted…
Post edited

You can install this extension.

So running the upgrade command just showed that it upgraded some apps, so you probably haven’t updated the code yet. How did you upgrade. For me it looks like you have to go through a freenas-app or check where you installed this within a jail. If you do this manually, it would probably mess up things. For the moment, nothing happened and you are still on NC 19. Take the chance and do a backup before you continue with other steps (data and the database).

it seems that the upgrade was done…
config php show next cloud version 20.0.0.9
my next cloud log too :

{“reqId”:“OUPodwvt9qzIYzOeKzlg”,“level”:3,“time”:“2020-10-25T20:16:50+00:00”,“remoteAddr”:“162.142.125.49”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/”,“message”:{“Exception”:“Error”,“Message”:“Call to a member function registerRoutes() on null”,“Code”:0,“Trace”:[{“file”:“/usr/local/www/nextcloud/lib/private/Route/Router.php”,“line”:412,“function”:“include_once”},{“file”:“/usr/local/www/nextcloud/lib/private/Route/Router.php”,“line”:151,“function”:“requireRouteFile”,“class”:“OC\Route\Router”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/Route/Router.php”,“line”:368,“function”:“loadRoutes”,“class”:“OC\Route\Router”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/Route/CachingRouter.php”,“line”:60,“function”:“generate”,“class”:“OC\Route\Router”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/URLGenerator.php”,“line”:99,“function”:“generate”,“class”:“OC\Route\CachingRouter”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/apps-pkg/password_policy/lib/Capabilities.php”,“line”:57,“function”:“linkToOCSRouteAbsolute”,“class”:“OC\URLGenerator”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/CapabilitiesManager.php”,“line”:72,“function”:“getCapabilities”,“class”:“OCA\Password_Policy\Capabilities”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/Template/JSConfigHelper.php”,“line”:181,“function”:“getCapabilities”,“class”:“OC\CapabilitiesManager”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/TemplateLayout.php”,“line”:210,“function”:“getConfig”,“class”:“OC\Template\JSConfigHelper”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/legacy/OC_Template.php”,“line”:183,“function”:“__construct”,“class”:“OC\TemplateLayout”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/private/Template/Base.php”,“line”:132,“function”:“fetchPage”,“class”:“OC_Template”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/base.php”,“line”:794,“function”:“printPage”,“class”:“OC\Template\Base”,“type”:“->”},{“file”:“/usr/local/www/nextcloud/lib/base.php”,“line”:1092,“function”:“init”,“class”:“OC”,“type”:“::”},{“file”:“/usr/local/www/nextcloud/index.php”,“line”:35,“args”:[“/usr/local/www/nextcloud/lib/base.php”],“function”:“require_once”}],“File”:“/usr/local/www/nextcloud/apps-pkg/files_external/appinfo/routes.php”,“Line”:33,“CustomMessage”:“–”},“userAgent”:“Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)”,“version”:“20.0.0.9”}

but still Internal server error…

I’m on freenas and I’ve finished the upgrade with the command line from the Iocage as tflidd says