Internal server error on web interface

Nextcloud version (eg, 18.0.2): 18.0.1.3
Operating system and version (eg, Ubuntu 20.04): ubuntu 18.04.3LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): 7.3.10

Hello,

i’m facing “internal server error” on web interface right after login no matters the user(ldap or not).
I tried to restore the server from full backup from two months ago and still get the error.
Client sync works normally.
I think i did not mak any change by myself except nextcloud update.

thankds for your help

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. reach web interface from ip or name
  2. Log with any user

The output of your Nextcloud log in Admin > Logging:

{"reqId":"SwNfjTkEsQjdtkNVgK58","level":3,"time":"2020-05-14T10:17:51+00:00","remoteAddr":"192.168.177.104","user":"rousselet","app":"PHP","method":"GET","url":"/index.php/apps/files/","message":"file_put_contents(/mnt/share/data/appdata_oce3f7e54d18/css/icons/icons-vars.css): failed to open stream: Permission denied at /var/www/owncloud/lib/private/Files/Storage/Local.php#222","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.1.3"}
{"reqId":"SwNfjTkEsQjdtkNVgK58","level":3,"time":"2020-05-14T10:17:51+00:00","remoteAddr":"192.168.177.104","user":"rousselet","app":"index","method":"GET","url":"/index.php/apps/files/","message":{"Exception":"OCP\\Files\\GenericFileException","Message":"file_put_contents failed","Code":0,"Trace":
{"reqId":"SwNfjTkEsQjdtkNVgK58","level":3,"time":"2020-05-14T10:17:52+00:00","remoteAddr":"192.168.177.104","user":"rousselet","app":"PHP","method":"GET","url":"/index.php/apps/files/","message":"chmod(): Operation not permitted at /var/www/owncloud/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.1.3"}

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

<?php
$CONFIG = array (
  'instanceid' => '***',
  'passwordsalt' => '***',
  'trusted_domains' =>
  array (
    0 => '*****',
    1 => '*****',
    2 => '*****7',
    3 => '*****',
  ),
  'datadirectory' => '/mnt/share/data',
  'dbtype' => 'mysql',
  'version' => '18.0.1.3',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_root',
  'dbpassword' => '***',
  'installed' => true,
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'loglevel' => '1',
  'forcessl' => true,
  'mail_domain' => '*****',
  'mail_from_address' => '*****',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => '*****',
  'mail_smtpport' => '25',
  'ldapIgnoreNamingRules' => false,
  'theme' => '',
  'maintenance' => false,
  'secret' => '*****',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => 'auto',
  'updater.release.channel' => 'stable',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'overwrite.cli.url' => '*****',
  'mysql.utf8mb4' => true,
  'app_install_overwrite' =>
  array (
    0 => 'spreed',
    1 => 'files_photospheres',
    2 => 'sharerenamer',
  ),
  'updater.secret' => '*****',
  'mail_sendmailmode' => 'smtp',

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

[Thu May 14 12:17:48.021182 2020] [mpm_prefork:notice] [pid 12110] AH00169: caught SIGTERM, shutting down
[Thu May 14 12:17:48.152925 2020] [ssl:warn] [pid 15365] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 14 12:17:48.665957 2020] [ssl:warn] [pid 15381] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name

you should update to the latest available stable version since this version is known to be buggy.

check ownership and permissons… (on whole owncloud-folder incl. subdirectories) -
check remaining space

please urgently remove instanceid, passwordsalt and dbpasswordfrom this posting. though you should consider your instance as being compromised from now on :frowning:

which kind of ssl do you use?

Thank for your answer.

I user LE as server certificate.

Before restoring, i was in 18.0.3.
I followed your advice and :

  • check for permissions ==> ok
  • try to upgrade to 18.0.4 and get:

a lot of warning during update:

PHP Warning: unlink(/mnt/share/data/updater-oce3f7e54d18/backups/nextcloud-18.0.1.3/apps/text/l10n/es_GT.js): Permission denied in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 769

[✘] Create backup failed
Could not rmdir /mnt/share/data/updater-oce3f7e54d18/backups/nextcloud-18.0.1.3/

Update failed. To resume or retry just execute the updater again.

Files are on windows file server mounted with smb on fstab

Following those error i found the problem, i had to specify the domain to mount correctly data directory. Never had to before.

Thanks for pointing me to the right direction

1 Like