Installed Plex on Debian 13 and getting CERT TLS plex.direct SNI name errors and metadata problems

Server Version#: 1.42.1.10060
Player Version#: N/A
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

My old server was running Debian 12 and I decided to do a clean install of Debian 13 and install Plex back onto it.

I got Debian 13 up and running …. installed Plex ….. stopped it…. copied the following files over and replaced the old ones:

Preferences.xml

com.plexapp.plugins.library.db

com.plexapp.plugins.library.blobs.db

…. made sure the permissions were correct ….. started Plex back up and claimed my server. So far, so good. All my files are in the library but I now need to refresh metadata so I can get all the cover art back and this is where things went off the rails. Half the images aren’t downloading and I’m getting TONS of the following errors in the console:

[CERT] TLS connection from [::ffff:75.52.154.166]:53617 came in with unrecognized plex.direct SNI name ‘172-2-191-99.61cef43e863f4775b642ee321d8cf9ee.plex.direct’; using installed plex.direct cert

Did some searching and I’ve seen other people with the same problem but couldn’t find a solid fix.

Plex Media Server Logs_2025-08-16_18-59-53.zip (432.5 KB)

I’m not using any reverse proxy stuff…. plain setup. AT&T fiber into my Synology router. I haven’t made any network changes.

Port forwarding to 32400 is solid, UPnP is enabled and Plex shows ‘fully accessible outside your network’.

Stop Plex, rename Preferences.xml to Prefrences.bak, restart and it will generate a new one that isn’t full of your old server info.

Didn’t fix it. :frowning: Metadata still isn’t downloading and I’m still seeing those same errors.

If you’re on an IPv4 LAN with no IPv6 – Settings - Server - Network - Show Advanced – Turn off IPv6 support (on by default)

Make certain all players are force restarted

Make certain nothing references your server using the plex.direct address
(which will cause the SNI (Server Name Identification) error every time the cert is updated)

Please make certain DEBUG logging is enabled , recreate / make it try again to download metadata, then make a tar.gz of the Logs directory and attach it here.

HURRAY!!! That seems to have stopped the errors from showing up! Thank you very much!

Bonus question… do you have any idea why the metadata refuses to download for a large chunk of my shows? I thought that TLS error was causing it but doesn’t appear so.

UPDATE: Crap…. error returned: [CERT] TLS connection from [::ffff:23.245.227.148]:65184 came in with unrecognized plex.direct SNI name ‘172-2-191-99.61cef43e863f4775b642ee321d8cf9ee.plex.direct’; using installed plex.direct cert

Debug logs attached.

UPDATE: I just noticed something…. looks like cover art -IS- getting downloaded but it’s just not being applied. Example, if I click on a TV show and edit it:

…then go to poster:

… pick one and save it, I get brought back to the main screen. From here, if I ‘refresh metadata’, THEN it all populates correctly:

…. but manually doing that for the thousands of TV shows and movies I have would not be fun. I wonder if the only fix is to delete the libraries and add them back? :frowning: That would stink as it would mess up my recently added stuff and my wife wouldn’t be happy.

Plex Media Server Logs_2025-08-16_21-31-46.zip (3.4 MB)

‘172-2-191-99.61cef43e863f4775b642ee321d8cf9ee.plex.direct is a WAN IP which needs to be restarted. It’s not your server.


Have you used FileBot (or similar renaming tool) ?

I use it and have no issues.

PMS keeps track of files by the header inside the files (its ‘fingerprint’).

I use FileBot because it verifies the name is valid ( online lookup ) and then presents options (if multiple) for me to choose from.

With FileBot, nothing ever fails to match correctly or pull down posters unless the artwork holder does a Copyright Takedown (which does happen).

Simple rule for TV:

/nas/tv/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}

I get names like this which Plex never gets wrong or fails.

[chuck@glockner Fringe.2007]$ ls -la *01
total 150572488
drwxr-xr-x 2 chuck chuck        4096 Mar 20  2023 ./
drwxr-xr-x 7 chuck chuck         115 Mar 20  2023 ../
-rw-rw-r-- 1 chuck chuck 12754981253 Mar 20  2023 Fringe - S01E01 - Pilot.mkv
-rw-rw-r-- 1 chuck chuck  7788272130 Mar 20  2023 Fringe - S01E02 - The Same Old Story.mkv
-rw-rw-r-- 1 chuck chuck  7705419213 Mar 20  2023 Fringe - S01E03 - The Ghost Network.mkv
-rw-rw-r-- 1 chuck chuck  7361240155 Mar 20  2023 Fringe - S01E04 - The Arrival.mkv
-rw-rw-r-- 1 chuck chuck  7383392289 Mar 20  2023 Fringe - S01E05 - Power Hungry.mkv
-rw-rw-r-- 1 chuck chuck  7196025846 Mar 20  2023 Fringe - S01E06 - The Cure.mkv
-rw-rw-r-- 1 chuck chuck  7338425148 Mar 20  2023 Fringe - S01E07 - In Which We Meet Mr. Jones.mkv
-rw-rw-r-- 1 chuck chuck  7111718731 Mar 20  2023 Fringe - S01E08 - The Equation.mkv
-rw-rw-r-- 1 chuck chuck  7680230076 Mar 20  2023 Fringe - S01E09 - The Dreamscape.mkv
-rw-rw-r-- 1 chuck chuck  7725884057 Mar 20  2023 Fringe - S01E10 - Safe.mkv
-rw-rw-r-- 1 chuck chuck  7763855725 Mar 20  2023 Fringe - S01E11 - Bound.mkv
-rw-rw-r-- 1 chuck chuck  7689359234 Mar 20  2023 Fringe - S01E12 - The No-Brainer.mkv
-rw-rw-r-- 1 chuck chuck  7810898031 Mar 20  2023 Fringe - S01E13 - The Transformation.mkv
-rw-rw-r-- 1 chuck chuck  7961879029 Mar 20  2023 Fringe - S01E14 - Ability.mkv
-rw-rw-r-- 1 chuck chuck  7883587381 Mar 20  2023 Fringe - S01E15 - Inner Child.mkv
-rw-rw-r-- 1 chuck chuck  7916106336 Mar 20  2023 Fringe - S01E16 - Unleashed.mkv
-rw-rw-r-- 1 chuck chuck  6727714170 Mar 20  2023 Fringe - S01E17 - Bad Dreams.mkv
-rw-rw-r-- 1 chuck chuck  6828731589 Mar 20  2023 Fringe - S01E18 - Midnight.mkv
-rw-rw-r-- 1 chuck chuck  6962065836 Mar 20  2023 Fringe - S01E19 - The Road Not Taken.mkv
-rw-rw-r-- 1 chuck chuck  6596393868 Mar 20  2023 Fringe - S01E20 - There's More Than One of Everything.mkv
[chuck@glockner Fringe.2008]$ 

Try renaming for one series and then refresh its metadata.

I restarted the ATT fiber modem this morning and still see the error.

I’ve never used FileBot before but know what it is. I’ll try renaming one of my shows but I’d be baffled if that fixes it because my existing naming convention has always worked up until now:

And it’s weird because as I said earlier, if I edit the show and click on the ‘poster’ icon, the normal poster is already in there and ready. It’s just not applying it and is using a blank rectangle as the placeholder.

I copied a TV show (that had a blank cover art but if I edited it, the poster was there, just not being displayed in the library view) into a new folder and added the library and Plex downloaded the covert art and applied it perfectly.

Does this mean I have to delete all my libraries and add them back to fix this? :frowning: Only other solution I can think of is to manually edit each one, select the correct poster and refresh the metadata.

I would make certain the settings are right and then, if need be, recreate the library section.

You can use TMDB or TheTVDB episode ordering.

My TV Series settings (Advanced tab)

As you can see in the background, everything populates without issue.
( I just did this to confirm it’s not a PMS / Plex.tv metadata problem )


[chuck@lizum tv2.2016]$ ls -la 11.22.63/Season\ 01/
total 19754492
drwxr-xr-x 2 chuck chuck       4096 Aug 17 13:52 ./
drwxr-xr-x 3 chuck chuck         31 Aug 17 13:48 ../
-rw-rw-r-- 1 chuck chuck 4691175872 Aug 17 13:50 11.22.63 - S01E02 - The Kill Floor.mkv
-rw-rw-r-- 1 chuck chuck 3811259223 Aug 17 13:48 11.22.63 - S01E03 - Other Voices, Other Rooms.mp4
-rw-rw-r-- 1 chuck chuck 3517948647 Aug 17 13:50 11.22.63 - S01E05 - The Truth.mkv
-rw-rw-r-- 1 chuck chuck 3516785545 Aug 17 13:50 11.22.63 - S01E06 - Happy Birthday, Lee Harvey Oswald.mkv
-rw-rw-r-- 1 chuck chuck 4691413701 Aug 17 13:52 11.22.63 - S01E08 - The Day in Question.mkv
[chuck@lizum tv2.2017]$ 

Yep, my settings are correct……. :frowning: …..sooooooooooooooo……… is there any way to delete my libraries, re-add them and have Plex put files with newer timestamps back in the ‘recently added’ section?

I wonder if there’s a script out there that can examine a folder and take the dates from the files and edit the ‘added-at’ entry for each one in the Plex database?

I guess another low tech way will be to move all my media out of their library folders into a temp spot then sort by date then start moving things back into /mnt/md0/Movies with the oldest going first. Then as I keep adding newer and newer stuff, the old things will get pushed to the end of the line.

There is currently no such functionality that I know of.

I’m currently rewriting DBRepair to be a proper static-linked program.
When I complete this, I will be able to perform these type of advanced tasks but that will take time. I am working on it in my spare time. (haha)

As a test. have you tried using something of the form:

  1. Have PMS set to detect changes and run partial scans.

  2. Generate the list of directories (from the top level of the library) using

ls -1t | sort -r
  1. Issue this type command to convince PMS the files are modified
find  "TargetMediaDirectory" -exec touch -m {} \;

If you have a lot of directories, something of the form ??

  1. ls -1t > filename.unsorted
  2. sort -r <filename.unsorted > filename.sorted
  3. mark them as modified
while read name
do
find "./$name" -exec touch -m {} \;
sleep 30
done < filename.sorted

You can make it more exotic if / as needed

I’m positive this will be an amazing set of utilities, very much looking forward to it!

I tried restoring a different backup and ran into the same problem so I went in and deleted all my libraries and added them back and Plex is (correctly) applying cover art and refreshing everything as I type.

One odd thing I noticed… after I deleted all the libraries, I cleaned bundles and optimized the database. But com.plexapp.plugins.library.blobs.db was still it’s original 2.1 gigs. Is that normal/OK? I wanted to start with a clean slate but found it strange that even cleaning everything out, that file was still the same size. If you don’t think it’s anything to worry about, I’ll carry on but if not, should I re-start and straight up delete that file first?

Or maybe the size will shrink after it slogs through everything and empties the trash?

The blobs DB only contains info about the active media in the library.

If you don’t mind,

  1. Refresh all metadata (so all the pointers and files are gone)
  2. Empty Trash & clean bundles (gets the rest)
  3. Run DBRepair if you want the DB pristinely packed
  4. while it’s stopped, Delete the Blobs DB.
  5. Now Start it up
  6. Add your media again

Too late, I went the scorched earth route and started from scratch. :laughing:

Everything is fine but a problem popped up that many have ran into. I have items in my ‘recently added’ section that are permanently stuck there. I checked their timestamps and they had creation dates from the year 2038!

I fixed and moved them out of the tv folder, waited for Plex to recognize them as gone, emptied trash, scanned the library and moved them back then waited an hour and moved a newer show back but Plex wanted to keep the old shows front and center. :frowning:

So now it’s SQLite editing time. Just so I don’t screw things up, is this the correct command to update ALL my movies and tv shows (across multiple libraries) with their availability date:

../Plex\ SQLite path to com.plexapp.plugins.library.db (then hit enter and when SQLite has the database open, type the following)

UPDATE metadata_items (hit enter)

SET added_at = originally_available_at (hit enter)

WHERE originally_available_at IS NOT NULL; (hit enter)

Those steps correct? Any downside to doing a bulk change like that?

Thanks

There’s more than just the metadata_items table to worry about.

Feel like throwing another

:collision:

?

I don’t like cross-editing tables in the blind like this because of the relationships and linked dates

Lots of Google searches all revolve around that command. There doesn’t seem to be anything concrete on this forum about accomplishing my goal. Can you give me the proper command to carry this out? (Does it even exist?)

Not sure how /home/gene/Videos is linked to my Plex stuff. Was it in the logs I uploaded? I don’t have any libraries that point to it. Everything is in /mnt/md0/Movies, TV Shows, 4K, Movie requests and Friends. Since uploading those logs, I trashed my Plex install and started brand new, didn’t restore any backups of any files.

I recently added a ‘Home movies’ section but I’m using the Plex personal media agent so I don’t think I have to worry about it getting dates. I can nuke that library before doing anything and add it back later to be on the safe side.

Right now, I just have movies and TV shows in there.

Closing thread at user request.