#ImageMaid DB API Download Issue

1 messages · Page 1 of 1 (latest)

icy grove
#

I've been trying to get ImageMaid running on docker on Ubuntu 24.04 LTS. If I use the url of "plex:32400" I get an error: No connection adapters were found for '(redacted)/' and if I use "http://plex:32400" I get "Metadata Error: File Error: Database File Could not Downloaded"

Compose:

  imagemaid:
    image: meisnate12/plex-image-cleanup:latest
    container_name: imagemaid
    restart: unless-stopped
    profiles: ["all", "plex", "rick"]
    networks:
      - ${APP_NETWORK}
    user: ${PUID}:${PGID}
    volumes:
      - ${APPDATA}/plex/imagemaid:/config
      - ${APPDATA}/plex/data/Library/Application Support/Plex Media Server:/plex
    environment:
      TZ: ${TZ}
      PLEX_PATH: /plex
      MODE: report
      #SCHEDULE: "07:00|daily"
      PLEX_URL: plex:32400
      PLEX_TOKEN: ${PLEX_TOKEN}
      TIMEOUT: 600
      SLEEP: 60
      LOCAL_DB: False
      PHOTO_TRANSCODER: False
      EMPTY_TRASH: False
      CLEAN_BUNDLES: False
      OPTIMIZE_DB: False
      TRACE: True

Thank you.

unreal graniteBOT
#

Welcome @icy grove!

It looks like you have not yet completed the id:customize section of our Discord server, this will allow us to help you quicker.

Someone from <@&938443185347244033> will assist when they're available.

Including meta.log from the beginning is a huge help. Type !logs for more information.

After attaching your log, do not forget to hit the green check boxes when prompted by our bot.

#

You can press the "Close Post" button above or type /close at any time to close this post.

hard birch
#

That is the wrong image

#

kometateam/imagemaid:develop as theres no latest yet

icy grove
#

Ah gotcha, I tried latest on the new name but didn't get anything, didn't note the develop tag. Let me try.

#

Ok, the same two error or response types are happening on the current image. I think this one is a bit more verbose, possibly the right path? When it's set as this: PLEX_URL: http://plex:32400

2024-06-03T19:27:09.999802432Z |====================================================================================================|
2024-06-03T19:27:09.999908576Z |                                              Database                                              |
2024-06-03T19:27:09.999986548Z |====================================================================================================|
2024-06-03T19:27:10.000160702Z | Downloading Database via the Plex API. First Plex will make a backup of your database.             |
2024-06-03T19:27:10.000230590Z | To see progress, log into Plex and go to Settings | Manage | Console and filter on Database.       |
2024-06-03T19:27:10.000279751Z | You can also look at the Plex Dashboard to see the progress of the Database backup.                |
2024-06-03T19:27:10.000316176Z |                                                                                                    |
| Plex Media Server Databases_2024-06-03_12-27-12.zip: 100%|██████████| 22.0/22.0 [00:00<00:00, 91.7kB/s]
2024-06-03T19:27:12.493496858Z | Metadata Error: File Error: Database File Could not Downloaded                                     |
2024-06-03T19:27:12.493604151Z 
2024-06-03T19:27:12.493666648Z |                                            Error Report                                            |
2024-06-03T19:27:12.493734339Z 
2024-06-03T19:27:12.493783011Z |                                                                                                    |
2024-06-03T19:27:12.493822640Z | Generic Errors:                                                                                    |
2024-06-03T19:27:12.493881968Z |   Metadata Error: File Error: Database File Could not Downloaded
reef shuttle
#

First guess would be permissions. I just used your compose [with relevant changes] and see:

|                                              Database                                              |
|====================================================================================================|
| Downloading Database via the Plex API. First Plex will make a backup of your database.             |
| To see progress, log into Plex and go to Settings | Manage | Console and filter on Database.       |
| You can also look at the Plex Dashboard to see the progress of the Database backup.                |
|                                                                                                    |
| Plex Media Server Databases_2024-06-05_09-51-10.zip: 100%|██████████| 6.57M/6.57M [00:00<00:00, 176MB/s]
| Plex Database Download Complete                                                                    |
| Database Downloaded to: //config/com.plexapp.plugins.library.db                                    |
| Runtime: 0:00:01                                                                                   |
|                                                                                                    |
| Database Opened Querying For In-Use Images                                                         |
| 1103 In-Use Images Found                                                                           |
| Runtime: 0:00:00                                                                                   |
|====================================================================================================|
icy grove
#

I'll check permissions again. Thanks

#

Will lyk either way

icy grove
#

I ran a docker compose restart && docker exec to touch a test file in /config and that was successful. that works whether i'm running the container as root or as 1000:1000, and I can ls in the container and see /plex and /config are both owned by 1000:1000, so that seems to be consistent. Might I ask @reef shuttle What relevant changes you made - just volumes? Or anything else?

Thanks.

unreal graniteBOT
#

The following was shared by @reef shuttle and was automatically redacted by Luma as it may have contained sensitive information.

If you feel this message should not have been redacted, resend it with !noredact in your message to avoid redaction.

#
  imagemaid:
    image: kometateam/imagemaid:develop
    container_name: imagemaid
    restart: unless-stopped
    #profiles: ["all", "plex", "rick"]
    #networks:
    #  - ${APP_NETWORK}
    user: 1000:1000
    volumes:
      - /opt/imagemaid:/config
      - /opt/plex/Library/Application Support/Plex Media Server:/plex
    environment:
      TZ: Etc/UTC
      PLEX_PATH: /plex
      MODE: report
      #SCHEDULE: "07:00|daily"
      PLEX_URL: http://192.168.1.11:32400
      PLEX_TOKEN: (redacted by Luma)
      TIMEOUT: 600
      SLEEP: 60
      LOCAL_DB: False
      PHOTO_TRANSCODER: False
      EMPTY_TRASH: False
      CLEAN_BUNDLES: False
      OPTIMIZE_DB: False
      TRACE: True
icy grove
#

I manually flipped around to local db, ignore running, and commented out plex url and token, and it worked, so it seems to be an issue specific to calling the plex api, not the actual creation of the DB export.

reef shuttle
#

I figured permissions since the progress bar on yours seems complete, which would imply the entire file came back from Plex, then the error, which to me said "I couldn't write this"

icy grove
#

yeah makes sense. I just wanted to run that angle down to verify

icy grove
#

Doesn't seem to be docker related, I installed pip3, requirements, etc. and manually set the local env

PLEX_PATH="/mnt/docker/appdata/plex/data/Library/Application Support/Plex Media Server/"
MODE=report
SCHEDULE=
PLEX_URL=http://localhost:32400
PLEX_TOKEN=xxxxxxxxxxxx
DISCORD=
TIMEOUT=600
SLEEP=60
IGNORE_RUNNING=False
LOCAL_DB=False
USE_EXISTING=False
PHOTO_TRANSCODER=False
EMPTY_TRASH=False
CLEAN_BUNDLES=False
OPTIMIZE_DB=False
TRACE=False
LOG_REQUESTS=False

Same error, odd.

unreal graniteBOT
#

The following was shared by @icy grove and was automatically redacted by Luma as it may have contained sensitive information.

If you feel this message should not have been redacted, resend it with !noredact in your message to avoid redaction. See attached file for redacted content.

icy grove
#

The issue appears to not be related to imagemaid. I added a significant amount of logging into the python code and verified:

the export is only 22 bytes long, it is an empty zip file, and I get the same result running `curl -H "X-Plex-Token: (redacted by Luma)

Python debugging output:
| Response status code: 200 |
| Response headers: {'X-Plex-Protocol': '1.0', 'Content-Type': 'application/zip', 'Content-Disposition': 'attachment; filename="Plex Media Server Databases_2024-06-05_23-03-27.zip"', 'Cache-Control': 'no-cache', 'Connection': 'Keep-Alive', 'Keep-Alive': 'timeout=20', 'Content-Length': '22', 'Date': 'Thu, 06 Jun 2024 06:03:27 GMT'} |
| Writing to /home/adam/Plex-Image-Cleanup/config/temp/Plex Media Server Databases_2024-06-05_23-03-27.zip |
| Plex Media Server Databases_2024-06-05_23-03-27.zip: 0%| | 0.00/22.0 [00:00<?, ?B/s]| Written chunk of size 22 to /home/undaunt/Plex-Image-Cleanup/config/temp/Plex Media Server Databases_2024-06-05_23-03-27.zip |
| Plex Media Server Databases_2024-06-05_23-03-27.zip: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 22.0/22.0 [00:00<00:00, 87.6kB/s]
| Content of the downloaded file: b'PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
| Metadata Error: Downloaded zip file is empty

!noredact