Just wanted to mention that I’m having the same issue.
Are any of you running out of notify slots (too many directories to monitor – 8192 is default host maximum) ?
I wouldn’t think so, but is there a way for me to check? Seems to only happen with certain files.
Edit: found it. I’m using 1021 directories, so not out of notify slots.
source for finding number of directories:
If you’re not out of directories then there is a problem with file locking on the host side which supports the container. Something about that mapped directory isn’t allowing locking to work right.
I’ll need to see what’s happening here.
- Restart PMS (DEBUG logging ON, VERBOSE - OFF )
- Let it have a minute to setup all the notify slots
- Recreate the failure.
- Pause 30 seconds
- Download the logs ZIP
- attach here
This is one of my pet peeves about containers… another layer of complexity for no appreciable gain.
Looks to be on AC3 audio files (5.1 and 2.0).
I am not having the issue on files with AAC audio.
There’s a lot of PII in the logs (domain names, usernames, etc.) that I wouldn’t want to post to a public forum. Is there a way to sanitize the info. yet get you what you need?
PM Sent.
I am also having the same issue. I am running a docker container (linuxserver/plex) with local volume mounts to the media and transcode data. The only difference is that the issue goes away when I restart the server or when I force kill the Plex EAE Service.
I can confirm I am far from running out of notify slots. The docker hosts already has a raised maximum value. Anyway, I even disabled the automatic library scan without any success.
$ cat /proc/sys/fs/inotify/max_user_watches
262144
$ find ./{Photos,Videos} -type d -print | wc -l
1217
This issue seems to occur for video files with an EAC3 audio track that needs to be transcoded. Monitoring the folder path indicated in the log error, I can see the ec3 files being generated but not the related wav files.
As mentioned above, the issue appears to be related to the Plex EAE Service potentially going bad over time. Killing it temporarily resolve the issue as a new process is spawn the next time it is needed.
I can provide some server log snippets if necessary but increasing transcoder log level to verbose doesn’t show much and I don’t see any logs from the Plex EAE Service. I believe this started happening about a month ago. I am running the latest server version 1.21.2.3918.
As side note, is there a reason why the Plex EAE Service works out of /tmp instead of the configured transcoder temporary directory?
Would someone tell me two things please?
-
On Ubuntu, which package should be installed? I see multiple docker base packages. I have trouble with both.
-
May I have a container configuration to use?
Reason for my request: Docker and I do not get along. I tried using it on Fedora and it left a very bad taste in my mouth. Between QNAP, Synology, and Fedora, containers were not portable. I was quickly disenchanted and grew to dislike it.
I personally use the QNAP container station. However, have you tried going through the official documentation on how to add the Docker package repository on Ubuntu?
Below is my Docker Compose file I use to run my Plex container. @gregology provided another example above if you rather start directly using the docker command line.
As far as the NVIDIA configuration in my setup, this is only necessary to support hardware transcoding and should probably not be needed to troubleshoot this issue.
version: '3'
services:
plex:
image: linuxserver/plex
container_name: plex
network_mode: host
restart: always
devices:
- /dev/nvidia0:/dev/nvidia0
- /dev/nvidiactl:/dev/nvidiactl
- /dev/nvidia-uvm:/dev/nvidia-uvm
volumes:
- ./data:/config
- /share/Multimedia:/data
- /dev/shm:/transcode
- /opt/NVIDIA_GPU_DRV/usr:/usr/local/nvidia:ro
environment:
PUID: <docker-uid>
PGID: <docker-gid>
VERSION: latest
yes, I have gone through the docs.
I do have active QNAP containers. Those are for NAS-local media. Since the media is on the QNAP, using it will not help diagnose this issue.
Here is the contradiction as both work differently and both have yielded frustration.
docker-ce-rootless-extras/focal 5:20.10.2~3-0~ubuntu-focal amd64
docker-ce/focal 5:20.10.2~3-0~ubuntu-focal amd64 [residual-config]
docker-compose/focal,focal 1.25.0-1 all
docker-doc/focal-updates,focal-updates 19.03.8-0ubuntu1.20.04.2 all
docker-registry/focal 2.7.1+ds2-7 amd64
docker.io/focal-updates 19.03.8-0ubuntu1.20.04.2 amd64
docker2aci/focal 0.17.2+dfsg-2 amd64
docker/focal,focal,now 1.5-2 all [installed]
From this, I conclude: docker-ce or docker. Again, both yield different levels of success.
What’s `wm-docker’ ?
OK, I figured it out.
On Ubuntu:
- Install docker-ce, not
docker(dockerhas a borked systemd configuration)
Here is the type of difficulty I see with docker.
drwxrwxrwt 21 dockerplex dockerplex 12288 Jan 23 16:37 ./
drwxr-xr-x 30 root root 4096 Jan 5 00:30 ../
-rw------- 1 dockerplex dockerplex 44 Jan 23 16:28 AXISUXwdAPB1ZXX0
drwx------ 2 dockerplex dockerplex 4096 Jan 23 16:30 .com.google.Chrome.FE3iC3/
-rw------- 1 dockerplex dockerplex 0 Jan 23 16:28 config-err-xEMuQV
drwxrwxrwt 2 dockerplex dockerplex 4096 Jan 23 16:28 .font-unix/
drwxrwxrwt 2 dockerplex dockerplex 4096 Jan 23 16:28 .ICE-unix/
drwx------ 2 dockerplex dockerplex 4096 Jan 23 16:28 ssh-dmOXIYAtR5iY/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-bolt.service-QRqfkj/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-colord.service-VyAJMg/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:29 systemd-private-c1132328af484ee28adab414fc704cb4-fwupd.service-M5Mq0g/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-ModemManager.service-8X1xhg/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-switcheroo-control.service-QLxqkj/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-systemd-logind.service-Dm6MEg/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-systemd-resolved.service-tryOKi/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-systemd-timesyncd.service-GCTong/
drwx------ 3 dockerplex dockerplex 4096 Jan 23 16:28 systemd-private-c1132328af484ee28adab414fc704cb4-upower.service-vNjGhi/
drwxrwxrwt 2 dockerplex dockerplex 4096 Jan 23 16:28 .Test-unix/
drwx------ 2 dockerplex dockerplex 4096 Jan 23 16:34 tracker-extract-files.1026/
drwx------ 2 dockerplex dockerplex 4096 Jan 23 16:28 tracker-extract-files.125/
drwxr-xr-x 3 dockerplex dockerplex 4096 Jan 23 16:37 Transcode/
drwxrwxrwt 2 dockerplex dockerplex 4096 Jan 23 16:28 .X11-unix/
drwxrwxrwt 2 dockerplex dockerplex 4096 Jan 23 16:28 .XIM-unix/
[chuck@lizum ~.545]$
It’s completely taken over /tmp.
Config is:
sudo docker run \
-d \
--name plex \
--network=host \
-e TZ="EST" \
-e ADVERTISE_IP="http://<hostIPAddress>:32400/" \
-e PLEX_UID=1027 \
-e PLEX_GID=1027 \
-e PUID=1027 \
-e PGID=1027 \
-h lizum-docker \
-v /home/dockerplex:/config \
-v /tmp:/transcode \
-v /vie:/data \
plexinc/pms-docker
[chuck@lizum ~.505]$
It does run – until it takes the whole machine down because it did a sudo chown -R of everything in /tmp`
Anyone have an idea?
Mounting the Docker host /tmp is usually a bad idea especially if the container chown the mapped directory, and most importantly that volume could be limited in size if it is setup on a separate partition.
Why don’t you create two folders in /home/dockerplex: one for /config and one for /transcode? That way you would mount these volumes as /home/dockerplex/config:/config and /home/dockerplex/transcode:/transcode.
Thank you for that.
Clearly I’ve been spoiled by using Synology and QNAP. 
I’m loading it up and will try to get to the bottom of this EAE issue.
Which codec(s), as seen in the ‘Get Info’, produce this issue?
Here is the codec information of the file I was testing with:
Codec H264
Bitrate 3449 kbps
Bit Depth 8
Chroma Location left
Chroma Subsampling 4:2:0
Coded Height 720
Coded Width 1280
Color Primaries bt709
Color Range tv
Color Space bt709
Color Trc bt709
Frame Rate 23.976 fps
Height 720
Level 3.1
Profile high
Ref Frames 4
Scan Type progressive
Width 1280
Display Title 720p (H.264)
Extended Display Title 720p (H.264)
Codec EAC3
Channels 6
Bitrate 640 kbps
Language English
Audio Channel Layout 5.1(side)
Sampling Rate 48000 Hz
Display Title English (EAC3 5.1)
Extended Display Title English (EAC3 5.1)
Codec SRT
Language English
Title SDH
Display Title English (SRT)
Extended Display Title SDH (English SRT)
Thanks. I’ve created a test file now.
Only thing I’m waiting for is 850 TV series to index (to consume enough fs.inotify slots)
While going through the container configuration here while looking at what PMS does.
I have another question (as confirmation I am emulating the environment correctly):
-
After mounting the Syno NFS server, what does
mount | grep nfsreturn for the mount info ? Source media on NFS should have absolutely zero impact but I’m curious anyway. -
Which directory is the container’s root (where
/configis) ? -
Is it on the boot volume or a secondary mounted volume?
-
Is any part of the container’s internals, other than the source media, which is network mounted?
I’m asking this because there must be either a configuration error in the container or host or NFS server. The question is “what is it?” File locking is file locking. If that fails, EAE will fail. This is what I’m trying to replicate. Where is the file locking failing.
I can’t speak for the use case with a NFS mount. I am experiencing a similar issue on a local mounted volume for my media data. So, as you mentioned, it probably doesn’t have any impact.
If you want to check the directory structure inside your running container, you can open a shell prompt : docker exec -it plex bash.
All internal data of a running container is stored on the host.
I noticed these posts [1] & [2], from all the way back in 2017, which match my issue. It looks like it might have started earlier than I thought.
Regarding: Which directory is the container’s root?
That’s my question to ask folks where they have them as it compares to where the transode temp is AND where /tmp is .
I chatted with the Transcoder engineer who setup the EAE.
I found out why things are like they are:
- The EAE code was given to us by Dolby. We must use it AS-IS.
- After we compile it, they check the source then test and approve the binaries are still compliant to their specs.
- The transcoder temp needs fs.inotify.user_watch slots for normal detection of video segments. That’s our mechanism.
- Because we can’t modify Dolby’s code, there is only one way to verify it’s done writing the output files: A) It releases the lock on the file and B) IN_CLOSE_WRITE (inotify closed after writing) fires.
- Since the transcoder is driven primarily by inotify, it waits for the inotify event.
- When the event arrives, it then goes and ‘spins’ on the file until it can get exclusive access READ.
- When there is no file there, the mechanism fails and the transcoder, which was waiting for the output file, barks the error and stops.
This “No File” barking is what is showing up in the logs.
Getting back to a very relative part here: Where is the transcoder temp (/transcode in a container) and where is /tmp :
In this case, BOTH EAE and transcode video segments need inotify. NFS works just fine for the transcoder segments. If it’s not working for someone, I challenge the client because Synology implements NFSv4 perfectly.
Dolby needs to be local to the host AND have inotify slots available, AND on a file system which supports file locking.
Both my Linuxserver.io container and my Ubuntu NFS host are fully loaded now.
I’ve tested every EAC3 file I have. Everything plays in both servers.
May I please have samples of EAC3 files which fail, approx 1-2 minutes long.
The best way to create these are with FFMPEG to ensure the headers and moov atom are properly written. ( Use the -t <seconds> option)