NC 18 broken after move on new server!


I have a very boring problem while moving an NC18 instance from an ubuntu shared hosting server to an other one. Both servers are similar (Ubuntu, MySQL, PHP 7, Apache 2). Once moved on new server, I just get a general failure and that’s it ! Nothing in error.log or in the nextcloud.log file :frowning:

Thanks for ideas (below all technical details I could find)


Nextcloud version: 18.02 or 180.3 (not sure)
Operating system and version: Ubuntu 16.04 to Ubuntu 18.04
Apache or nginx version: Apache 2.4.18 to Apache 2.4.29
PHP version: 7.3.13 to 7.2.24

The issue you are facing:

I only get that error message in web access at NC once moved on new server:

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.

Is this the first time you’ve seen this error?: yes since the move

The output of your Nextcloud log in Admin > Logging:

Can’t access it and nextcloud.log file is empty

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

$CONFIG = array (
  'instanceid' => 'hidden',
  'passwordsalt' => 'hidden',
  'secret' => 'hidden',
  'trusted_domains' => 
  array (
    0 => '',
  'datadirectory' => '/home/iqrlx6752/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'iqrlx6752',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'iqrlx6752',
  'dbpassword' => 'mypassword',
  'installed' => true,
  'mail_from_address' => 'info',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'mail_smtpname' => 'iqrlx6752',
  'mail_smtppassword' => 'mypassword',
  '' => 'beta',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '$2y$10$.GtQZ7ITIC/gaC',

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

Unhappy nothing logged from apache :frowning:

Check your database log for failed logins. Often internal server error with Nextcloud is because it couldn’t connect to the database.

Oh yep good point, the migration script was supposed to handle that properly but it looks like it did not ! MySQL logs were full of denied access ! I fixed the problem but now I have that weird message in NC log file:

{"reqId":"fg7VEBwlqkdRwodG9FDT","level":4,"time":"2020-05-28T15:44:02+00:00","remoteAddr":"2a01:XXXX:XXXX:b300:7929:2e3c:28a6:bf30","user":"clement","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/clement/","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"OC\\HintException: Downgrading is not supported and is likely to cause unpredictable issues (from to","Code":0,"Trace":[{"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"/home/iqrlx6752mcguyj0/public_html/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[{"__class__":"Closure"},["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]]},{"file":"/home/iqrlx6752mcguyj0/public_html/3rdparty/sabre/dav/lib/DAV/Server.php","line":466,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["beforeMethod",["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]]},{"file":"/home/iqrlx6752mcguyj0/public_html/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/home/iqrlx6752mcguyj0/public_html/remote.php","line":74,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/home/iqrlx6752mcguyj0/public_html/remote.php","line":168,"function":"handleException","args":[{"__class__":"OC\\HintException"}]}],"File":"/home/iqrlx6752mcguyj0/public_html/remote.php","Line":72,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":""}

I didn’t do any upgrade or anything on it since I moved it on new server so not sure why it says such thing :frowning: What can I check or do next ? or should I try an upgrade with occ command line tool ?

Side note: MySQL errors have disappeared so it looks like db problem is solved !



It sounds like maybe you don’t have the latest patch of NC 18 on the new server. The latest version is at least 18.0.4.x.

yep for sure it was in version 18 but not the latest one before move but it should not prevent it to work ! Should I try the upgrade in command line with occ ?

According to the error, you had 18.0.3 on the original server, and you have 18.0.0 in the new one. You need to update the Nextcloud server software on the new server. How you do that depends on your installation method.

Well in fact it was my fault when I updated db settings in config file of NC :wink: corrected my mystake and now everytihing is fine :wink:

Thanks for all help,