Yet another scan library issue question - Debian 9.1 stretch OS based docker image of Plex

First music files and first movie file I placed on server, Plex sees find. Later the same day, ripped another DVD via Handbrake, and copied movie file to Plex server (i.e. directory that docker image of plex sees) and 2nd movie file is never seen. I copied the first file to different name, and it is seen. I copied the 2nd file to different name, it is NOT SEEN just as the original 2nd movie file is not seen. I check the permissions of the parent folders and all movie files, they are set to the ‘media’ id that the docker instance is aware of, when i used docker-compose to setup the docker image of Plex. I also reset the permissions of all Movies files to ‘root’ as a test, and stil the same behavior, only the original movie file is seen. The 2nd movie file is never seen by Plex, but is seen by the Linux OS, on the docker path/volume just fine. I can play either movie file directly, so this is a real mystery!

Is there a Plex log file I can review to see why the scan seems to be missing or skipping the 2nd movie file?

How is the file named?

https://support.plex.tv/hc/en-us/articles/200381023-Naming-Movie-files

It is very important to name the files correctly for the scanner to pick them up

And yes there are debug logs to review the scanner:

https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files

@nokdim,

I did some more testing. I downloaded the following test video pattern files, I have used these before to test various devices over the years.

Source…
http://www.mytvtestdisc.com/

List of files THAT SHOULD BE in library called ‘Test Patterns’ of other videos type selection…

BarsAndTone.mp4
ColorBarsAndTone50minV2.mp4
ColorizedGrayscale.mp4
DancingWhiteWindow.mp4
FlatFields.mp4
IndianHead.mp4
PhilipsCircle.mp4
SplitGrayscale.mp4
SubwooferSweep.mp4
VibrationSweep.mp4
myTvTestDiscV5.m4v

Only 4 of the above list of files were seen by the scan…

BarsAndTone.mp4
FlatFields.mp4
IndianHead.mp4
myTvTestDiscV5.m4v

As I noted before, the host OS sees all files, the docker plex image sees all files via its volume map back to the host OS path. It is only Plex server that fails to see all files.

None of these files are named oddly per my perspective. Since they files will never have any relevant meta data (well not until freedb updates from my plex server right? Or maybe some else has done so in the past)

I plan to review the logs tonight to see if I can figure out what is going on, this is a bit weird to say the least.

Unfortunately, the documentation on where the log files are, is not complete, or there is some difference between the docker implementation and other variants. Such that there is NO $PLEX_HOME export (variable, in the docker instance. For example:

declare -x CHANGE_CONFIG_DIR_OWNERSHIP=“true”
declare -x HOME="/config"
declare -x HOSTNAME=“test”
declare -x LANG=“C.UTF-8”
declare -x LC_ALL=“C.UTF-8”
declare -x OLDPWD="/"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PGID=“1001”
declare -x PLEX_CLAIM="“nope”"
declare -x PUID=“1001”
declare -x SHLVL=“1”
declare -x TERM=“xterm”

However, a bit if snooping, within the docker instance, using the relative path information the log reference information does provide, thus provides the logs location, for example:

find / | grep “Library/Application Support/Plex Media Server/Logs/”

Thus the docker environment $HOME is the actual absolute path prefix, not $PLEX_HOME, is this in error, or does the documentation need to be updated to show this variance?

Moving on, in the analysis, Plex Media Scanning is just NOT SEEING all the files present per the log. For example, from the log:

Aug 25, 2017 02:47:13.062 [0x7f4a7da6f800] DEBUG - * Scanning /data/Test Patterns
Aug 25, 2017 02:47:13.062 [0x7f4a7da6f800] DEBUG - * Scanning directory /data/Test Patterns (parent: no)
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] VERBOSE - * Noting that ‘’ was updated at 2017-08-24 22:49:14
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] VERBOSE - * Taking directory ‘’ (20) out of the map (0 left)
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] DEBUG - Adding file for scanner: /data/Test Patterns/BarsAndTone.mp4
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] DEBUG - Adding file for scanner: /data/Test Patterns/FlatFields.mp4
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] DEBUG - Adding file for scanner: /data/Test Patterns/IndianHead.mp4
Aug 25, 2017 02:47:13.063 [0x7f4a7da6f800] DEBUG - Adding file for scanner: /data/Test Patterns/myTvTestDiscV5.m4v
Aug 25, 2017 02:47:13.066 [0x7f4a7da6f800] DEBUG - Skipping over directory ‘’, as nothing has changed; removing 4 media items from map.
Aug 25, 2017 02:47:13.067 [0x7f4a7da6f800] DEBUG - Removing 0 media items that were left.
Aug 25, 2017 02:47:13.067 [0x7f4a7da6f800] DEBUG - Removing 0 directories that were left.

Only 4 files are seen, when the actual docker path reference, shows the following files:

root@test:/data/Test Patterns# pwd
/data/Test Patterns
root@test:/data/Test Patterns# ls -l
total 394488
-rw-r–r-- 1 root root 13239124 Aug 24 22:17 BarsAndTone.mp4
-rw-r–r-- 1 root root 209477522 Aug 24 22:37 ColorBarsAndTone50minV2.mp4
-rw-r–r-- 1 root root 12035566 Aug 24 22:18 ColorizedGrayscale.mp4
-rw-r–r-- 1 root root 10536770 Aug 24 22:19 DancingWhiteWindow.mp4
-rw-r–r-- 1 root root 8227010 Aug 24 22:19 FlatFields.mp4
-rw-r–r-- 1 root root 84190661 Aug 24 22:20 IndianHead.mp4
-rw-r–r-- 1 root root 17062164 Aug 24 22:19 PhilipsCircle.mp4
-rw-r–r-- 1 root root 7303784 Aug 24 22:18 SplitGrayscale.mp4
-rw-r–r-- 1 root root 10456194 Aug 24 22:18 SubwooferSweep.mp4
-rw-r–r-- 1 root root 10456297 Aug 24 22:17 VibrationSweep.mp4
-rw-r–r-- 1 root root 20949162 Aug 24 22:38 myTvTestDiscV5.m4v

The original source mount point from the Host OS side, shows the following files:

root@test:/mnt/storage/Test Patterns# pwd
/mnt/storage/Test Patterns
root@test:/mnt/storage/Test Patterns# ls -l
total 394488
-rw-r–r-- 1 root root 13239124 Aug 24 16:17 BarsAndTone.mp4
-rw-r–r-- 1 root root 209477522 Aug 24 16:37 ColorBarsAndTone50minV2.mp4
-rw-r–r-- 1 root root 12035566 Aug 24 16:18 ColorizedGrayscale.mp4
-rw-r–r-- 1 root root 10536770 Aug 24 16:19 DancingWhiteWindow.mp4
-rw-r–r-- 1 root root 8227010 Aug 24 16:19 FlatFields.mp4
-rw-r–r-- 1 root root 84190661 Aug 24 16:20 IndianHead.mp4
-rw-r–r-- 1 root root 20949162 Aug 24 16:38 myTvTestDiscV5.m4v
-rw-r–r-- 1 root root 17062164 Aug 24 16:19 PhilipsCircle.mp4
-rw-r–r-- 1 root root 7303784 Aug 24 16:18 SplitGrayscale.mp4
-rw-r–r-- 1 root root 10456194 Aug 24 16:18 SubwooferSweep.mp4
-rw-r–r-- 1 root root 10456297 Aug 24 16:17 VibrationSweep.mp4
root@test:/mnt/storage/Test Patterns#

I also forced all files to be user:group owned by the plex id. But this seems odd, since Plex server is in a container, and some files where seen when user:group was root, as noted above. But the results were still incomplete:

Aug 25, 2017 03:00:09.869 [0x7f834b33f800] DEBUG - * Scanning /data/Test Patterns
Aug 25, 2017 03:00:09.870 [0x7f834b33f800] DEBUG - * Scanning directory /data/Test Patterns (parent: no)
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] VERBOSE - * Noting that ‘’ was updated at 2017-08-24 22:49:14
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] VERBOSE - * Taking directory ‘’ (20) out of the map (0 left)
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] DEBUG - Adding file for scanner: /data/Test Patterns/BarsAndTone.mp4
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] DEBUG - Adding file for scanner: /data/Test Patterns/FlatFields.mp4
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] DEBUG - Adding file for scanner: /data/Test Patterns/IndianHead.mp4
Aug 25, 2017 03:00:09.871 [0x7f834b33f800] DEBUG - Adding file for scanner: /data/Test Patterns/myTvTestDiscV5.m4v
Aug 25, 2017 03:00:09.874 [0x7f834b33f800] DEBUG - Skipping over directory ‘’, as nothing has changed; removing 4 media items from map.
Aug 25, 2017 03:00:09.875 [0x7f834b33f800] DEBUG - Removing 0 media items that were left.
Aug 25, 2017 03:00:09.875 [0x7f834b33f800] DEBUG - Removing 0 directories that were left.

So I don’t see this issue as permissions issue per se. At least not from the scanner log? At this point, I can’t see any errors in the log, or messages or even warnings that explain why some files are seen and scanned and some are not, frankly the scanner log is not of much help in this context, from my view.

Could I be looking at the wrong log? But since I am new to Plex Server, maybe someone with more knowledge or experience can provide additional insight? Would be greatly appreciated.

Curious as to why this issue was happening, I setup a test platform, this is easy to do if you are familiar with server virtualization, which I am.

I changed the implementation setup, installing Plex Media Server on Debian 9.1, without SnapRAID or the Plex Media Server as a docker container, going back to basics if you will.

This test setup worked as expected, media files are seen as expected, in fact regardless of the file ownership as root or plex for example, the only key was to make sure the parent folder is owned by plex user, i.e. # chown plex:plex /mnt/storage, i.e. the parent directory or folder.

So the issue is with the docker container or the SnapRAID setup, I will test the docker container next, without using SnapRAID. Given that some files are seen and some are not seen, I suspect that the SnapRAID setup is the root issue, no pun intended.

I have tested SnapRAID direct with Plex Media Server install into OS, not as a docker image based setup, I did not have any visibility issues with the uploaded video/music files as was the discussion point for this thread. So, now, I need to test my setup with Plex Media Server as docker instance, again, and see if I can get the expected results. I am using the Plex Media docker image, so the only thing I can think of, is that my docker-compose setup is tripping something up. I use docker compose to stage and maintain my docker images.