Internal Server Error at browser login page

I had Nextcloudpi up and running for a year straight with no issues thanks to the tremendous development effort here. Many thanks and kudos!

Unfortunately, I had to move my server to a new house, and it stopped working.

I updated the dynamic DNS and added the new IP to the trusted domains, but when I try to access the page, I get an error message at the login screen (using firefox, see below). It appears to have something to do with 3rd party libraries, but I have not been able to figure out a fix. Any help would be appreciated.

Interestingly, the desktop and android apps still work just fine!

Error at login screen:

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.
Technical details

    Remote Address: xx.xxx.xx.xx
    Request ID: XydCm--KQuKrJ2iN9rWpKgAATRY

Output of sudo cat /media/USBdrive/nextcloud/data/nextcloud.log | tail

{"reqId":"XydCm--KQuKrJ2iN9rWpKgAATRY","level":3,"time":"2020-08-02T22:47:56+00:00","remoteAddr":"xx.xxx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/index.php/login","message":"include(/var/www/nextcloud/3rdparty/composer/../punic/punic/code/Exception/DataFileNotFound.php): failed to open stream: No such file or directory at /var/www/nextcloud/lib/composer/composer/ClassLoader.php#444","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0","version":"18.0.7.1"}
{"reqId":"XydCm--KQuKrJ2iN9rWpKgAATRY","level":3,"time":"2020-08-02T22:47:56+00:00","remoteAddr":"xx.xxx.xx.xx","user":"--","app":"PHP","method":"GET","url":"/index.php/login","message":"include(): Failed opening '/var/www/nextcloud/3rdparty/composer/../punic/punic/code/Exception/DataFileNotFound.php' for inclusion (include_path='/var/www/nextcloud/apps/news/vendor/pear/net_url2:/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps') at /var/www/nextcloud/lib/composer/composer/ClassLoader.php#444","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0","version":"18.0.7.1"}
{"reqId":"XydCm--KQuKrJ2iN9rWpKgAATRY","level":3,"time":"2020-08-02T22:47:56+00:00","remoteAddr":"xx.xxx.xx.xx","user":"--","app":"index","method":"GET","url":"/index.php/login","message":{"Exception":"Error","Message":"Class 'Punic\\Exception\\DataFileNotFound' not found","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/punic/punic/code/Data.php","line":465,"function":"getGeneric","class":"Punic\\Data","type":"::","args":["parentLocales"]},{"file":"/var/www/nextcloud/3rdparty/punic/punic/code/Data.php","line":529,"function":"explodeLocale","class":"Punic\\Data","type":"::","args":["en"]},{"file":"/var/www/nextcloud/3rdparty/punic/punic/code/Data.php","line":503,"function":"getLocaleAlternatives","class":"Punic\\Data","type":"::","args":["en"]},{"file":"/var/www/nextcloud/3rdparty/punic/punic/code/Data.php","line":142,"function":"getLocaleFolder","class":"Punic\\Data","type":"::","args":["en"]},{"file":"/var/www/nextcloud/3rdparty/punic/punic/code/Calendar.php","line":743,"function":"get","class":"Punic\\Data","type":"::","args":["calendar","en"]},{"file":"/var/www/nextcloud/lib/private/L10N/L10N.php","line":175,"function":"getDateFormat","class":"Punic\\Calendar","type":"::","args":["short","en"]},{"file":"/var/www/nextcloud/lib/private/L10N/LazyL10N.php","line":61,"function":"l","class":"OC\\L10N\\L10N","type":"->","args":["jsdate",null,[]]},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":186,"function":"l","class":"OC\\L10N\\LazyL10N","type":"->","args":["jsdate",null]},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":167,"function":"fetchPage","class":"OC_Template","type":"->","args":[{"alt_login":[]}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":123,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\LoginController"},"showLoginForm"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\LoginController","showLoginForm",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.login.showLoginForm"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"core.login.showLoginForm"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"core.login.showLoginForm"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/login"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/punic/punic/code/Data.php","Line":194,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0","version":"18.0.7.1"}

And the general output of sudo cat /var/www/nextcloud/config/config.php

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.1.104',
    4 => 'mydomain.name.com',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => 'xx.xxx.xx.xx old_IP',
    20 => 'xx.xxx.xx.xx new_IP',
    12 => 'mydomain.name.com',
  ),
  'datadirectory' => '/media/USBdrive/nextcloud/data',
  'overwrite.cli.url' => 'https://mydomain.name.com/',
  'dbtype' => 'mysql',
  'version' => '18.0.7.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxx',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'instanceid' => 'xxxxx',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'xxxxx',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'xxxxx',
  'mail_domain' => 'xxxxx.com',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/USBdrive/nextcloud/data/nextcloud.log',
  'loglevel' => '2',
  'log_type' => 'file',
  'theme' => '',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.xxxxx.com',
  'mail_smtpport' => 'xxx',
  'mail_smtpname' => 'xxxxx',
  'mail_smtppassword' => 'xxxxx',
  'jpeg_quality' => '60',
  'data-fingerprint' => 'xxxxx',
);

Hi,

are there any errors in your webserver log?

Thanks for the quick reply. I’m not very familiar with the relevant log files. I checked logs in /var/log and various sub folders, but nothing stood out. Is there a particular file that I should paste?

Maybe the last entry in the faq regarding the logs helps you
https://docs.nextcloudpi.com/de/faq/faq/

1 Like

Thanks for the link. I had a look at sudo ncp-report. Most of that information was already included in my original post, but here is the rest:


Cannot load Zend OPcache - it was already loaded
NextCloudPi version  v1.28.1
NextCloudPi image    NextCloudPi_03-09-19
distribution         Raspbian GNU/Linux 10 \n \l
automount            yes
USB devices          sda sdb 
datadir              /media/USBdrive/nextcloud/data
data in SD           no
data filesystem      ext2/ext3
data disk usage      252G/3.6T
rootfs usage         2.6G/29G
swapfile             /media/USBdrive/swapfile/swap
dbdir                /media/USBdrive/ncdatabase
Nextcloud check      ok
Nextcloud version    18.0.7.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               22:40

None of the other log files show anything that seems relevant. As a further, even stranger note, accessing the web interface works fine from my android phone. But I tried chromium browser on a desktop, and that gave the same error message as with Firefox.

Okay, but you must provide some other logs to help you, this is not enough information. There is also a hint about the apache logs.

Did you just move the server or also update something?

Thank you again for your reply.

Here are some more logs from /var/log/apache2/, viewed immediately after receiving the error on the website. There is nothing else in this folder that seems even remotely relevant (e.g. other_vhosts_access.log, and lots of old backups of these same logs) - they are not even updated when the error occurs. If specific log files would help, please list the log file by name.

I receive this error before doing any upgrades of any kind. After receiving the error, I upgraded apps and maybe even nextcloud to the newest version, and nothing changed.

nc-error.log

[Sat Aug 15 15:34:58.153321 2020] [access_compat:error] [pid 27241:tid 1613730848] [client IP:51814] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Sat Aug 15 16:54:42.278306 2020] [access_compat:error] [pid 27242:tid 1596945440] [client IP:57876] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Sat Aug 15 16:55:51.744957 2020] [access_compat:error] [pid 27242:tid 1512985632] [client IP:57902] AH01797: client denied by server configuration: /var/www/nextcloud/config

error.log

[Sat Aug 15 00:00:02.151727 2020] [ssl:warn] [pid 769:tid 1996235280] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 15 00:00:02.154568 2020] [mpm_event:notice] [pid 769:tid 1996235280] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Sat Aug 15 00:00:02.154598 2020] [core:notice] [pid 769:tid 1996235280] AH00094: Command line: '/usr/sbin/apache2'

nc-access.log

IP - - [15/Aug/2020:20:28:46 +0100] "GET /index.php/login HTTP/2.0" 500 6566 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /apps/files_sharing/js/dist/main.js?v=adcac48e-0 HTTP/2.0" 200 1172 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /core/search/js/search.js?v=adcac48e-0 HTTP/2.0" 200 1636 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /apps/files_pdfviewer/js/previewplugin.js?v=adcac48e-0 HTTP/2.0" 200 2302 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /apps/files_videoplayer/js/main.js?v=adcac48e-0 HTTP/2.0" 200 2768 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /core/js/files/fileinfo.js?v=adcac48e-0 HTTP/2.0" 200 945 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /core/js/files/client.js?v=adcac48e-0 HTTP/2.0" 200 5779 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /apps/apporder/js/apporder.js?v=adcac48e-0 HTTP/2.0" 200 1104 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /core/search/js/searchprovider.js?v=adcac48e-0 HTTP/2.0" 200 3784 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /index.php/apps/theming/js/theming?v=0 HTTP/2.0" 200 511 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /index.php/apps/accessibility/js/accessibility?v=0 HTTP/2.0" 200 126 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:46 +0100] "GET /core/js/dist/login.js?v=adcac48e-0 HTTP/2.0" 200 233553 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:47 +0100] "GET /index.php/apps/theming/image/logo?v=0&useSvg=1 HTTP/2.0" 200 19311 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:47 +0100] "GET /core/js/dist/main.js?v=adcac48e-0 HTTP/2.0" 200 427085 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:48 +0100] "GET /core/img/loading-dark.gif HTTP/2.0" 200 4798 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:48 +0100] "GET /core/img/actions/toggle.svg HTTP/2.0" 200 365 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
IP - - [15/Aug/2020:20:28:48 +0100] "GET /core/img/favicon-touch.png HTTP/2.0" 200 3000 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"

Hi,

I have posted all the relevant logs, is there any way to figure out what is going on here? This is still not resolved and continues to be a problem when attempting to access the server through the web interface.

I have a work around by using “responsive design mode” in firefox to mimic a mobile device, but this is hardly ideal.

Any help would be appreciated.