[FIXED] New Plex Movie agent break if folder naming in regex format `es\d\d[-_]\d+`

Okay… think I see a problem in your Plex Media Scanner.log …

Jun 20, 2021 09:09:54.543 [0x7f6ec9f60808] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 20, 2021 09:09:54.543 [0x7f6ec9f60808] DEBUG -   * Scanning /data/es14_3/movie/test
Jun 20, 2021 09:09:54.543 [0x7f6ec9f60808] DEBUG - Scanner: Processing directory /data/es14_3/movie/test (parent: no)

You are using the Plex Movie Scanner, this is not correct. You should be using the Plex Movie, like in the screenshot below.

Screenshot from 2021-06-20 22-36-00

In addition I also see this in your logs…

Jun 20, 2021 09:09:54.544 [0x7f6ec9f60808] DEBUG - File '/data/mb10/movie/test/The.Misfits.2021.1080p.AMZN.WEBRip.DDP5.1.x264-CM.m4v' didn't exist, can't skip.
Jun 20, 2021 09:09:54.544 [0x7f6ec9f60808] DEBUG - Scanner: Processing directory /data/es14_3/movie/test/Minari.2020.KOREAN.1080p.WEBRip.x265-VXT (parent: yes)
Jun 20, 2021 09:09:54.545 [0x7f6ec9f60808] DEBUG - Skipping over directory 'Minari.2020.KOREAN.1080p.WEBRip.x265-VXT', as nothing has changed; removing 1 media items from map.

which is not the same folder structure you say you are using above so I wonder where that is coming from.

Thanks for digging into the log! I tested multiple times with different path and libraries. And I have two drives, the new scanner works on mb10 drive (old one) but not new one es14_3. They are both ExFAT.

One strange thing is when the library only contains the path of new drive, the scanner log will not even update. You can see the latest scanner log is updated this morning, but I have rescanned new library multiple times.

Can you check if you have space on disk?

If I may add ,

  1. The names are absolutely terrible.
  2. Clean names, per standard, work correctly

Recommend FileBot (or similar tool) to get rid of the junk from those torrent downloaders

1 Like

Yes. It is a new drive with plenty of space.

Thanks for help! I renamed as suggested but still not work.

I think this is not a drive issue because I tested on different drives, new movie scanner always failed.

I suspect it may be related to Docker and I found an error log when I check container log:

Critical: libusb_init failed

Not sure whether this is helpful.

Has anyone used new movie scanner under Docker?

It seems my issue is not the same as Server 1.23.2.4656 - Unable to scan movies -- Seg Fault (External), because I can not scan movie from GUI, but that post is about CLI and the GUI work for that poster. I will submit my recent log here and hope someone would like to help debug.

I upgrade to 1.24.0 but it still does not work. Here is my log.

I created a “QA-Movies” library with only one folder below:

/data/es14_3/movie/test
└── Minari (2020) {tmdb-615643}
    └── Minari (2020) {tmdb-615643}.mp4

Plex Media Server Logs_2021-08-09_21-39-02.zip (1.9 MB)

@ChuckPa I think I may find the problem: the partition of my external drive breaks the new movie scanner (but still works for legacy scanner).

My current partition on existing two drives: they have Partitioning: GUID Partition Table, but only one exFAT partition. I don’t remember whether I deleted the EFI partition so it become like this.

The file in the main disk of my machine works for new movie scanner. And I grab one smaller drive and format it on Ubuntu directly, that drive does not have any partitioning, only a single volume. And it works under new movie scanner.

My plan is to reformat my large drive and see how it works. It is very wired that legacy scanner works on all these drives. So I think there are definitely something changed in new scanner makes it not compatible any more.

@ChuckPa I reformat my 14TB drive but it still does not work. And I think I found the problem: New movie scanner can not scan large drive! I think large means “>=10TB”, I only have 4TB, 10TB and 14TB (latter two do not work), not sure whether it works on 8TB. I am using connect all my drives to machine directly, not NAS or raid.

Details:

  • On Ubuntu 20.04
    • I have 10TB and 14TB (not the same one on Mac) exFAT drives, both of them does not work under new scanner. But I have tested 4TB drive still works on Ubuntu.
    • I reformat my 14TB drive to exFAT, NTFS, Ext4, none of them work. I also tried GPT partitioning v.s. no partitioning, also none of them work.
  • On Mac
    • I reproduce this using docker and mount two exFAT drives: one is 4TB and one is 14TB. The 4TB can find the movie but 14TB just says library is empty.

And again, legacy scanner works for all of above cases.

So it is not the problem with host operating system, not problem with partitioning, not problem with filesystem of the drive, it is the problem of size of the drive (>=10TB)!

I have log above but I don’t think that is helpful because everytime it just said skip the folder then found nothing. Can anyone help to reproduce this problem using large drive? If so, I think that is the issue.

I just reproduced this on Mac using native Plex Media Server with a 14TB exFAT drive. So this is not only a docker problem.

I need ask you some serious questions.

  1. WHY are you using exFAT on a Linux drive ? EXT4 or XFS are far better choices for native Linux. exFAT is the worst possible choice here. What is the driving requirement ?

  2. Disk size does not matter. Permissions do.
    a. What are the permissions of the mount point directory BEFORE mounting the drive ?
    b. What are the permissions of the mount point directory , and subdirectories, AFTER mounting the drive ?

@ChuckPa

  1. I am using exFAT because I may use my drives on both Mac and Linux. exFAT is the format that works on both with less efforts. Also Linux kernel 5.10 added native exFAT support, so it is not a big issue.
  2. Ubuntu Permission
    There is NO mount point before drive is mounted, all of following are AFTER mounted
  • 14TB Ext4 (NOT work)
    • Mount point dir: drwx------ 4 myuser myuser
    • Sub dir: drwxr-xr-x 3 myuser myuser
    • File: -rwxr-xr-x 1 myuser myuser
  • 10TB exFAT (NOT work)
    • Mount point dir: drwxr-xr-x 24 myuser myuser
    • Sub dir: drwxr-xr-x 5 myuser myuser
    • File: -rwxr-xr-x 1 myuser myuser
  1. Mac Permission
  • 14TB exFAT (NOT work)
    • Mount point dir: drwxrwxrwx 1 myuser staff
    • Sub dir: drwxrwxrwx 1 myuser staff
    • File: -rwxrwxrwx 1 myuser staff
  • 4TB exFAT (WORK)
    • Mount point dir: drwxrwxrwx 1 myuser staff
    • Sub dir: drwxrwxrwx 1 myuser staff
    • File: -rwxrwxrwx 1 myuser staff

I think the Mac case shows the issue very clearly. It is using native Plex Media Server, not docker. Same permissions/filesystem/file for both drive, one work and the other doesn’t. Only difference is the size.

If I may, exFAT is great for transporting between OS’s but not great for everyday storage on macOS in my experience. Unless Apple has made that driver much, much better. I use some 2TB and 4TB drives to transport files between macOS and Windows all the time without a problem.

My main Plex server is a MacMini with a USB connected RAID volume as follows:

Screen Shot 2021-08-12 at 11.20.09 AM

And Plex finds every movie, tv, and extra file I have.

Chris

1 Like

Thanks for the input! Are you using new movie scanner?

I am not using RAID, so I don’t know whether that causes the problem. The issue is very wired. I formatted the disk to other format but it still does not work. The only difference I can find is the size. I know it sounds not reasonable but that is all I can get.

I have already spent a lot of time moving my files back and forth just to debug this, but still no solution yet. Very frustrated… :weary:

@ChuckPa Any other thoughts about this? What can I do next?

There it is – This is the problem.

You are relying on Nautilus’ automounter.

This does not work with Plex

I will further “guess”, your hdds are in /media ? :slight_smile:

Do the mount properly on linux and it will be fine.

When you take control of the mount:

  1. The drives are mounted at system start – before you log in
  2. The drives are not exclusive to you. They are system resources.

@ChuckPa Thanks for the tips! But that is not the problem. I FINALLY find the bug! It is really wired! You can reproduce it 100% on your own: name the folder as es14_1, put media files in it, then try with new scanner.

I think there is a bug in your new movie scanner regex matching. As long as a folder/drive naming in the scheme ^es\d\d[-_]\d+ in the path, then everything inside that folder/drive will not be scanned. It has to be this regex format to trigger the bug because I have tried many other and they all won’t trigger it.

It is too funny that all my large drives are named like this! Maybe Plex doesn’t like WD Easystore? That’s why I name them like this. LOL.

Okay, now, could we fix this or I have to rename my drive because Plex forbid this naming convention? :laughing:

1 Like

Nothing to do with the operating system or disk permission or disk filesystem, etc. It is a bug inside the scanner code when doing scanning.

Hah, I think he’s right. Items in folders with those names vanish. That’s funny.

Show me two things and provide two more ?

  1. Exact full example path which fails so I can recreate

  2. Exact full example path (corrected) which will work.

  3. DEBUG logs capturing this demonstration.

  4. Path to where PMS starts the library section “root” (directory)