Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 server error opening cookbook #968

Closed
Nordiii opened this issue Apr 29, 2022 · 6 comments
Closed

500 server error opening cookbook #968

Nordiii opened this issue Apr 29, 2022 · 6 comments
Labels
bug Something isn't working stalebot-enabled The PR/issue is marked to go stale over time

Comments

@Nordiii
Copy link

Nordiii commented Apr 29, 2022

Description
When opening the cookbook page I get an error in Nextcloud stating:

Technical details

Remote address: 79.XXX.XXX.XX
PvbWndpxcf6wG2J8oZOL

Is there anywhere where an IP is configured?

Reproduction
Happend after I needed to reapply a out of date database backup as my docker threw a segmentation fault and I was not able to recover the volume.
Anything else works correctly.

Expected behavior
Load the cookbook

Actual behavior
Internal Server Error

Browser
Firefox / Smartphone app

Versions
Nextcloud server version: Latest
Cookbook version: 0.9.11
Database system: MySQL

@Nordiii Nordiii added the bug Something isn't working label Apr 29, 2022
@sam-19
Copy link
Contributor

sam-19 commented Apr 29, 2022

Your error looks exactly like something that I am suddenly getting. However, in my admin log this error is accompanied by this:

RedisException: DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user.

This happens when Cookbook is trying to invoke the DbCacheService script.

It may be just a coincidence (the timing of our respective errors), but if your problem is caused by the same issue, it may not have anything to do with Cookbook or even Nextcloud. The error makes no sense (my Redis connection IS configured with a username and password) and I'm still trying to figure out the reason. Since I can't find any mention of it on the Nextcloud server repo issues, it may in fact be a problem with Redis.

Edit: There is actually another bug report about Redis, #871, but my problem seems different.

@Nordiii
Copy link
Author

Nordiii commented Apr 29, 2022

I`m using the nextcloud docker image which is without redis I think?

To be honest i`m very happy that my nextcloud is even working after having a 1 month old DB backup.

@christianlupus
Copy link
Collaborator

We do not have any IPs configured in the cookbook. In fact, the networking stuff is loaded to the main server core.

Do you have debugging activated in the server's config when you do the test? Normally there should be a backtrace visible.

I doubt it will help but you could truncate the cookbook-related DB tables. No recipes will be shown. You will have to run a manual reindex step (or wait long enough for the automatic reindex step) to see the recipes again. This should however remove any data stored in the DB that is related to the cookbook (except for simple app configuration).

@christianlupus christianlupus added the stalebot-enabled The PR/issue is marked to go stale over time label Apr 29, 2022
@sam-19
Copy link
Contributor

sam-19 commented Apr 29, 2022

I have now found my error triggered by two other apps in addition to Cookbook, so I'm fairly certain it's not your doing and doesn't warrant any changes to the app. It is also most likely unrelated to the OP's error, so just a coincidence. The root cause still keeps eluding me, though...

@Nordiii: You can find your server log error trace when you log in as administrator, go to Settings (on the top right drop-down menu) and select Logging at the bottom of the left hand menu.

Edit: The last migration file for Cookbook is dated 2021-07-01 so it should not be a database structure error, maybe some sort of conflict. Do the DB's contain any unrecoverable data, that could be lost if truncated? If not, that should probably fix the error.

@Nordiii
Copy link
Author

Nordiii commented Apr 29, 2022

A thanks looked into the container logs but those werent helpfull.

Now the Nextcloud logs show this:

[no app in context] Fehler: Couldn't re-calculate unencrypted size for files/Rezepte/Das beste Chili con Carne/recipe.json

GET /apps/cookbook/
from 192.XXXX.XXXX.XXXX by XXXXX at 2022-04-29T18:01:43+00:00

This probably is an issue because I unencrypted everything before the Docker crash but the DB has still the encrypted format.

I did unecrypt everything again but it seems like nextcloud still thinks those files are encrypted.

Now I need to finde out how to change that.

@Nordiii
Copy link
Author

Nordiii commented Apr 29, 2022

Running the command:
docker exec -u www-data nextcloud php occ encryption:fix-encrypted-version --path=/Rezepte

Did fix my issue! Thanks for guiding me there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stalebot-enabled The PR/issue is marked to go stale over time
Projects
None yet
Development

No branches or pull requests

3 participants