Internal server error, where is the log?

I just installed Nextcloud. I tried the web installer and installed all the dependencies it asked for. Unfortunately, the web installer didn’t work, so I had to use the tarball method. Now I have it installed, but trying to use it gives me “Internal Server Error
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.” Which log is it talking about? What else might I have to do?

most likely nextcloud.log which is in the data folder (/var/www/nextcloud/data) . The path is defined in config/config.php.

tell us your os, database, webserver and the config of them.

OS: Raspbian Buster, default configuration
Webserver: Apache 2.4.38-3, default configuration other than getting a letsencrypt cert and enabling php
Database: I don’t know

I installed to /var/www/html/nextcloud. The data folder does not exist, and config/config.php does not exist.

the php setup skript didn’t run.

you should check the apache log in /var/log. i guess php isn’t installed correct.

I have /var/log/apache2/, which contains access.log, access.log.1, error.log, error.log.1, and other_vhosts_access.log. Which one of these should I look in, or should I be looking somewhere else?

normally you would check all of them.
the ones with “.1” at the end are older ones.

try tail -f /var/log/apache2/access.log and click on the reload button of your browser.

access.log:

192.168.1.254 - - [11/Sep/2019:20:53:14 -0700] "GET /nextcloud/ HTTP/1.1" 200 1079 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:14 -0700] "GET /nextcloud/index.php HTTP/1.1" 500 4840 "https://<server subdomain>/nextcloud/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:14 -0700] "GET /nextcloud/core/js/dist/main.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 374055 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/oc-dialogs.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 10369 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/js.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 12230 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/mimetypelist.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 1558 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/select2-toggleselect.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 992 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/oc-requesttoken.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 542 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 6451 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/files/fileinfo.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 1256 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/search/js/search.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 2010 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/mimetype.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 1724 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/js/files/client.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 6065 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:15 -0700] "GET /nextcloud/core/search/js/searchprovider.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 4117 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:16 -0700] "GET /nextcloud/core/img/logo/logo.svg?v=1 HTTP/1.1" 304 204 "https://<server subdomain>/nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:16 -0700] "GET /nextcloud/core/img/background.png?v=2 HTTP/1.1" 304 206 "https://<server subdomain>/nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:16 -0700] "GET /nextcloud/core/fonts/Nunito-Regular.woff2 HTTP/1.1" 304 205 "https://<server subdomain>/nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:16 -0700] "GET /nextcloud/core/fonts/Nunito-Bold.woff2 HTTP/1.1" 304 205 "https://<server subdomain>/nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"
192.168.1.254 - - [11/Sep/2019:20:53:17 -0700] "GET /nextcloud/core/img/manifest.json HTTP/1.1" 304 3980 "https://<server subdomain>/nextcloud/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.72 Safari/537.36"

error.log:

[Wed Sep 11 20:57:09.790011 2019] [php7:warn] [pid 5620] [client 192.168.1.254:59186] PHP Warning:  fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
[Wed Sep 11 20:57:09.790054 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/status.php","message":"fopen(\\/var\\/www\\/html\\/nextcloud\\/config\\/config.php): failed to open stream: No such file or directory at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Config.php#241","userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}
[Wed Sep 11 20:57:09.790338 2019] [php7:warn] [pid 5620] [client 192.168.1.254:59186] PHP Warning:  fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
[Wed Sep 11 20:57:09.790378 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/status.php","message":"chmod(): No such file or directory at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Config.php#244","userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}
[Wed Sep 11 20:57:09.794025 2019] [php7:warn] [pid 5620] [client 192.168.1.254:59186] PHP Warning:  fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
[Wed Sep 11 20:57:09.794129 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/status.php","message":"fileperms(): stat failed for \\/var\\/www\\/html\\/nextcloud\\/data\\/nextcloud.log at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}
[Wed Sep 11 20:57:09.794191 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"remote","method":"GET","url":"\\/nextcloud\\/status.php","message":{"Exception":"OC\\\\HintException","Message":"Can't write into config directory!","Code":0,"Trace":[{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Config.php","line":132,"function":"writeData","class":"OC\\\\Config","type":"->","args":[]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/SystemConfig.php","line":100,"function":"setValue","class":"OC\\\\Config","type":"->","args":["instanceid","occlnrqspsve"]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/legacy\\/util.php","line":1152,"function":"setValue","class":"OC\\\\SystemConfig","type":"->","args":["instanceid","occlnrqspsve"]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/base.php","line":415,"function":"getInstanceId","class":"OC_Util","type":"::","args":[]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/base.php","line":642,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/base.php","line":1056,"function":"init","class":"OC","type":"::","args":[]},{"file":"\\/var\\/www\\/html\\/nextcloud\\/status.php","line":36,"args":["\\/var\\/www\\/html\\/nextcloud\\/lib\\/base.php"],"function":"require_once"}],"File":"\\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Config.php","Line":251,"Hint":"This can usually be fixed by giving the webserver write access to the config directory. See https:\\/\\/docs.nextcloud.com\\/server\\/16\\/go.php?to=admin-dir_permissions","CustomMessage":"--"},"userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}
[Wed Sep 11 20:57:09.794770 2019] [php7:warn] [pid 5620] [client 192.168.1.254:59186] PHP Warning:  fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
[Wed Sep 11 20:57:09.794819 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/status.php","message":"fileperms(): stat failed for \\/var\\/www\\/html\\/nextcloud\\/data\\/nextcloud.log at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Log\\/File.php#140","userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}
[Wed Sep 11 20:57:09.794874 2019] [php7:notice] [pid 5620] [client 192.168.1.254:59186] {"reqId":"F85kKUUPCePQmi9l2qMo","level":3,"time":"2019-09-12T03:57:09+00:00","remoteAddr":"192.168.1.254","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/status.php","message":"chmod(): No such file or directory at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Log\\/File.php#141","userAgent":"Mozilla\\/5.0 (Linux) mirall\\/2.5.3git (Nextcloud)","version":""}

That looks like an error 500 to me. Is it an error 500? If so, how do I fix it?

I figured out the problem. I didn’t have a database server of any kind installed, and I also didn’t have a database driver.

Hi, All, I am getting this error when I try to download SSO & SAML authentication metadata XML file. Also, I am not getting any error log for this. Any help will appreciate.

Hello @rakibulinux ,

welcome to the community of Nextcloud.

You responded to an old topic which has been marked as solved.
Open a new one instead.

Please add all necessary information like Nextcloud version, webserver type and version, os version.

Without additional information the community members cannot help you .

Hi All,

Recently I faced the same issue.

This was occurred due to a change in the “config file”, located in the installation folder of nextcloud (config/config.php). I had recently changed my database password and it has affected my nextcloud.

Please check your configuration once.

Hello Everyone,
please help me!!!
When I configured SSO & SAML Authentication and login to nextcloud via SSO I got an error like this:


OS: ubuntu 18.04, nextcloud version 20,apache2,mariadbserver
file log:
58 log server

Wow, its quite shocking to see the developers’ attitudes towards logging the lack of understanding and support given to those that need to interpret these logs.

For those that need help, here’s what I’ve found.

There is a useful log in (debian location) /var/www/html/data/nextcloud.log or /var/html/data/nextcloud/data/nextcloud.log

To make things more fun, the devs didn’t simply save logs. No no, they store the logs in JSON format. So you’ll get a really hard to read format of text returned if you tail the log file.

I get why they chose to do this. But pointing someone to a web based log reader, when the web interface is down, is just counter productive.

After some googling, I found that one can post process the file after tailing it. This makes it human readable.

tail -f /var/www/html/data/nextcloud.log | jq

If you get an error about jq being missing, just install it from the apt repo with sudo apt install jq

2 Likes

So can you fix the above error, please help me
file log:
image

@an_R_key

keep in mind what I have said here… --> Log file readability

when I had that error I had to do the chown line

https://docs.nextcloud.com/server/20/admin_manual/installation/example_ubuntu.html#next-steps
then clicked apache web server configuration Installation on Linux — Nextcloud latest Administration Manual latest documentation

ran this line chown -R www-data:www-data /var/www/nextcloud/

(or equivalent path), and then was fine.