Scan library files stopped working

Server Version#: 1.23.1.4602
Player Version#:

Started a new TV shows library and added some media files to it. At first everything worked well. After I renamed some of the files, everything just disappeared from the library. No matter how much I tried to “scan library files” and nothing appeared.

also not sure if it’s related but I got “Unknown metadata type: folder” error in the log

The “unknown” is not relevant. You’re seeing some of Engineering’s new work in there.

May I have the Debug logs ZIP file which captures these errors you’re seeing / or a fresh scan of everything ?

Plex Media Server Logs_2021-06-04_20-11-18.zip (3.6 MB)
Right now I have two folders under TV Shows library, one of them is completely missing, and only 2 files from the other folder shown (totally 11 files).

Thanks.

Thank you for getting them.

Your Synology’s DNS settings (Control Panel - Network), have problem

PMS cannot find a path to the internet to resolve IP address for plex.tv

Jun 04, 2021 19:35:50.468 [0x7f52b7c77b38] DEBUG - HTTP requesting GET https://plex.tv/api/resources.xml?includeHttps=1&includeRelay=1&auth_token=xxxxxxxxxxxxxxxxxxxx
Jun 04, 2021 19:35:51.008 [0x7f52b7c77b38] DEBUG - HTTP/1.1 (0.5s) 200 response from GET https://plex.tv/api/resources.xml?includeHttps=1&includeRelay=1&auth_token=xxxxxxxxxxxxxxxxxxxx
Jun 04, 2021 19:35:51.009 [0x7f52b7c77b38] DEBUG - Media Server: Tested all servers in 0.0 seconds.
Jun 04, 2021 19:35:51.088 [0x7f52b6eacb38] ERROR - Error issuing curl_easy_perform(handle): 6
Jun 04, 2021 19:35:51.088 [0x7f52b6eacb38] WARN - HTTP error requesting GET http://plex.tv/pms/:/ip (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Jun 04, 2021 19:35:51.088 [0x7f52b6eacb38] ERROR - PublicAddressManager: Unable to get public IP adddress from myPlex (httpCode=-6): 
Jun 04, 2021 19:35:51.088 [0x7f52b6eacb38] DEBUG - MyPlex: Last published value didn't change, we're done.
Jun 04, 2021 19:35:52.227 [0x7f52b739db38] DEBUG - NetworkServiceBrowser: Parsing SSDP schema for http://192.168.0.49:8008/ssdp/device-desc.xml
Jun 04, 2021 19:35:52.227 [0x7f52b739db38] DEBUG - HTTP requesting GET http://192.168.0.49:8008/ssdp/device-desc.xml
Jun 04, 2021 19:35:52.239 [0x7f52b739db38] DEBUG - HTTP/1.1 (0.0s) 200 response from GET http://192.168.0.49:8008/ssdp/device-desc.x

Thanks for looking into this. I’m not sure if that’s the real issue here: this setting hasn’t been changed since I set up this DNS. And everything worked fine before I renamed some of the media files.

Also this doesn’t explain why 2 media files from that folder can be successfully scanned into the library?

If PMS cannot find Plex. tv, nothing will work.

  1. Your server will not authenticate your username
  2. Your server will not be able to get media
  3. All kinds of things just “break”.

Getting 2 of several, even without metadata is most likely a permissions problem.
Linux is very strict. User plex must be able to read the files.

If you copied them in over the network, be careful how you set those permissions.

“Everyone” being able to read is the easiest to implement.

I’m able to do everything on the server so I think PMS is able to find plex.tv.

I checked permission on the folder and user plex has all permissions it needs, I even gave it read&write.

I tried “scan library files” again and those still didn’t show up.

Another observation is that I added a few new media files and those new ones are able to be scanned and they showed up. But the ones I put in earlier today still won’t show up.

Did you apply the permissions recursively to the files in the shared folder?

There are cases where the share gives permissions but the folder down deeper does not.

I use this technique to add permission for Plex to read everything.

Yes I checked every folder on the path to make sure the permission is properly set.

New media files added to the same folder can be scanned and added to the library successfully. Not sure why the ones I put there earlier today couldn’t get added to library.

I’m looking further into your logs.

I’m seeing where, even when you’re able to transcode & play media, connection to plex.tv still fails because it cannot lookup the IP address.

Please look here. In the middle of matching media – it still fails.

Your internet service is giving you a great deal of problems.

Can you change the DNS lookup? Perhaps add another resolver like Google (8.8.8.8 or 8.8.4.4) ?

Jun 04, 2021 19:32:34.367 [0x7f3fa5ba4b38] DEBUG - [Transcode] Calculated media file path for path [metadata://art/tv.plex.agents.series_de2773c8a18beb59a363e0d03107677ac82aa00d]: ["/volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/5/2be81675e10b031c4b46348f44d45b3816f1b70.bundle/Contents/_combined/art/tv.plex.agents.series_de2773c8a18beb59a363e0d03107677ac82aa00d"]
Jun 04, 2021 19:32:34.367 [0x7f3fa5ba4b38] DEBUG - [Transcode] Calling back into ourselves for photo to transcode, optimizing the process (status: -1)
Jun 04, 2021 19:32:34.367 [0x7f3fa5ba4b38] DEBUG - [Transcode] Photo cache obtained 333050 bytes from /library/metadata/8147/file?url=metadata%3A%2F%2Fart%2Ftv%2Eplex%2Eagents%2Eseries_de2773c8a18beb59a363e0d03107677ac82aa00d&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Jun 04, 2021 19:32:34.368 [0x7f3fa5ba4b38] DEBUG - [Transcode] Saving original media file to /volume1/Plex/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/71/7114cf18f15a394c0398c50b944f1d9ea510f5f5.jpg
Jun 04, 2021 19:32:34.461 [0x7f3fa5ba4b38] DEBUG - [Transcode] Created thumbnail of size 360x203, has pixels: 1
Jun 04, 2021 19:32:34.468 [0x7f3fa4822b38] DEBUG - Completed: [192.168.0.3:61533] 200 GET /photo/:/transcode?url=%2Flibrary%2Fmetadata%2F8147%2Ffile%3Furl%3Dmetadata%253A%252F%252Fart%252Ftv%252Eplex%252Eagents%252Eseries_de2773c8a18beb59a363e0d03107677ac82aa00d%26X-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx&width=360&height=203 (5 live) TLS GZIP 104ms 14270 bytes (pipelined: 3)
Jun 04, 2021 19:32:35.867 [0x7f3fa47ffb38] DEBUG - Auth: authenticated user 1 as jian.jiang
Jun 04, 2021 19:32:35.867 [0x7f3fa5ba4b38] DEBUG - Request: [192.168.0.3:61533 (Subnet)] GET /library/metadata/8147/banners (5 live) TLS GZIP Signed-in Token (jian.jiang)
Jun 04, 2021 19:32:35.871 [0x7f3fa5ba4b38] WARN - Unsupported element type banners
Jun 04, 2021 19:32:35.872 [0x7f3fa47ffb38] DEBUG - Completed: [192.168.0.3:61533] 200 GET /library/metadata/8147/banners (5 live) TLS GZIP 4ms 613 bytes (pipelined: 4)
Jun 04, 2021 19:32:37.250 [0x7f3fa31b5b38] ERROR - Error issuing curl_easy_perform(handle): 6
Jun 04, 2021 19:32:37.250 [0x7f3fa31b5b38] ERROR - HTTP -6 downloading url https://metadata.provider.plex.tv/library/metadata/5d9c0871ba6eb9001fba43ff/images?episodeOrder=tmdbAiring&X-Plex-Country=US&X-Plex-Language=en-US&X-Plex-Text-Format=markdown&X-Plex-Api-Token=xxxxxxxxxxxxxxxxxxxx
Jun 04, 2021 19:32:37.251 [0x7f3fa4822b38] DEBUG - Completed: [192.168.0.3:52885] 200 GET /library/metadata/8147/posters (5 live) TLS GZIP 5017ms 756 bytes (pipelined: 9)
Jun 04, 2021 19:32:37.252 [0x7f3fa47ffb38] DEBUG - Auth: authenticated user 1 as jian.jiang
Jun 04, 2021 19:32:37.252 [0x7f3fa5ba4b38] DEBUG - Request: [192.168.0.3:52885 (Subnet)] GET /library/metadata/8147/posters (5 live) TLS GZIP Signed-in Token (jian.jiang)
Jun 04, 2021 19:32:37.392 [0x7f3fa47ffb38] DEBUG - Completed: [192.168.0.3:54157] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (5 live) TLS GZIP 20001ms 5 bytes (pipelined: 18)
Jun 04, 2021 19:32:37.396 [0x7f3fa4822b38] DEBUG - Auth: authenticated user 1 as jian.jiang
Jun 04, 2021 19:32:37.396 [0x7f3fa31b5b38] DEBUG - Request: [192.168.0.3:54157 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (5 live) TLS GZIP Signed-in Token (jian.jiang)
Jun 04, 2021 19:32:37.396 [0x7f3fa31b5b38] DEBUG - Content-Length is -1 (of total: -1).
Jun 04, 2021 19:32:42.263 [0x7f3fa5ba4b38] ERROR - Error issuing curl_easy_perform(handle): 6
Jun 04, 2021 19:32:42.263 [0x7f3fa5ba4b38] ERROR - HTTP -6 downloading url https://metadata.provider.plex.tv/library/metadata/5d9c0871ba6eb9001fba43ff/images?episodeOrder=tmdbAiring&X-Plex-Country=US&X-Plex-Language=en-US&X-Plex-Text-Format=markdown&X-Plex-Api-Token=xxxxxxxxxxxxxxxxxxxx
Jun 04, 2021 19:32:42.264 [0x7f3fa4822b38] DEBUG - Completed: [192.168.0.3:52885] 200 GET /library/metadata/8147/posters (5 live) TLS GZIP 5012ms 756 bytes (pipelined: 10)
Jun 04, 2021 19:32:42.265 [0x7f3fa47ffb38] DEBUG - Auth: authenticated user 1 as jian.jiang
Jun 04, 2021 19:32:42.265 [0x7f3fa31b5b38] DEBUG - Request: [192.168.0.3:52885 (Subnet)] GET /library/metadata/8147/posters (5 live) TLS GZIP Signed-in Token (jian.jiang)
Jun 04, 2021 19:32:42.733 [0x7f3fa31b5b38] DEBUG - Doing expensive tags write for 'Battlestar Galactica (2003)' because something changed.
Jun 04, 2021 19:32:42.750 [0x7f3fa31b5b38] DEBUG - Doing expensive tags write for 'Battlestar Galactica (2003)' because something changed.
Jun 04, 2021 19:32:42.853 [0x7f3fa31b5b38] DEBUG - Doing expensive tags write for 'Battlestar Galactica (2003)' because something changed.
Jun 04, 2021 19:32:42.868 [0x7f3fa47ffb38] DEBUG - Completed: [192.168.0.3:52885] 200 GET /library/metadata/8147/posters (5 live) TLS GZIP 603ms 2013 bytes (pipelined: 11)
Jun 04, 2021 19:32:57.397 [0x7f3fa4822b38] DEBUG - Completed: [192.168.0.3:54157] 200 GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (5 live) TLS GZIP 20001ms 5 bytes (pipelined: 19)
Jun 04, 2021 19:32:57.401 [0x7f3fa47ffb38] DEBUG - Auth: authenticated user 1 as jian.jiang
Jun 04, 2021 19:32:57.401 [0x7f3fa31b5b38] DEBUG - Request: [192.168.0.3:54157 (Subnet)] GET /player/proxy/poll?deviceClass=pc&protocolVersion=3&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (4 live) TLS GZIP Signed-in Token (jian.jiang)
Jun 04, 2021 19:32:57.401 [0x7f3fa31b5b38] DEBUG - Content-Length is -1 (of total: -1).
Jun 04, 2021 19:32:57.512 [0x7f3fa47ffb38] DEBUG - Auth: authenticated user 1 as jian.jiang

Thanks. I changed the DNS to Google’s public DNS now.

I just saw new version 4656 is available I’ll update to the new one and see what happens. I may send you new log.

Plex Media Server Logs_2021-06-04_20-44-32.zip (2.9 MB)
Hi this is the new log.

Still some connection issue but it’s different (connection refused)

Jun 04, 2021 20:42:25.001 [0x7f99bc1b7b38] ERROR - Error issuing curl_easy_perform(handle): 7
Jun 04, 2021 20:42:25.001 [0x7f99bc1b7b38] WARN - HTTP error requesting GET https://69-181-208-88.2a65d039ad3449bfb293a911f69fedc4.plex.direct:26687/identity (7, Couldn't connect to server) (Failed to connect to 69-181-208-88.2a65d039ad3449bfb293a911f69fedc4.plex.direct port 26687: Connection refused)

Part of the log that’s related to scanning:

Jun 04, 2021 20:43:26.632 [0x7f99bb22ab38] DEBUG - Library timeline cull complete with 0 items left.
Jun 04, 2021 20:43:26.632 [0x7f99bb22ab38] DEBUG - Scanning TV Shows using en-US(Plex TV Series) with 4 current media items and 1 section locations in the database.
Jun 04, 2021 20:43:26.632 [0x7f99bb22ab38] DEBUG - Performing a scan with 'Plex TV Series' (language: en-US virtual: 0).
Jun 04, 2021 20:43:26.632 [0x7f99bb22ab38] DEBUG -   * Scanning /volume1/homes/jianjiang/TV Shows
Jun 04, 2021 20:43:26.632 [0x7f99bb22ab38] DEBUG - Scanner: Processing directory /volume1/homes/jianjiang/TV Shows (parent: no)
Jun 04, 2021 20:43:26.633 [0x7f99bb22ab38] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.
Jun 04, 2021 20:43:26.633 [0x7f99bb22ab38] DEBUG - Scanner: Processing directory /volume1/homes/jianjiang/TV Shows/Battlestar Galactica miniseries (2003) (parent: yes)
Jun 04, 2021 20:43:26.634 [0x7f99bb22ab38] DEBUG - Directory had 2 files, database had 0 files, can't skip.
Jun 04, 2021 20:43:26.635 [0x7f99bb22ab38] DEBUG - Activity: updated activity b7012c33-8986-419a-8dc4-29534620e9bf - completed 49.5% - Scanning TV Shows
Jun 04, 2021 20:43:26.635 [0x7f99bb22ab38] DEBUG - Scanner: Processing directory /volume1/homes/jianjiang/TV Shows/Battlestar Galactica (2004) (parent: yes)
Jun 04, 2021 20:43:26.635 [0x7f99bb22ab38] DEBUG - Skipping over directory 'Battlestar Galactica (2004)', as nothing has changed; removing 0 media items from map.
Jun 04, 2021 20:43:26.636 [0x7f99bb22ab38] DEBUG - Scanner: Processing directory /volume1/homes/jianjiang/TV Shows/Battlestar Galactica (2004)/Season 1 (parent: yes)
Jun 04, 2021 20:43:26.637 [0x7f99bb22ab38] DEBUG - Directory had 13 files, database had 4 files, can't skip.

The 4 files are ones that show up in the library.

Curl error 7, especially when you see plex.direct domain, means your modem/router does not allow the domain to be mapped onto your LAN.

PMS maps all the players and itself to a private domain named ‘plex.direct’. It makes finding things much easier.

Does your modem router allow adding exception rules in the DNS rebinding protection tables?

If so, you want to allow “Private Domain: plex.direct” for the LAN

My router probably can do that. I’ll need to check.

But I have some new findings:

It seems like the name of folder and media files play an important role here:

If I change the folder name from “Show Title (2003)” to “Show Title” (removing the year) and the name of media files from “Show Title- Season 1 Episode 1” to “Show Title - S01E01” then it can be scanned.

I just did so to a few ones and now it worked. I’ll do this to all of them and see what happens.

Now I’m going to point out that your naming is not the best. It may work for some things but it is not guaranteed…

  1. Wrong series year
  2. Wrong episode naming format.

Please look below at my files.

TV Shows/Battlestar Galactica (2004)/Season 1/Battlestar Galactica- Season 1 Episode 10.mkv

The guaranteed format is:

[chuck@lizum ~.502]$ cd /vie/tv2/Battlestar\ Galactica\ \(2003\)/
[chuck@lizum Battlestar Galactica (2003).503]$ cd *01
[chuck@lizum Season 01.504]$ ls -la
total 48993720
drwxr-xr-x. 2 chuck chuck       4096 Feb 20 03:48 ./
drwxr-xr-x. 9 chuck chuck       4096 Aug  3  2019 ../
-rw-r--r--. 1 chuck chuck 7893466392 Apr  5 16:55 Battlestar Galactica (2003) - S01E01 - 33.mkv
-rw-r--r--. 1 chuck chuck 3522001859 Apr  5 16:55 Battlestar Galactica (2003) - S01E02 - Water.mkv
-rw-r--r--. 1 chuck chuck 3522138872 Apr  5 16:55 Battlestar Galactica (2003) - S01E03 - Bastille Day.mkv
-rw-r--r--. 1 chuck chuck 3523655188 Apr  5 16:55 Battlestar Galactica (2003) - S01E04 - Act of Contrition.mkv
-rw-r--r--. 1 chuck chuck 3522150669 Apr  5 16:55 Battlestar Galactica (2003) - S01E05 - You Can't Go Home Again.mkv
-rw-r--r--. 1 chuck chuck 3524231466 Apr  5 16:55 Battlestar Galactica (2003) - S01E06 - Litmus.mkv
-rw-r--r--. 1 chuck chuck 3522691315 Apr  5 16:55 Battlestar Galactica (2003) - S01E07 - Six Degrees of Separation.mkv
-rw-r--r--. 1 chuck chuck 3522752737 Apr  5 16:55 Battlestar Galactica (2003) - S01E08 - Flesh and Bone.mkv
-rw-r--r--. 1 chuck chuck 3523777041 Apr  5 16:55 Battlestar Galactica (2003) - S01E09 - Tigh Me Up, Tigh Me Down.mkv
-rw-r--r--. 1 chuck chuck 3523352520 Apr  5 16:55 Battlestar Galactica (2003) - S01E10 - The Hand of God.mkv
-rw-r--r--. 1 chuck chuck 3523838611 Apr  5 16:55 Battlestar Galactica (2003) - S01E11 - Colonial Day.mkv
-rw-r--r--. 1 chuck chuck 3521782435 Apr  5 16:55 Battlestar Galactica (2003) - S01E12 - Kobol's Last Gleaming (1).mkv
-rw-r--r--. 1 chuck chuck 3523572982 Apr  5 16:55 Battlestar Galactica (2003) - S01E13 - Kobol's Last Gleaming (2).mkv
[chuck@lizum Season 01.505]$

There are tools which help automate this.

I use “FileBot”.

There are several others out there.

Thanks for the suggestions.

It seems like it’s the naming issue.

In this case what name is good for “Battlestar Galactica miniseries”? it has “part 1” and “part 2”

Season  00/
-rw-r--r--. 1 chuck chuck 1239804871 Apr  5 16:55 Battlestar Galactica (2003) - S00E01 - Battlestar Galactica The Miniseries (1).mkv
-rw-r--r--. 1 chuck chuck 1067719411 Apr  5 16:55 Battlestar Galactica (2003) - S00E02 - Battlestar Galactica The Miniseries (2).mkv

It was broadcast as two episodes. That’s the easiest way to represent it.

Thank you all for help!

Have a good weekend!