Internal Server Error (NextcloudPi)

Support intro

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:

example

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

longer
example
here

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 (eg, 20.0.5): 20.0.8.1
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.4): PHP 7.3.27-9+0~20210227.82+debian10~1.gbpa4a3d6 (cli) (built: Feb 27 2021 15:50:50) ( NTS )

The issue you are facing:

Getting 2 problems,

the first is that when i run sudo ncp-config I get cat: /var/run/.ncp-latest-version: No such file or directory
second that when I try accessing my Nextcloud, and I don’t exactly since when but I think after updating some apps, 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.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YEigLAXVzBPAmT9TjhOxTwAAAAI","level":3,"time":"2021-03-10T10:32:12+00:00","remoteAddr":"2a01:e0a:8b8:7d20:e965:4dbb:f9b:da64","user":"--","app":"remote","method":"GET","url":"/status.php","message":{"Exception":"OC\\HintException","Message":"Memcache \\OC\\Memcache\\Redis not available for local cache","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Server.php","line":677,"function":"__construct","class":"OC\\Memcache\\Factory","type":"->","args":["32a6b44dd558b1e4955f3adca9b452c4",{"__class__":"OC\\Log"},"\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Memcache\\Factory",true]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":1677,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":1017,"function":"getMemCacheFactory","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCP\\Lock\\ILockingProvider",true]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":1977,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":118,"function":"getLockingProvider","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":395,"function":"__construct","class":"OC\\Files\\View","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Files\\Node\\HookConnector"]},{"file":"/var/www/nextcloud/lib/private/ServerContainer.php","line":156,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Files\\Node\\HookConnector",true]},{"file":"/var/www/nextcloud/lib/private/Server.php","line":1324,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Files\\Node\\HookConnector"]},{"file":"/var/www/nextcloud/lib/base.php","line":595,"function":"boot","class":"OC\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/base.php","line":1091,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/nextcloud/status.php","line":37,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Memcache/Factory.php","Line":98,"Hint":"Is the matching PHP module installed and enabled?","CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/3.1.3stable-Win64 (build 20210218) (Nextcloud)","version":"20.0.8.1"}

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

<?php
$CONFIG = array (
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => '',
    1 => '',
    2 => '',
    21 => '',
    12 => '',
    22 => 'nextcloud.local',
    20 => '',
  ),
  'datadirectory' => '/media/USBDRIVE5/ncdata',
  'dbtype' => 'mysql',
  'version' => '20.0.8.1',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => 'oclaqn5ofjmm',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '',
  ),
  'tempdirectory' => '/var/www/nextcloud/data/tmp',
  'mail_smtpmode' => 'smtp',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'loglevel' => 0,
  'log_type' => 'file',
  'maintenance' => false,
  'logfile' => '/media/USBDRIVE5/ncdata/nextcloud.log',
  'theme' => '',
  'mail_sendmailmode' => 'smtp',
  'htaccess.RewriteBase' => '/',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '',
  'mail_smtppassword' => '.',
  'mail_smtpsecure' => 'ssl',
  'app_install_overwrite' =>
  array (
    0 => 'defaultlinkopen',
    1 => 'social',
    2 => 'admin_notifications',
    3 => 'theming_customcss',
    4 => 'drawio',
    5 => 'dropit',
    6 => 'sharerenamer',
    7 => 'external',
    8 => 'files_accesscontrol',
    9 => 'nextcloudpi',
    10 => 'occweb',
    11 => 'files_external_gdrive',
  ),
  'updater.release.channel' => 'stable',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'cloud',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '465',
  'data-fingerprint' => 'cd n',
);

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

[Wed Mar 10 03:48:34.490538 2021] [ssl:warn] [pid 963] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Mar 10 03:48:34.490986 2021] [http2:warn] [pid 963] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Mar 10 03:48:34.492114 2021] [mpm_prefork:notice] [pid 963] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1j configured -- resuming normal operations
[Wed Mar 10 03:48:34.492163 2021] [core:notice] [pid 963] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 10 10:26:21.119563 2021] [mpm_prefork:notice] [pid 963] AH00169: caught SIGTERM, shutting down
[Wed Mar 10 10:26:48.587690 2021] [ssl:warn] [pid 798] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Mar 10 10:26:48.642289 2021] [ssl:warn] [pid 954] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Mar 10 10:26:48.642678 2021] [http2:warn] [pid 954] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Mar 10 10:26:48.648741 2021] [mpm_prefork:notice] [pid 954] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1j configured -- resuming normal operations
[Wed Mar 10 10:26:48.648953 2021] [core:notice] [pid 954] AH00094: Command line: '/usr/sbin/apache2'

Thanks for your help

and

should be same path as datadir

/media/USBDRIVE5/ncdata/tmp

Did you use nc-restore?
Run ncp-report (post via pastebin or similar) more info needed, to assist.

Can also check tmp_dir in php.ini files

I didn’t use nc-restore…

nc-report: NextCloudPi diagnostics - Pastebin.com