Nextcloud Files error after upgrade

Hi there, I have 10 NS8 installs on Rocky 9.4 that are running Nextcloud. After the recent update, 4 of those servers now receive this error when accessing the files app through the web interface:

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.

As long as I add it to the the URL typed in, I can get to anything else within the Nextcloud interface including settings and apps.

I am not seeing any errors in logs, but perhaps I’m not looking in the correct place???

Any thoughts would be helpful. One of these was upgraded from Beta 2, but the other 3 were not.

Anything relevant on nextcloud log page?
Have you tried disabling apps?
Are all the nextcloud instance services running (nextcloud-redis et al)?

runagent -m nextcloud1 systemctl --user try-reload-or-restart nextcloud nextcloud-{redis,db,app,nginx}
1 Like

All of the instances are running, and I do not see anything that raises a flag in the log. I have not disabled any apps to this point.

Just a blind shot but in this old thread a similar issue is solved by correcting file ownership.

Owner and group should be www-data.

[root@ns8rockytest ~]# runagent -m nextcloud1 podman exec -ti nextcloud-app ls -l data
total 0
drwxr-xr-x    3 www-data www-data        19 Aug  7 17:45 FC4FF7A8-1083-4F78-9CCC-FCCF1C56790B
drwxr-xr-x    3 www-data www-data        19 Aug  7 17:42 admin
drwxr-xr-x    7 www-data www-data        86 Aug  7 17:50 appdata_ocp6h2hobfqv
drwxr-xr-x    2 www-data www-data        27 Aug  7 17:45 files_external
-rw-r--r--    1 www-data www-data         0 Aug  7 17:42 index.html
1 Like

Thank you for the thought, I do show everything being owned by www-data

I’ve now tried disabling apps and that did not help either. Files itself can’t be disabled.

Does it occur with all Nextcloud users?

Hi @Socs28

A shot in the dark:

I had this issue once on NS8 and nothing seem to work. My Nextcloud uses Samba shares on the same NS8.

I logged in as AD Admin and removed all external shares.

It worked again.

Reenabling all shares worked again, as nothing had happened.

As always: don’t forget to make a Backup first!

My 2 cents
Andy

It does happen for all users, and I don’t have any external storages setup on this server

Are all relevant services running as shown in the status page:

If one of the services is not running, it needs to be (re)started, but finding the root cause would be better.

HTH

Yes, all the services are running, and I’ve restarted them just to make sure. I’m wondering if there is a log that I’m missing or a way to get a more verbose log. In ns7 I knew what I was doing, in NS8 all I know of is the log that you can get to within the module, and then the base system logs via command line.

The “Internal Server Error” message is shown on a blank page (probably from nginx web-server) or it is formatted as a nextcloud page with a “Technical details section” and a “Request ID” (the request id can be used to search and pinpoint the problem)?
If you can access some nextcloud pages I guess is the latter option.

On the Files app, it shows OK but without listing the files or doesn’t show anything other than the error?

Currently installed Nextcloud version is Nextcloud Hub 6 (27.1.11)?

On NS8 you can see the log for the NS8 nextcloud app instance (unified view of internal modules/services).

On Nextcloud’s Logging section (as admin) you can see nextcloud.log and if more verbose info is needed it is possible to increase log verbosity to debug level (for a short period of time, undoing changes later):

Sometimes you can see other errors on your web-browser console.

Every time I see something like this, this comes to mind… :thinking:

NethServer 8: Open Source application platform for Hybrid Cloud

Provide a simplified yet comprehensive experience for deploying, managing, and scaling your container-based applications

???

The error is on a blank page.

Where are the nginx logs on NS8?

Yes, I’m on 27.1.11

I’ve run the command to set nextcloud logs to debug, but I’m still not seeing anything in the nextcloud logs that indicates a problem.

could be nginx, could be redis…

They are shown within the unified NS8 system logs section for the nextcloudX app.

Without additional information from logs, one of the things you can try is:

runagent -m nextcloud1 occ maintenance:repair

…replacing nextcloud1 with the correct instance. It could take awhile.

I ran this, no change.

Can you try with this (as reported for similar error as a bug):

runagent -m nextcloud1 occ files:scan-app-data

or check in nextcloud log if it reports a failure related to merged-template-prepend.js.deps

Without any prove/hint is hard to tell if you are facing exactly the same error

I ran this and got an output for folders files and elapsed time. No errors. I searched the log files for merged-template-prepend.js.deps and did not find anything.

the main nextcloud.log (what is shown on nextcloud’s UI Logging section) is located:

For instance, using grep to filter results (although log is not so reader-friendly being json one-liners):

runagent -m nextcloud1 podman exec -ti nextcloud-app grep -Ei "(error|warn|fail|miss)" /var/www/html/data/nextcloud.log

or watch the log with tail, then try to access files section and then check what comes up in the log.

OK, thank you so much. I had to cd to the directory nextcoud is in under /home in order to follow the file, but I found an error regarding the antivirus for files app. I’ve disabled it before, but I think I disabled to many things at once and it broke things then. I’ve disabled it and now am able to get in. I’m not sure how to see the /var/www/html/data/ folder other than through the runagent command which I am not familiar with at all.