tom472 / mediabox

Container based media tools configuration
MIT License
428 stars 83 forks source link

Portainer containers "object not found" #114

Closed cthog closed 3 years ago

cthog commented 3 years ago

I'm trying to edit my Plex container, as I've done in the past, in order to add a new folder to the docker. However, I'm unable to duplicate/edit the image, as portainer keeps telling me "database object not found." Here is the log line from Portainer: 2021/02/01 17:11:45 http error: Unable to proxy the request via the Docker socket (err=Object not found inside the database) (code=500)

Is there an easy fix?

tom472 commented 3 years ago

I'll take a look into it - I'm also going to be switching Portainer to the new version/branch soon as well so that might fix it too. Hang tight - hope to likely make the change this weekend.

cthog commented 3 years ago

Thanks, man!

tom472 commented 3 years ago

Sorry for the delay on this -- As of commit 882f7bd56f9736cdba1e62c76c9783ccedb3b9fe - Portainer has been switched to the Portainer-CE branch.

Not sure if this is going to correct your issue but give it a shot and see what you get.

tom472 commented 3 years ago

@cthog -- Have you had a chance to update Mediabox and retest your issue?

cthog commented 3 years ago

Sorry man, been out of touch for a week or so. You know, Valheim. What's the easiest way to update Mediabox? Just run the .sh again over my existing setup?

cthog commented 3 years ago

So, I updated mediabox using ./mediabox.sh, and all went well--except for Sonarr. There's a lot of garbage in the logs, but what stood out was "[v2.0.0.5344] System.UnauthorizedAccessException: Access to the path "/config/config.xml" is denied.", and elsewhere it complains about trying to write to a read-only database. Oddly, neither Lidarr nor Radarr have this problem. I googled the first error, and it's apparently solved with a chown -R command, but I'm unsure who I should state as the user?

Bramblefoot commented 3 years ago

Whichever account you ran mediabox.sh with. You could also check the user and group on all the other folders in the mediabox folder, that should also tell you. They all should be the same. And they should not be root. A recursive chown would be fine to fix it at the mediabox level, seeing as all the containers should also be running with the same user and group. I don't work here... LoL I'm just another user of mediabox. Someone can correct me if I'm wrong.

Hope this helps, Bill

"Try not. Do, or do not. There is no try." - Yoda

On Tue, Mar 2, 2021, 8:08 PM cthog notifications@github.com wrote:

So, I updated mediabox using ./mediabox.sh, and all went well--except for Sonarr. There's a lot of garbage in the logs, but what stood out was "[v2.0.0.5344] System.UnauthorizedAccessException: Access to the path "/config/config.xml" is denied.", and elsewhere it complains about trying to write to a read-only database. Oddly, neither Lidarr nor Radarr have this problem. I googled the first error, and it's apparently solved with a chown -R command, but I'm unsure who I should state as the user?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tom472/mediabox/issues/114#issuecomment-789369960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4VDLPXE5D44KT4BKA4OW3TBWKYDANCNFSM4W5SUQOQ .

cthog commented 3 years ago

Thanks Bill, I'll give that a shot. Another issue (which is actually related to my original problem) is that I can't duplicate or edit containers in portainer. When I try, it doesn't pop up an error like it did originally (object not found), now it just says "deployment in progress" with the little spinny circle, but there's no indication of any progress... ever. Not ideal.

**Just an update, chown -R fixed my Sonarr problem, but portainer (which was the original issue of this thread) still doesn't let me duplicate/edit a container.

tom472 commented 3 years ago

So just in general - I am curious as to why you are looking to duplicate or edit containers. i.e. Are this changes that would be good to be adjusted in project as a whole?

Portainer will not have full access to the stack because it was not 'created' in Portainer. Under the Stacks List you will see the stack control type will be 'limited'.

Some starter questions:

It might be because Portainer is just grabbing what it is seeing via the docker.sock and that it is not really loading/seeing the Mediabox yaml file .. and if that is the case I might be able to pass a parameter to Protainer to see the actual yaml file.

Just kind of thinking out loud here ...

Bramblefoot commented 3 years ago

Tom I'm not the OP, but here are a couple reasons I have edited containers:

  1. I don't want mediabox as the default port 80 website, so I edited the port for that container.

  2. I have a few different drives mapped to the server, and want those represented in sonarr and radarr, do I added new volumes to those containers.

I eventually decided to just edit the Docker-Compose file from a 2nd ssh connection, while running the mediabox.sh update.

Thanks, Bill

"Try not. Do, or do not. There is no try." - Yoda

On Wed, Mar 3, 2021, 2:02 PM Tom Morgan notifications@github.com wrote:

So just in general - I am curious as to why you are looking to duplicate or edit containers. i.e. Are this changes that would be good to be adjusted in project as a whole?

Portainer will not have full access to the stack because it was not 'created' in Portainer. Under the Stacks List you will see the stack control type will be 'limited'.

Some starter questions:

  • Has this ever worked for you with Mediabox?
  • Are you stopping the container(s) before the edits?
  • What type of edits are you looking to make?

It might be because Portainer is just grabbing what it is seeing via the docker.sock and that it is not really loading/seeing the Mediabox yaml file .. and if that is the case I might be able to pass a parameter to Protainer to see the actual yaml file.

Just kind of thinking out loud here ...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tom472/mediabox/issues/114#issuecomment-790017758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4VDLJS4LQ2SOCQKSLYXC3TB2IVNANCNFSM4W5SUQOQ .

tom472 commented 3 years ago

@Bramblefoot -- OK cool thanks for the info Have you / were you ever making any of the changes via Portainer? And if yes - was that method successful for you? And again thanks for the info and the contributions to this issue thread.

--Tom

cthog commented 3 years ago

Hi Tom, my use case is pretty much Bill's #2. I have a couple drives that I needed bind to the container, and portainer was the easiest way to do it. I would stop the container either duplicate or edit it, and no problems. The reason for my original post was that Portainer stopped letting me do that, with the "object not found" error. With this newer version of portainer, I just get an endless wait for deploying. I've had to resort to finding the .json in /var/lib/docker/containers in order to add the volumes.

tom472 commented 3 years ago

Really interesting I tested like three containers tonight - Changing ports / adding volumes all via Portainer and they all worked fine. I'm stumped at the hang up you are experiencing.

Also it would likely be a lot easier to edit the docker-compose.yml file directly for additional drives etc. than going into the docker .json file.

I'm looking/hoping to add an additional file browser to the stack and I'm looking for one that has a decent text editor as part of it. Then that way editing the docker-compose.yml file should be even easier.

--Tom

cthog commented 3 years ago

Ah, well you see, I barely know what I'm doing, lol!

cthog commented 3 years ago

Just to make things more interesting, I noticed that I had no trouble using Portainer to amend a mount in Sonarr, but had no luck in Radarr. I thought this was interesting, because I had previously had no luck with Sonarr (which wasn't picking up my old settings--until I remember to change the image back to sonarr:preview.) SO, to experiment, when I next tried to duplicate/edit Radarr, I made sure to select radarr:preview, and lo and behold, it worked.) Interestingly, the radarr image didn't specify any version at all. I can't remember if the sonarr version specified a version (i.e. latest or preview), but probably not, which was apparently why portainer wouldn't allow the edit/duplication.

tom472 commented 3 years ago

@cthog Has this issue gotten any better?