[solved] Access fail on Menu > Settings : Server internal error

[details=“Unable to access the settings. The message is ‘Internal server error
The server is unable to execute your request.’ with a Request ID”]

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

Or for longer, use three backticks above and below the code snippet:

Description : Logging and all functionnality run correctly but it's impossible to enter in settings.
This returns an internal error.

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:


Nextcloud version : 24.0.1
Operating system and version : Ubuntu 22.04 (Jammy Jellyfish)
Apache version : 2.4.52
PHP version : 8.1
VirtualBox version : 6.1.34 on Fedora 34

The issue you are facing:

Is this the first time you’ve seen this error? : Y

Steps to replicate it:

  1. Install Ubuntu + Apache2 + php modules + mysql ( => Success )
    ( Document used : Comment créer votre propre service cloud avec Nextcloud ? – Homputer Security )
  2. Install Nextcloud in /var/www/html/nextcloud ( => Success )
  3. Create users accounts in Menu > Users ( => Success )
    → It was for recreate MySQL database because of I forgot to save the old MySQL database before reset the Virtual Machine.
  4. Restore users files in /var/www/html/nextcloud/data ( => Success )
  5. chown -R www-data:www-data /var/www/html/nextcloud ( => Success )
  6. sudo -u www-data php occ files:scan --all ( => Success )
  7. sudo -u www-data php occ upgrade => “Nextcloud is already latest version”
  8. Try to access Menu > Settings ( => Fail )

The output of your Nextcloud log in Admin > Logging:

Unvailable because of access to Settings is require.
I have tried to load https://My_URL/index.php/settings/admin/logging
It's the same result :

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

The URL is replaced by My_URL because of it's for a private access.
It's an experience for tests and learning on a dedicated personnal computer.
# vim /var/www/html/nextcloud/config/config.php
$CONFIG = array (
  'instanceid' => 'CLICK',
  'passwordsalt' => 'CLICK',
  'secret' => 'CLICK',
  'trusted_domains' =>
  array (
    0 => 'My_URL',
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://My_URL/nextcloud,
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:80',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'admin',
  'dbpassword' => 'CLICK',
  'installed' => true,
  'maintenance' => false,
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  'app_install_overwrite' =>
  array (
    0 => 'weather',

The output of your Apache/system log in /var/log/____:

The following is the log files just after run :
1. sudo -u www-data php occ maintenance:update:htaccess
2. systemctl restart apache2
3. Reload the dashboard in Firefox (successsfully) and click with mouse on Menu > Settings (failed)

Rq : I used CLICK for sensitive data substitution in logs.

# cat /var/log/apache2/error.log
[Sat May 28 20:29:19.704084 2022] [mpm_prefork:notice] [pid 284147] AH00170: caught SIGWINCH, shutting down gracefully
[Sat May 28 20:29:20.152346 2022] [mpm_prefork:notice] [pid 285952] AH00163: Apache/2.4.52 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2 configured -- resuming normal operations
[Sat May 28 20:29:20.152444 2022] [core:notice] [pid 285952] AH00094:     Command line: '/usr/sbin/apache2'

# cat /var/log/apache2/access.log
... - - [28/May/2022:20:34:25 +0200] "GET /index.php/settings/user HTTP/1.1" 500 7140 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" - - [28/May/2022:20:34:27 +0200] "GET /index.php/apps/terms_of_service/terms HTTP/1.1" 412 1254 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"

No event in /var/log/apache2/other_vhosts_access.log
No event in /var/log/php8.1-fpm.log
No event in /var/log/php-fpm/php8.1-fpm.log
No event in /var/log/mysql/error.log

# journalctl -xe
mai 28 21:35:01 My_URL CRON[287515]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
mai 28 21:35:01 My_URL CRON[287518]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
mai 28 21:35:01 My_URL CRON[287515]: pam_unix(cron:session): session closed for user root

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

# grep -i "admin" ./data/nextcloud.log
{"reqId":"CLICK","level":3,"time":"2022-05-28T19:35:52+00:00","remoteAddr":"","user":"admin","app":"index","method":"GET","url":"/index.php/settings/user","message":"Could not resolve OCA\\Github\\Settings\\PersonalSection! Class \"OCA\\Github\\Settings\\PersonalSection\" does not exist","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0","version":"","exception":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Github\\Settings\\PersonalSection! Class \"OCA\\Github\\Settings\\PersonalSection\" does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":133,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":161,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":57,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":130,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":288,"function":"getSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":107,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":62,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":139,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":64,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":122,"CustomMessage":"--"}}

Did you try to run.

$ sudo -u www-data php occ db:add-missing-columns
$ sudo -u www-data php occ db:add-missing-indices
$ sudo -u www-data php occ maintenance:repair

Thanks for your answer.

Here is the returns :

# sudo -u www-data php occ db:add-missing-columns
Check columns of the comments table.

# sudo -u www-data php occ db:add-missing-indices
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.
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.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.

# sudo -u www-data php occ maintenance:repair
 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Add background job
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Install new core bundle components
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - SCSS cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Add read permissions for existing announcements
    0 [->--------------------------]
 - Update name of the stored view
 - Upgrading Circles App
     - (Circles) Migrating to 22
    0 [--->------------------------]
    0 [----->----------------------]
    0 [--------->------------------]
    0 [----------->----------------]
     - (Circles) Migrating to 22.1.x
    0 [-------------->-------------]
 - Preparing app data of Pico CMS for Nextcloud
     - Checking Pico CMS requirements …
     - Rebuilding Pico CMS app settings …
     - Syncing Pico CMS app data folder …
     - Copying Pico CMS config …
     - WARNING: Replacing Pico CMS config file "config.yml.template"
     - Registering Pico CMS templates …
     - WARNING: Replacing Pico CMS system template "empty"
     - WARNING: Replacing Pico CMS system template "sample_pico"
     - Publishing Pico CMS themes …
     - WARNING: Replacing Pico CMS system theme "default"
     - Publishing Pico CMS plugins …
     - WARNING: Replacing Pico CMS system plugin "PicoDeprecated"
 - Fix component of birthday calendars
     - 1 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Adding background jobs to regenerate birthday calendar
 - Fix broken values of calendar objects
    0 [------------------>---------]
 - Registering building of calendar search index as background job
     - Add background job
 - Register building of social profile search index as background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Add background job
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [---------------------->-----]
     - 0 calendar subscriptions without an user have been cleaned up
 - Write default encryption module configuration to the database
 - Copy default images to the app data directory
     - Icon external.svg already exists
     - Icon external-dark.svg already exists
     - Icon settings.svg already exists
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Update OAuth token expiration times
 - Create help command
 - Invalidate access cache for projects conversation provider
 - Cache the user display names
 - Switches from default updater server to the customer one if a valid subscription is available
 - Send an admin notification if monthly report is disabled
 - Add background job to check for backup codes
 - Populating added database structures for workflow

After a new test : no change

are you able to access any other setting then user



index.php/settings/user/security --> NOK
index.php/settings/user/privacy --> NOK
index.php/settings/admin/overview --> NOK
index.php/settings/admin/serverinfo --> NOK
index.php/settings/admin/logging --> NOK
index.php/settings/ --> NOK

I still don’t know how to restore access to the settings.

I don’t find how to fix this.

No idea ???

Did you install the GitHub integration app?
Can you try to disable this app via occ? https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#apps-commands

Hi SysKeeper,
Yes, integration_github and integration_gitlab are installed.
I’ve follow your suggest and I just have disable these both apps and after restart apache2.
No change.
Then I reboot the virtual machine. That persists.
Your good suggest gave me an idea.
I will try to disable all apps and if it work, I will enable apps one per one.
It’s 2:30 AM. It’s time to sleep. It’s for tomorrow (after the night :wink: ).

The error you posted above is related to GitHub integration. So you might want to check, why the classes can’t be resolved …

It’s fine !
I’ve disabled all additionnal applis.
The settings access is fixed.

Afterwards, I’ve enable most important applis without integration_github and integration_gitlab. It works :slight_smile:

Thanks for your help.