Synology Docker Transcode can't write to server's disk

Server Version#: 1.21.3.4014
Player Version#:

I originally had my Plex ecosystem running using Synology builds. There, I successfully optimized a few movies.

After noticing that the Docker containers were kept more up-to-date, I converted everything over. Having set it up once before, I understood what I was doing better. But, I got careless and typed in the wrong UID and GID numbers. It has mostly seemed to work, except for transcoding.

After thrashing around a little, I spotted my error. I fixed the environment variables in each of the containers. And, I’ve gone in and chown’ed the half dozen movies I’ve downloaded since then. I also chown’ed the transcode folder. Permissions were already set up as they were supposed to be for the folders.

But, when I attempt to transcode, I get the error message “Converted files cannot be written to the server’s disk”. This error usually pops up almost instantly, less than half a second. After a fresh restart of the container, it’ll take 5-10 seconds.

My transcode folder is /data/transcode. The actual path on my Synology is /volume2/plex stuff/transcode. The Movies folder is /volume2/plex stuff/Movies.

Here are what appear to be the relevant debug log entries:

Feb 20, 2021 08:05:42.174 [0x7f66e8ff1700] DEBUG - Versions: version file path is “/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151/Mortal Engines (2018).mp4”
Feb 20, 2021 08:05:42.175 [0x7f66e8ff1700] ERROR - Error creating directory “/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151”: Permission denied
Feb 20, 2021 08:05:42.176 [0x7f66e8ff1700] ERROR - TranscodeJobManager: [Running] directory is not writable: “/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151”
Feb 20, 2021 08:05:42.176 [0x7f66e8ff1700] DEBUG - BPQ: setOverrideState for generator 151: failed/diskUnwritable
Feb 20, 2021 08:05:42.176 [0x7f66e8ff1700] DEBUG - BPQ: generator 151 changed state: pending → failed
Feb 20, 2021 08:05:42.178 [0x7f66e8ff1700] DEBUG - BPQ: reprocessing requested while processing item

I’ve reached the limit of my understanding. It sure acts like a permissions problem, but I thought I had straightened it all out. I appear to have overlooked something.

Thanks,
Drake

whichever location that maps to, the UID / GID does not have permission.

Either the UID/GID is incorrect or the permissions for where it maps are not writable in Control Panel - Shared Folders

Here are the screen grabs of all the permissions and ownerships that I think apply. When performing the chown’s, I used 1027:65536, to guarantee that the GID and UID I’m defining in the container are correct. I used the command history and just changed filenames, to reduce the chance of a typo.

ls -l of /volume2/Bigger Plex
ls l of Bigger Plex

ls -l of Movies

ls -l of Mortal Engines (Shows that there isn’t already a folder of that name in the way)

Permissions of user plex

Permissions of group video

File Station of Mortal Engines permissions

Plex docker details

Plex docker mounts
Plex docker mounts

Control Panel Shared Folders of Bigger Plex

The plex share is actually left over from my first attempt to set everything up. I don’t think there’s actually anything there. And, the debug log doesn’t seem to be referring to that, anyway.

Is there something else that I’ve left out? Or, is it right there, staring me in the face, and I’m an idiot and missed it? :slight_smile:

It’s very possible, and also likely, Just because the ACL’s are set for the shared folder “Bigger Plex”, the directory permissions themselves are not correct (it happens a lot).

Open FileStation,
Open BiggerPlex
Right-Click transcode → Properties

Look at the permissions.

can user plex write ? (you may want to grant permissions of RWX to transcode and let the parent ACLs govern the master access)

In the properties of the transcode folder, both plex user and video group have Allow Read & Write. I went into Advanced options - Permissions inspector and verified both, there.

I don’t see where I can set the X attribute with File Station. We’re one step beyond my experience with the command line. How would I do that in Putty? I see the a bunch of x’s in my screen grabs, but I assume those are referring to the current user?

Also, are we looking in the correct place? The log seems to indicate that it can’t create the /Plex version folder under the specific movie folder. Would the permissions in transcode generate that error message?

There’s no need to dig deep. Most times, digging deeper causes problems.

I’ve setup the Synology to be very simple.

As a basic test…

  1. Create a shared folder named “PlexTranscode”
  2. Grant permission for user Plex to write to it
  3. Edit the docker container definition to use it.
  4. Start Plex and test

Done. Same error message in the log

Let me see it?

Here are the screenshots

Docker PlexTranscode

And the error messages:

Feb 21, 2021 03:25:22.612 [0x7f48d97f2700] DEBUG - MDE: Cannot direct stream audio stream due to codec truehd when profile only allows aac
Feb 21, 2021 03:25:22.612 [0x7f48d97f2700] DEBUG - MDE: Mortal Engines (2018): selected media 0 / 17718
Feb 21, 2021 03:25:22.615 [0x7f48d97f2700] DEBUG - Versions: version file path is "/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151/Mortal Engines (2018).mp4"
Feb 21, 2021 03:25:22.616 [0x7f48d97f2700] ERROR - Error creating directory "/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151": Permission denied
Feb 21, 2021 03:25:22.616 [0x7f48d97f2700] ERROR - TranscodeJobManager: [Running] directory is not writable: "/data/Movies/Mortal Engines (2018)/Plex Versions/20 Mbps 151"
Feb 21, 2021 03:25:22.617 [0x7f48d97f2700] DEBUG - BPQ: setOverrideState for generator 151: failed/diskUnwritable
Feb 21, 2021 03:25:22.617 [0x7f48d97f2700] DEBUG - BPQ: generator 151 changed state: pending -> failed
Feb 21, 2021 03:25:22.618 [0x7f48d97f2700] DEBUG - BPQ: reprocessing requested while processing item
Feb 21, 2021 03:25:22.618 [0x7f48d97f2700] DEBUG - BPQ: onConsiderProcessing: Processing (true)
Feb 21, 2021 03:25:22.618 [0x7f48d97f2700] DEBUG - Versions: updating status for generator 151
Feb 21, 2021 03:25:22.623 [0x7f48d97f2700] DEBUG - BPQ: generating queue items from 11 generator(s)
Feb 21, 2021 03:25:22.624 [0x7f48d97f2700] DEBUG - Versions: updating status for generator 85

The full logs ZIP please…

Excerpts don’t show me.

Everything? They’re pretty big. I had verbose on for awhile. 4 MB zipped.

Plex Media Server Logs_2021-02-21_03-26-38.zip (4.0 MB)

That’s fine… “BIG” would be 30 MB of Zipped logs :rofl:
I’m equipped here with some heavy-duty stuff so can handle this with ease.

Feb 21, 2021 01:07:26.392 [0x7f67337fe700] DEBUG - It took 10.000000 ms to retrieve 130 items.
Feb 21, 2021 01:07:26.406 [0x7f67337fe700] ERROR - Error opening file '"/data/Movies/Mortal Engines (2018)/Mortal Engines (2018) Remux-1080p.mkv"' - No such file or directory (2)
Feb 21, 2021 01:07:26.407 [0x7f67337fe700] DEBUG - We're going to try to auto-select an audio stream for account 1.
Feb 21, 2021 01:07:26.407 [0x7f67337fe700] DEBUG - Selecting best audio stream for part ID 21091 (autoselect: 0 language: en)

It can’t see it so it won’t be able to write there.

You need to walk through the permissions out on the real shared folder, in File Station (properties) and verify user Plex can read.

Question: Why are you using Docker? Did you read somewhere that Docker is easier?

Also, You have a hardware transcoding-capable machine but it’s not using it because you’ve not setup the docker container correctly. (which can’t be done in the Synology GUI)

That screenshot of the permissions was taken from File Station, on the shared folder. If I look at it in Putty, it says all of my folders under /volume2 are owned by root root, including PlexTranscode.

Seems kinda odd that the Plex UI and player can read the files, but the transcoder can’t.

As I said at the top, I had read that the Docker containers are kept up-to-date better than the Synology builds of the apps. I was getting notifications that my apps were out of date, but when I went to update them, I was being told that I had the latest versions.

Yikes! I didn’t realize the Docker container couldn’t use the hardware. That sucks. But, I can do it with a… Arrgh, I forget the nomenclature I saw for starting up a container. And I’ve closed all those tab trees. Anyway, it is possible?

I am willing to rip out Docker and go back to Synology, if there’s a better source than I had picked that’s kept up-to-date. Or, possibly, since it’s almost totally working, already, it’ll be easier to take my container exports and use those to build up the startup file? Sounds like six of one and a half dozen the other, if we can find current versions.

The best source is https://plex.tv/downloads
Synology always lags very far behind. — true.
Docker lags behind the official package but is the same code (binary).

You will want the x86_64 package for DSM 6 (until you upgrade to DSM 7)

What you gain by using the official package is that I handle all the hardware for you automatically at installation time. Every update checks and makes any corrections/changes needed.

The only thing you need to do is grant user Plex permission to read the media.
The transcoder temp directory is stored, by default, in the Plex share (which I control and contains all your metadata)

I think you’ll find it a lot easier than fighting with Docker , which isn’t for the faint of heart.

I think you’ll find this informative about best practices for using Plex on Synology units.

You can stop the docker and leave it there while you try out the official package.
Once you’ve had a chance to use it, you can decide how to proceed.

Thanks. I’ve started skimming that. I did a quick search on “update” and only found the mention that Synology is behind. Would I have to download and manually install updates as they become available?

One issue is that, if I pull Plex out of the Docker containers, then I also have to pull Radarr and Sabnzbd out. I’ll have to find the best way to keep those up-to-date, too. Actually, I was thinking of pulling those functions off to another machine, anyway. Maybe now is the time to bite that bullet.

If I do this, do you have a how-to on the most straightforward way to (what was it called?) take possession of the server? When I installed these Docker versions, I thrashed around for awhile before stumbling on the correct sequence to do that. Had me worried for awhile that it was going to take a lot of grunt work to get everything back up and running.

  1. We’re working on that “manual update” issue in DSM 6.
    a. Synology is more responsible about updates so far in DSM 7.
    b. We have other ideas anyway just in case :smiling_imp:

  2. Absolutely not. You do not need to pull out the other dockers.

  3. I have Sonarr and Nzbget. They write directly into the /volume1/tv shared folder :slight_smile: When it’s done, about 45 seconds later Plex will start scanning and add it.

  4. Regarding settimg up the native package again - That’s easy. i can show you what to click / clear out if it comes to that

My first attempt had some stuff in Docker and other stuff not. I never could get the folders to line up. Now that I have a better grasp of how they work together, I think I can see how to do it.

I need to pull those apps off the Synology, anyway. I found that when Sab is pulling together the pieces, it spikes its CPU usage. I can’t watch anything at the same time as that’s happening. Albeit, I’m not downloading large batches of movies, lately, so that’s not been an issue for awhile.

You can always put them on your computer and run it from there.
let the computer do the heavy media lifting.

Luckily, I’m a geek, with plenty of hardware lying around. I just inherited a machine with a 1650 GTX. Do you know off the top of your head how that compares to using the hardware in a DS418play? I don’t anticipate ever having to transcode more than two streams at a time.