Internal server error - what to do

I updated some apps in Nextcloud and now I can’t access the webpage. I get and internal server error. All the apps on my android phone still can access and work however. I have included the config.php below. Since I cannot access the web server I am unsure how to access the server logs. Any help would be greatly appreciated.

Regards
Jamie

Nextcloud 25.0.13.2

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:

[/details]

Nextcloud version (eg, 20.0.5):25.0.13.2
Operating system and version (eg, Ubuntu 20.04): Debian
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.4): 7.3

The issue you are facing:
After updating a few apps in nextcloud I am no longer able to access the web interface. I get the dispay of internal server error. The apps on my phone are still able to access Nextcloud, and I can still access via the file manager on my laptop.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

 "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "CLI cron call has selected job with ID 295915",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "Run OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob job with ID 295915",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "recognize",
  "method": "",
  "url": "--",
  "message": "Classifying files of storage 5 using movinet",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "recognize"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "recognize",
  "method": "",
  "url": "--",
  "message": "fetching 20 files from movinet queue",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "recognize"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "recognize",
  "method": "",
  "url": "--",
  "message": "Running movinet classifier",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "recognize"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 3,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "core",
  "method": "",
  "url": "--",
  "message": "Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob, arguments: Array\n(\n    [storageId] => 5\n    [rootId] => 6705\n)\n)",
  "userAgent": "--",
  "version": "25.0.13.2",
  "exception": {
    "Exception": "OCA\\Recognize\\Exception\\Exception",
    "Message": "Movinet does not support WASM mode",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyMovinetJob.php",
        "line": 42,
        "function": "classify",
        "class": "OCA\\Recognize\\Classifiers\\Video\\MovinetClassifier",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifierJob.php",
        "line": 70,
        "function": "classify",
        "class": "OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyMovinetJob.php",
        "line": 33,
        "function": "runClassifier",
        "class": "OCA\\Recognize\\BackgroundJobs\\ClassifierJob",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/Job.php",
        "line": 78,
        "function": "run",
        "class": "OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 103,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php",
        "line": 93,
        "function": "start",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/cron.php",
        "line": 152,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/var/www/nextcloud/apps/recognize/lib/Classifiers/Video/MovinetClassifier.php",
    "Line": 36,
    "message": "Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob, arguments: Array\n(\n    [storageId] => 5\n    [rootId] => 6705\n)\n)",
    "exception": {},
    "CustomMessage": "Error while running background job (class: OCA\\Recognize\\BackgroundJobs\\ClassifyMovinetJob, arguments: Array\n(\n    [storageId] => 5\n    [rootId] => 6705\n)\n)"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "CLI cron call has selected job with ID 3",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "CLI cron call has selected job with ID 322259",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "Run OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob job with ID 322259",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 1,
  "time": "2023-12-15T22:30:04+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "dav",
  "method": "",
  "url": "--",
  "message": "Building calendar index (2739/2749)",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "dav"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 1,
  "time": "2023-12-15T22:30:19+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "dav",
  "method": "",
  "url": "--",
  "message": "New building calendar index job scheduled with offset 2739",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "dav"
  }
}
{
  "reqId": "KpBqUSsTroYaUxEBVp7i",
  "level": 0,
  "time": "2023-12-15T22:30:19+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "cron",
  "method": "",
  "url": "--",
  "message": "Finished OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob job with ID 322259 in 15 seconds",
  "userAgent": "--",
  "version": "25.0.13.2",
  "data": {
    "app": "cron"
  }
}
{
  "reqId": "PUNWiozjFEqit7gXb8W3",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/feeds?",
  "message": "new parser added : FeedIo\\Standard\\Json",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PUNWiozjFEqit7gXb8W3",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/feeds?",
  "message": "new parser added : FeedIo\\Standard\\Atom",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PUNWiozjFEqit7gXb8W3",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/feeds?",
  "message": "new parser added : FeedIo\\Standard\\Rss",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PUNWiozjFEqit7gXb8W3",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/feeds?",
  "message": "new parser added : FeedIo\\Standard\\Rdf",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PEaKnviiUuJmKpJr8Ck6",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/folders?",
  "message": "new parser added : FeedIo\\Standard\\Json",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PEaKnviiUuJmKpJr8Ck6",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/folders?",
  "message": "new parser added : FeedIo\\Standard\\Atom",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PEaKnviiUuJmKpJr8Ck6",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/folders?",
  "message": "new parser added : FeedIo\\Standard\\Rss",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}
{
  "reqId": "PEaKnviiUuJmKpJr8Ck6",
  "level": 0,
  "time": "2023-12-15T22:30:43+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "news",
  "method": "GET",
  "url": "/index.php/apps/news/api/v1-2/folders?",
  "message": "new parser added : FeedIo\\Standard\\Rdf",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.26.0",
  "version": "25.0.13.2",
  "data": {
    "app": "news"
  }
}



GNU nano 5.4      /var/www/nextcloud/config/config.php                
<?php
$CONFIG = array (
 'instanceid' => ',
 'passwordsalt' => '',
 'secret' => '',
 'trusted_domains' => 
 array (
   0 => 'nextcloud.##########',
 ),
 'datadirectory' => '/ncdata',
 'dbtype' => 'mysql',
 'version' => '25.0.13.2',
 'overwrite.cli.url' => 'https://nextcloud.######.ca',
 'dbname' => 'nextcloud',
 'dbhost' => 'localhost',
 'dbport' => '',
 'dbtableprefix' => 'oc_',
 'mysql.utf8mb4' => true,
 'dbuser' => '#########',
 'dbpassword' => '########',
 'installed' => true,
 GNU nano 5.4      /var/www/nextcloud/config/config.php                
 'default_phone_region' => 'CA',
 'memcache.local' => '\\OC\\Memcache\\Redis',
 'memcache.distributed' => '\\OC\\Memcache\\Redis',
 'redis' => 
 array (
   'host' => '/var/run/redis/redis-server.sock',
   'port' => 0,
 ),
 'maintenance' => false,
 'trusted_proxies' => 
 array (
   0 => '127.0.0.1',
   1 => '::1',
   2 => '192.168.2.1',
 ),
 'theme' => '',
 'loglevel' => 0,
 'app_install_overwrite' => 
 array (
   0 => 'richdocuments',
   1 => 'backup',
 2 => 'passwords',
 ),
 'mail_domain' => '##########',
 'mail_from_address' => '#############',
 'mail_smtpmode' => 'smtp',
 'mail_sendmailmode' => 'smtp',
 'mail_smtpauth' => 1,
 'memories.exiftool' => '/var/www/nextcloud/apps/memories/exiftool-bin>
 'memories.vod.path' => '/var/www/nextcloud/apps/memories/exiftool-bin>
 'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
 'memories.vod.ffprobe' => '/usr/bin/ffprobe',
n!):

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

at Dec 16 00:00:03.047679 2023] [mpm_prefork:notice] [pid 645] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Sat Dec 16 00:00:03.047711 2023] [core:notice] [pid 645] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 16 05:06:57.108811 2023] [php7:error] [pid 10138] [client ] script '/var/www/html/upl.php' not found or unable to stat
[Sat Dec 16 05:06:58.305490 2023] [php7:error] [pid 10673] [client ] script '/var/www/html/1.php' not found or unable to stat
[Sat Dec 16 05:06:59.508244 2023] [php7:error] [pid 10124] [client ] script '/var/www/html/password.php' not found or unable to stat
[Sat Dec 16 05:06:59.802551 2023] [php7:error] [pid 10684] [client ] script '/var/www/html/info.php' not found or unable to stat
[Sat Dec 16 11:32:09.656856 2023] [php7:error] [pid 13973] [client ] script '/var/www/html/upl.php' not found or unable to stat
[Sat Dec 16 11:32:11.380698 2023] [php7:error] [pid 14184] [client ] script '/var/www/html/1.php' not found or unable to stat
[Sat Dec 16 11:32:13.083352 2023] [php7:error] [pid 14183] [client ] script '/var/www/html/password.php' not found or unable to stat
[Sat Dec 16 11:32:13.506029 2023] [php7:error] [pid 12912] [client ] script '/var/www/html/info.php' not found or unable to stat
[Sat Dec 16 15:40:40.451316 2023] [mpm_prefork:notice] [pid 645] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Dec 16 15:40:40.537080 2023] [mpm_prefork:notice] [pid 16557] AH00163: Apache/2.4.56 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Sat Dec 16 15:40:40.537128 2023] [core:notice] [pid 16557] AH00094: Command line: '/usr/sbin/apache2'

PASTE HERE


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.

PASTE HERE

Please edit your post and remove the secrets. You should NEVER expose your secrets world readable on this forum.

Then please put the config in between the three backticks. This is markdown syntax. You got a template. It must be realy hard to not understand and destroy that!
That what you did and how you posted it - with due respect - is a mess.

Much luck,
ernolf

2 Likes

Your NC log will be located in your datadirectory.

From what I could decipher from your config, I’d expect it to be found at /ncdata/nextcloud.log.

It will give you the clues you need.

You also appear to have debug logging on (log level 0). I would change that to someone reasonable like 2 because otherwise your logs will be filled with lots of noise. It also impacts performance.

1 Like

Thanks for the help. I apologize for my ignorance. This is not something I have enough time to get halfway good at. However I am very into privacy and security and having all my own data on site.

Regards
Jamie

Hey, thanks for poiting me to the location of my log file. However when I look at it. It doesn’t mean anything.

Regards
Jamie

One does not open logfiles with an editor and then post the truncated lines. That way …

exactly.

You should open it with jq, the commandline json processor (apt-get install jq) instead, since the nextcloud logfile is json formatted.

You can either open it directly with jq:

jq /ncdata/nextcloud.log

or tail -F and then pipe it through jq, to see it in realtime:

tail -F /ncdata/nextcloud.log | jq

Then the server error log would be interesting to see but you did not fill out the complete template. Your Webserver is missing, your Server Operating System is missing etc.
If your Server is running Ubuntu/debian and your webserver is apache, then your webserver error log is located in

`/var/log/apache2/error.log’

Much luck,
ernolf

1 Like

Hey Ernolf, thank you for all the help so far. I have updated my server as suggested and uploaded the corrected log files.

Regards
Jamie

Can you maybe just do a "tail -f /ncdata/nextcloud.log` while you try to connect to your NC server in your web browser? Then post the log entry that appears when you get the internal server error.

The ones you posted don’t appear to be related.

Hi, I ran that as suggested and got this output:
],
“File”: “/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenMapper.php”,
“Line”: 89
},
“message”: “Token is not valid: Token does not exist: token does not exist”,
“exception”: {},
“CustomMessage”: “Token is not valid: Token does not exist: token does not exist”
}

I am prety sure, that you got way more output.
And it would be from interest, what you did in the browser before you get an internal server error.
Did you try it from an other browser or better from an incognito tab as well?

Then you should please always post logfile echoes in a fenced codeblock. You get a fenced codeblock with “Ctrl + e” while editing your post in this forum.

Much luck,
ernolf

1 Like