Official Plex app on TrueNAS SCALE logs not behaving correctly

Joined
Sep 29, 2023
Messages
1
Hi all -

I recently migrated from ZoL (CentOS) to TrueNAS SCALE. Been an absolute dream so far. I have all of my applications humming along without issue, with one notable exception being Plex.

I have ensured that permissions are set correctly, and I've even gone so far as to delete the Logs folder out of my PMS directories and let the container recreate it, but for the life of me I cannot get the Plex application to write any log files.

The below snippet is from the host -

Code:
root@truenas[...cation Support/Plex Media Server/Logs]# pwd
/mnt/zpool1/plex/Library/Application Support/Plex Media Server/Logs
root@truenas[...cation Support/Plex Media Server/Logs]# ls -lh
total 0


This snippet is from within the container after attaching a shell -

Code:
root@plex:~/Library/Application Support/Plex Media Server# ls -lh
total 361K
drwxr-xr-x 12 plex plex   52 Sep 29 13:09  Cache
drwxr-xr-x  5 plex plex    6 Sep 21 14:12  Codecs
drwxr-xr-x 13 plex plex   14 Sep 29 11:02 'Crash Reports'
drwxr-xr-x  2 plex plex    2 Jul  7  2022  Diagnostics
drwxr-xr-x  2 plex plex    2 Feb  3  2023  Drivers
drwxrwxrwx  4 root root   35 Sep 29 13:06  Logs
drwxr-xr-x  4 plex plex   78 Sep 15 17:19  Logs-old
drwxr-xr-x  3 plex plex    3 Jul  4  2022  Media
drwxr-xr-x  8 plex plex    8 Jul  4  2022  Metadata
drwxr-xr-x  7 plex plex    7 Jul  1  2022 'Plug-in Support'
drwxr-xr-x  9 plex plex   10 Jul  1  2022  Plug-ins
-rw-------  1 plex plex 2.4K Sep 29 11:02  Preferences.xml
drwxr-xr-x  4 plex plex    4 Feb 14  2023  Scanners
-rw-------  1 plex plex  13K Sep 29 11:02 'Setup Plex.html'
drwxr-xr-x  5 plex plex    5 Sep 28 22:31  Updates
-rw-r--r--  1 plex plex    3 Sep 29 11:02  plexmediaserver.pid
drwxr-xr-x  2 plex plex   60 Jul  1  2022  prefbak
root@plex:~/Library/Application Support/Plex Media Server# cd Logs
root@plex:~/Library/Application Support/Plex Media Server/Logs# ls -lh
total 409K
drwxr-xr-x 3 plex plex    4 Sep 29 13:03 'ASS Scanner Logs'
drwxr-xr-x 2 plex plex    7 Sep 29 13:03 'PMS Plugin Logs'
-rw-r--r-- 1 plex plex  551 Sep 29 11:02 'Plex Crash Uploader.log'
-rw-r--r-- 1 plex plex  538 Sep 29 13:02 'Plex Media Scanner Analysis.1.log'
-rw-r--r-- 1 plex plex  538 Sep 29 11:53 'Plex Media Scanner Analysis.2.log'
-rw-r--r-- 1 plex plex  538 Sep 29 11:52 'Plex Media Scanner Analysis.3.log'
-rw-r--r-- 1 plex plex  538 Sep 29 11:06 'Plex Media Scanner Analysis.4.log'
-rw-r--r-- 1 plex plex  538 Sep 29 11:06 'Plex Media Scanner Analysis.5.log'
-rw-r--r-- 1 plex plex  538 Sep 29 13:05 'Plex Media Scanner Analysis.log'
-rw-r--r-- 1 plex plex  567 Sep 29 13:02 'Plex Media Scanner Chapter Thumbnails.1.log'
-rw-r--r-- 1 plex plex  567 Sep 29 11:53 'Plex Media Scanner Chapter Thumbnails.2.log'
-rw-r--r-- 1 plex plex  567 Sep 29 11:53 'Plex Media Scanner Chapter Thumbnails.3.log'
-rw-r--r-- 1 plex plex  567 Sep 29 11:06 'Plex Media Scanner Chapter Thumbnails.4.log'
-rw-r--r-- 1 plex plex  567 Sep 29 11:06 'Plex Media Scanner Chapter Thumbnails.5.log'
-rw-r--r-- 1 plex plex  567 Sep 29 13:06 'Plex Media Scanner Chapter Thumbnails.log'
-rw-r--r-- 1 plex plex  760 Sep 29 11:57 'Plex Media Scanner Credits.1.log'
-rw-r--r-- 1 plex plex  760 Sep 29 12:03 'Plex Media Scanner Credits.log'
-rw-r--r-- 1 plex plex  611 Sep 29 13:05 'Plex Media Scanner Matcher.1.log'
-rw-r--r-- 1 plex plex  532 Sep 29 13:03 'Plex Media Scanner Matcher.2.log'
-rw-r--r-- 1 plex plex  532 Sep 29 13:02 'Plex Media Scanner Matcher.3.log'
-rw-r--r-- 1 plex plex  531 Sep 29 13:02 'Plex Media Scanner Matcher.4.log'
-rw-r--r-- 1 plex plex  589 Sep 29 13:02 'Plex Media Scanner Matcher.5.log'
-rw-r--r-- 1 plex plex  532 Sep 29 13:05 'Plex Media Scanner Matcher.log'
-rw-r--r-- 1 plex plex  551 Sep 29 13:02 'Plex Media Scanner.1.log'
-rw-r--r-- 1 plex plex  552 Sep 29 13:03 'Plex Media Scanner.log'
-rw-r--r-- 1 plex plex 229K Sep 29 13:10 'Plex Media Server.log'
-rw-r--r-- 1 plex plex 4.0K Sep 29 12:06 'Plex Transcoder Statistics.1.log'
-rw-r--r-- 1 plex plex 143K Sep 29 11:53 'Plex Transcoder Statistics.2.log'
-rw-r--r-- 1 plex plex  99K Sep 29 11:30 'Plex Transcoder Statistics.3.log'
-rw-r--r-- 1 plex plex 212K Sep 29 11:14 'Plex Transcoder Statistics.4.log'
-rw-r--r-- 1 plex plex 4.6K Sep 29 11:14 'Plex Transcoder Statistics.5.log'
-rw-r--r-- 1 plex plex 155K Sep 29 12:41 'Plex Transcoder Statistics.log'
-rw-r--r-- 1 plex plex 1.8K Sep 29 11:02 'Plex Tuner Service.log'


Notice anything interesting? All of the log files appear in the container, but not on the host. Implies to me that there's a permissions problem. But, as you can see that directory is 777. The logs are getting stored in temp storage as far as I can tell, and are lost every time the container restarts.

Thoughts?

Also, potentially unrelated issue, but after a few hours all of my browser tabs that I had open to anything on TrueNAS crash with an Out of Memory error.

1696007729012.png
 

Mastakilla

Patron
Joined
Jul 18, 2019
Messages
203
Hi,

I'm running into the exact same issue as you regarding the logs. I did figure out a bit more into why the logs are not available on the host, but only inside the container.
Code:
root@truenas-backup:/mnt/backup-pool/encrypted-ds/app-ds/plexconf-ds/Library/Application Support/Plex Media Server# k3s kubectl -n ix-plex-test describe deploy plex-test
Name:               plex-test
Namespace:          ix-plex-test
CreationTimestamp:  Mon, 01 Apr 2024 12:24:07 +0200
Labels:             app=plex-2.0.3
                    app.kubernetes.io/instance=plex-test
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=plex
                    app.kubernetes.io/version=1.40.1.8227
                    helm-revision=8
                    helm.sh/chart=plex-2.0.3
                    release=plex-test
Annotations:        deployment.kubernetes.io/revision: 8
                    meta.helm.sh/release-name: plex-test
                    meta.helm.sh/release-namespace: ix-plex-test
Selector:           app.kubernetes.io/instance=plex-test,app.kubernetes.io/name=plex,pod.name=plex
Replicas:           1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:       Recreate
MinReadySeconds:    0
Pod Template:
  Labels:           app=plex-2.0.3
                    app.kubernetes.io/instance=plex-test
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=plex
                    app.kubernetes.io/version=1.40.1.8227
                    helm-revision=8
                    helm.sh/chart=plex-2.0.3
                    pod.name=plex
                    release=plex-test
  Annotations:      rollme: sA67K
  Service Account:  default
  Containers:
   plex-test:
    Image:       plexinc/pms-docker:plexpass
    Ports:       32469/TCP, 1900/UDP, 32410/UDP, 32412/UDP, 32413/UDP, 32414/UDP, 32400/TCP
    Host Ports:  0/TCP, 0/UDP, 0/UDP, 0/UDP, 0/UDP, 0/UDP, 0/TCP
    Limits:
      cpu:     4
      memory:  16Gi
    Requests:
      cpu:      10m
      memory:   50Mi
    Liveness:   tcp-socket :32400 delay=10s timeout=5s period=10s #success=1 #failure=5
    Readiness:  tcp-socket :32400 delay=10s timeout=5s period=10s #success=2 #failure=5
    Startup:    tcp-socket :32400 delay=10s timeout=2s period=5s #success=1 #failure=60
    Environment:
      TZ:                          Europe/Brussels
      UMASK:                       002
      UMASK_SET:                   002
      NVIDIA_DRIVER_CAPABILITIES:  all
      PUID:                        4009
      USER_ID:                     4009
      UID:                         4009
      PGID:                        5002
      GROUP_ID:                    5002
      GID:                         5002
      PLEX_CLAIM:                  claim-<censored>
      PLEX_GID:                    5002
      PLEX_UID:                    4009
    Mounts:
      /config from config (rw)
      /config/Library/Application Support/Plex Media Server/Logs from logs (rw)
      /data from data (rw)
      /shared from shared (rw)
      /tmp from tmp (rw)
      /transcode from transcode (rw)
  Volumes:
   config:
    Type:          HostPath (bare host directory volume)
    Path:          /mnt/backup-pool/encrypted-ds/app-ds/plexconf-ds
    HostPathType:
   data:
    Type:          HostPath (bare host directory volume)
    Path:          /mnt/backup-pool/encrypted-ds/media-ds
    HostPathType:
   logs:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
   shared:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
   tmp:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
   transcode:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  8Gi
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   plex-test-75bc8cc4 (1/1 replicas created)
Events:          <none>

If I understand this correctly, this means that
  • /mnt/backup-pool/encrypted-ds/app-ds/plexconf-ds (on the host) is mounted to /config (in the container)
  • /mnt/backup-pool/encrypted-ds/media-ds (on the host) is mounted to /data (in the container)
  • EmptyDir (on the host) is mounted to /config/Library/Application Support/Plex Media Server/Logs (in the container)

It seems to me like this configuration “excludes” the Logs folder from being available on the host.

As long as I know how /where to find the logs and as long as this configuration isn’t “unhealthy” for Plex, I don’t really care that this is how it is done…

What does concern me a little bit, is that the “Download logs” and “Download database” buttons don’t work in the Plex WebGUI for me.
Also it seems like this docker configuration causes the logs to get lost everytime the docker container is restarted (it says "a temporary directory that shares a pod's lifetime").

So is this a bug? Or is this intentionally done like this?

As I do suspect this to be a bug, I've created following bug report:
 
Last edited:
Top