Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcoding failure: EAE watchfolder is not writable #334

Open
craigcabrey opened this issue Sep 1, 2024 · 4 comments
Open

Transcoding failure: EAE watchfolder is not writable #334

craigcabrey opened this issue Sep 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@craigcabrey
Copy link

Describe the bug

Intermittently seeing errors of EAE watchfolder is not writable in the worker logs. I'm not able to reliably reproduce it. Seems to be a potential re-occurrence of #244.

Additional context

[Parsed_scale_0 @ 0x7f717868a5c0] w:2560 h:1280 flags:'' interl:0
[eac3_eae @ 0x7f71784acb80] EAE watchfolder is not writable: /tmp/pms-01601f0f-6718-407c-8327-356a1a732cb7/EasyAudioEncoder/Convert to WAV (to 8ch or less)/jzddbmz6b5hy352mv8xod9e2_977-0-test.tmp
Stream mapping:
  Stream #0:0 (hevc) -> scale:default (graph 0)
  Stream #0:1 (eac3_eae) -> aresample:default (graph 1)
  format:default (graph 0) -> Stream #0:0 (libx264)
  aresample:default (graph 1) -> Stream #0:1 (aac)
Error while opening decoder for input stream #0:1 : Generic error in an external library
[AVIOContext @ 0x7f717fd48700] Statistics: 77498 bytes read, 2 seeks
Transcoder exit: child process exited with code 1
Completed transcode
Removing process from taskMap
Transcoder close: child process exited with code 1

The error is misleading though, since that user can write to tmp:

root@prod-plex-worker-1:/# su - abc -s /bin/bash
abc@prod-plex-worker-1:~$ cd /tmp/pms-01601f0f-6718-407c-8327-356a1a732cb7/EasyAudioEncoder
abc@prod-plex-worker-1:/tmp/pms-01601f0f-6718-407c-8327-356a1a732cb7/EasyAudioEncoder$ touch test
abc@prod-plex-worker-1:/tmp/pms-01601f0f-6718-407c-8327-356a1a732cb7/EasyAudioEncoder$ ls -l
total 0
-rw-rw-r--. 1 abc abc 0 Sep  1 18:03 test
abc@prod-plex-worker-1:/tmp/pms-01601f0f-6718-407c-8327-356a1a732cb7/EasyAudioEncoder$
@craigcabrey craigcabrey added the bug Something isn't working label Sep 1, 2024
@Nullvoid3771
Copy link

Make sure config folders are set to permission 0777. Avoid using SMB for config, transcode, codecs. Use cephs if possible.

See #335

@craigcabrey
Copy link
Author

I am using CephFS.

@Nullvoid3771
Copy link

Nullvoid3771 commented Sep 7, 2024

@craigcabrey The fix for this is to create multiple temp folders in cepfs. Then create multiple workers with different names. constrict each worker and pms to a single replica and locked to specific nodes. Make sure your tmp folders have write permissions. Adapt to your enviroment and add appropriate volume mappings. You don't even need to do this in ceph you can do it in local volumes, because you’re constraining your containers to a specific node. This sounds counter intuitive since you’re either using K8 or swarm, but it's what I found worked. If you share tmp folders you will run into conflicts.

Docker Swarm Stack - Sry I don’t use K8

services:
 plex:
   image: ghcr.io/linuxserver/plex:latest
   deploy:
     placement:
       constraints:
         - node.hostname == node1
     mode: replicated
     replicas: 1

volumes: 
- type: bind             
        source: $HOST/mnt/pve/cephfs/tmp
        target: /tmp 


plex-worker:
   image: ghcr.io/linuxserver/plex:latest
   hostname: "plex-worker-{{.Node.Hostname}}"
   deploy:
     placement:
       constraints:
         - node.hostname == node2
     mode: replicated
     replicas: 1

volumes: 
- type: bind             
        source: $HOST/mnt/pve/cephfs/tmp2
        target: /tmp 


plex-worker2:
   image: ghcr.io/linuxserver/plex:latest
   hostname: "plex-worker2-{{.Node.Hostname}}"
   deploy:
     placement:
       constraints:
         - node.hostname == node3
     mode: replicated
     replicas: 1

volumes: 
- type: bind             
        source: $HOST/mnt/pve/cephfs/tmp3
        target: /tmp 

@pabloromeo
Copy link
Owner

IIRC /tmp folders don't actually require any sharing at all, they don't even need specific bind mounts.
What needs to be shared across workers and PMS is the transcode location (and cache and drivers for hardware transcoding to work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants