Closed Serkeliss closed 1 month ago
In addition, if I try to do a database dump to a file (by using something like the manage.py export command), I get the following error: Unable to serialize database: no such column: oauth2_provider_application.hash_client_secret
it looks like the migrations did not run, I think the field shown in the logs might be new. Have you made sure that when updating you ran all migrations? Not sure if that needs to be done manually on unraid
That's a good question. I wasn't even aware of any manual migrations that needed to occur. I just had the unraid docker container being updated as it went along. Is there a knowledge base article or help file of any commands that need to be run in order to do these migrations?
I'm sorry if I'm speaking straight from inexperience or if this is even the right medium in order to report these issues. I just don't recall any necessary processes or things that were spelled out that I just didn't grasp. I'm more than willing to try anything that might lead to a better experience, though. I just didn't want to lose whatever recipes that I've already put in since it represented many hours of work already.
so looking at the instructions I do not really see any indications that migrations would need to run manually but maybe they failed for some reason. Sadly I am not at all familiar with unraid so I cannot really help you a lot. You might want to join the discord and ask if anyone familiar with unraid is willing to lend you a hand and look at your problem.
One tip I can give you is that if the issue is related to migrations you should look at the log of the container when the container starts. It shows information about migrations and if they might have failed. Another thing, given the error message, might be file access (permissions) that you might look into.
Trying to look at things again for the weekend. I've found that everything looks good on the permission side of things from the OS level, but it might be a database permission thing.
Is there some command that I can issue to the general database file (in my case it is recipes.db and still the SQLite3 backend)? Should I attempt to migrate it to a different backend? Is it possible to do that with it in this state? If I wanted to just export my recipes out of the database, it is possible to just grant it a full root r/w permissions for everyone temporarily, export my recipes, and then start over another instance from scratch? What would be a good way to do that?
I am honestly not sure if sqlite even has permissions as its just a file, so I dont think its any database internal issue. Generally it is not advised running on sqlite as you miss out on some nice DB features, on the other hand people have migrated and from what I have heard its not a very pleasant thing to do (there are tutorials I think either here on GitHub in the discussions or in the docs, not entirely sure).
Still sqlite should work on unraid, maybe, trough looking at the commits, you can find out who contributed the unraid docs a while ago, I remember he was a pretty helpful and nice guy (?!), maybe he can help figure out whats wrong.
what you can do, which would still loose you some data, is copy the sqlite DB, install tandoor just on your normal PC/mac, load it up and do a recipe export. You will loose some of the more special data (like food recipes, shopping lists, meal plans, ..) but at least have all your recipes.
Thank you so much for your help with this. This was definitely NOT a Tandoor problem. I was thinking this was a problem with some migration or upgrade or breaking update that went amiss, but that was not what was going on. This was a specific Unraid problem, so you were spot on, vabene1111. It had to do with a weird storage pool rename that had occurred that was causing an issue on the Unraid side not to be able to map the storage correctly over to the docker instance, which was causing a permission issue on the appdata array that was accessible to the docker instance. Everything looks good now after I had a little time to work on it. I'm going to mark this case as closed, but since it didn't really have anything to do with Tandoor, you could probably just delete it or get rid of it. I appreciate your insight. It was extremely helpful!
Tandoor Version
1.5.19
Setup
Unraid
Reverse Proxy
Nginx Proxy Manager (NPM)
Other
No response
Bug description
I don't know exactly when it happened, but I attempted to log into my Tandoor instance and put a new recipe in, but I noticed that whenever I would attempt to access anything on my instance, I would get Server 500 errors throughout. I turned on debug mode and attempted the same thing and got a specific error every time I tried to access any resource at all. The error says "Unable to open database file". I think the last time I probably accessed my recipes on Tandoor may have been a few months ago so it isn't a regular thing, but I still perform updates on the instances fairly regularly so I have no idea when this may have been broken, but I'm willing to dig or look at ways that I can troubleshoot. My current instance was pretty much all defaults, so it's probably using sqlite as the database or whatever the built-in one is. I'm not that savvy when it comes to database work, but I'm willing to try.
I'll try to put any new information or logs out here as I find more, but I was hoping for something that might just be something I overlooked or something.
Relevant logs