#plexapi.exceptions.BadRequest: (500) internal_server_error
1 messages ยท Page 1 of 1 (latest)
Welcome @keen galleon!
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.
Please attach the log, not screenshots.
Based on that first screenshot there might be an image that's too big.
๐ If you want to review this again, reogal:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> ๐
๐ฌ๐ก๏ธ PLEX DB CACHE ADVICE
Consider updating the Plex DB cache setting from 0.04 GB, to a value greater than 1 GB based on the total memory of 252.00 GB.
Setting db_cache: 1024 within the plex settings in your config.yml is effectively 1024MB which is 1GB. For more info on this setting: https://kometa.wiki/en/latest/config/plex#plex-attributes
NOTE:The number you choose can vary wildly based on a number of factors (such as the size and number of libraries, and the amount of files/operations/overlays that are being utilized).
Not much to go on there. Everything's going along fine for the most part then Plex starts returning internal errors as soon as Kometa attempts to set a new overlaid image on a thing.
Yeah, and the url it's looking towards is redacted so I can't chase that down as a possible typo somewhere
At least not easily
The log ends abruptly after 855 such errors.
I ended the run when I saw the errors
url it's looking towards is redacted
That's the URL to the plex server that you provided in the config. If that were wrong it wouldn't have gotten that far.
fair enough,
usually when faced with a descriptive error like "it could be anything we don't have a method of categorizing" I like to start at something known good
What this shows:
| File "(redacted)/Kometa/modules/plex.py", line 818, in upload_poster
| item.uploadPoster(filepath=image)
That's Kometa code calling the PlexAPI library making a request to set the poster on a thing.
Everything below here is in the PlexAPI library; if this request that generates the 500 was going to anything but a real Plex server, we would have never gotten here in the first place, and in any case it would be an entirely different error:
| File "(redacted)/Kometa/kometa-venv/lib/python3.11/site-packages/plexapi/mixins.py", line 455, in uploadPoster
| self._server.query(key, method=self._server._session.post, data=data)
| File "(redacted)/Kometa/kometa-venv/lib/python3.11/site-packages/plexapi/server.py", line 769, in query
| raise BadRequest(message)
| plexapi.exceptions.BadRequest: (500) internal_server_error; (redacted)/library/metadata/1455/posters <html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>
|
| Overlay Error: (500) internal_server_error; (redacted)/library/metadata/1455/posters <html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>
| Overlays Attempted on Can of Worms: Overlay File (0) 480P
This:
File "(redacted)/Kometa/modules/plex.py"
Has me thinking there's something weird in the way you have this set up. There shouldn't be anything that Kometa redacts in that file path.
Yeah, I redacted it before uploading
Ah, so you took out /path/with/my/real/name or something
Yeah, just a find and replace
There is one other issue in the Radarr config:
| Invalid Root Folder: '(redacted)/Movies/' Options: [[1:(redacted)/Movies]]
Not related to this problem, but Radarr isn't going to work.
Yeah, caught up in the same find and replace
The error has nothing to do with the find and replace.
You're telling Kometa to use a root folder of:
/this/doesnt/matter/Movies/
And Radarr doesn't have any such root folder defined. It has:
/this/doesnt/matter/Movies
Those are not the same
BTW,. if you're going to redact things yourself it's probably a good idea to use something other than (redacted) so it doesn't look like Kometa's redaction has gone rogue.
I enjoy the visualization of devs fearful yet curious that part of their code has gone rogue
Following the url command structure that plex publishes, I can bring up the xml file that kometa is attempting to access
Kometa isn't attempting to access an XML file. It's attempting to upload an image to Plex. And during that attempt, something inside Plex explodes. Maybe it won't explode tomorrow, maybe it won't explode right now if you try it again.
Maybe there's some database or other issue inside Plex such that any attempt to upload an image will cause the explosion. There's no way for us to tell.
I upped the db-cache that Luma recommended and fixed the radarr directory.
It takes a while to get to where it fails
But when I put that string in the browser, I am greeted with an xml file
Sure, a GET request from a browser will return the XML for the item. What's happening when Kometa makes this attempt to set the art is a POST request to the same URL with an image payload.
Right, I get that.
I'm just trying to verify what I can to attempt to narrow down what it could be
I'd start with the Plex log, since whatever's happening is entirely internal to Plex.
I don't think this is an issue with the POST request
I think it's an issue with the GET request that follows to verify the POST was successful
I think I have it narrowed down to a permissions issue, and after I can verify I'll post a resolution for posterity
Based on that cropped screenshot it seems to be pretty clearly a disk or permissions issue saving the file on the plex server.
Not sure why the GET would be implicated by that.
Yup, Permissions issue.
The previous bundles in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server...(37 more layers of directories) had the incorrect owner:group so plex didn't have permission to touch them.
New files were going in with the correct owner:group, so it wasn't causing an issue except when trying to update.
You POST to put a thing there, you GET to verify it went there
Sure, but your cropped screenshot shows the error in "SafelyWriteFile" which doesn't seem like a "verify it got there" thing, it seems more like a "put it there in the first place" thing.
Sure, but the asset upload with 103600 bytes says the post got there