Transcoder fails with Docker version >= 1.5.3

I just installed 1.5.4.3596 to see if the bug which the transcoder which I am experiencing since 1.5.3.3580 was fixed but this does not seem to be fixed (atleast for me it isn’t.)
I can play the video with version 1.4.4.3495 though, so I am reverting back for now.

I would like to add that it version 1.5.4.3596 works when the audio codec is AAC but takes longer to buffer than with version 1.4.4.3495. Haven’t tried with any other video(with a different audio codec) yet.

Log Entry
Apr 11, 2017 12:28:34.006 [0x7fefb23f4700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 12:28:37.015 [0x7fefb23f4700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae

File Info
Codec: EAC3
Channels: 5.1
Bitrate: 640 kbps
Language: English
Audio Channel Layout: 5.1(side)
Sampling Rate: 48000 Hz

Browser Info
Chrome 57.0.2987.133

Let me know if you’d like me to update the info with additional information.)

@chaosrose said:
I just installed 1.5.4.3596 to see if the bug which the transcoder which I am experiencing since 1.5.3.3580 was fixed but this does not seem to be fixed (atleast for me it isn’t.)
I can play the video with version 1.4.4.3495 though, so I am reverting back for now.

I would like to add that it version 1.5.4.3596 works when the audio codec is AAC but takes longer to buffer than with version 1.4.4.3495. Haven’t tried with any other video(with a different audio codec) yet.

Log Entry
Apr 11, 2017 12:28:34.006 [0x7fefb23f4700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 12:28:37.015 [0x7fefb23f4700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 12:28:37.017 [0x7fefb23f4700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae

File Info
Codec: EAC3
Channels: 5.1
Bitrate: 640 kbps
Language: English
Audio Channel Layout: 5.1(side)
Sampling Rate: 48000 Hz

Browser Info
Chrome 57.0.2987.133

Let me know if you’d like me to update the info with additional information.)

Would love to have the full log file so directory paths can be seen and then from that can ask you for list contents of directories (files / sizes / date time created / permissions)

You probably did not have debug logging enabled on the server as the lines you pasted are ones output when debug logging is disabled. So please enable debug logging. restart the server. reproduce the error and attach the full log file

The directory listing I would be interested in is the full list of files/subdirectories within the codecs sub directory under the Plex Media Server application support directory. Giving dates / times / sizes / permissions

You can use the Plex Web Server Settings Help screen Download Log Files link to get the logs

@chaosrose - please could you look into the mount parameters and specifically exec and noexec options

Shouldn’t it be enough to provide the mount details from docker inspect?
docker inspect -f '{{ json .Mounts }}' ${containerId} | jq

just replace ${containerId} with the proper id or container name.

FYI; I set up an environment where I can reproduce this issue, folder permissions etc is all 100% identical. This is done to preserve the working one and to not pollute it. I am attempting to play the same video file though.

Plex Folder Permissions

drwxrwxrwx 3 root users    0 Apr 11 23:08 Cache
drwxrwxrwx 3 root users    0 Apr 11 23:08 Metadata
drwxrwxrwx 3 root users    0 Apr 11 23:07 Media
drwxrwxrwx 3 root users    0 Apr 11 23:07 Logs
-rwxrwxrwx 1 1026 users 1286 Apr 11 23:06 Preferences.xml
-rwxrwxrwx 1 1026 users    3 Apr 11 23:06 plexmediaserver.pid
drwxrwxrwx 3 root users    0 Apr 11 23:04 Plug-ins
drwxrwxrwx 7 root users    0 Apr 11 23:03 Plug-in Support
drwxrwxrwx 3 root users    0 Apr 11 23:03 Codecs
drwxrwxrwx 3 root users    0 Apr 11 23:03 Crash Reports

/Codecs

drwxrwxrwx 3 root users 0 Apr 11 23:28 EasyAudioEncoder-133-linux-ubuntu-x86_64.tmp
drwxrwxrwx 2 root users 0 Apr 11 23:27 57aa73f-1206-linux-ubuntu-x86_64

/EasyAudioEncoder-133-linux-ubuntu-x86_64.tmp

drwxrwxrwx 2 root users 0 Apr 11 23:28 EasyAudioEncoder

As you can see, I’ve been quite lazy and given everyone full control over those files who is capable of logging in to the server.

Same log part with VERBOSE level
note; can be found in attached logs as well

Apr 11, 2017 23:24:18.109 [0x7f8f9ffff700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 23:24:18.110 [0x7f8f9ffff700] DEBUG - Downloading document https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.110 [0x7f8f9ffff700] DEBUG - HTTP requesting GET https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.400 [0x7f8f9ffff700] DEBUG - HTTP 200 response from GET https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.402 [0x7f8f9ffff700] DEBUG - Caching document https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133 as 7db5dc82c1fe3b83396d497b5d7d98fc680728f7
Apr 11, 2017 23:24:18.406 [0x7f8f9ffff700] DEBUG - HTTP requesting GET https://downloads.plex.tv/codecs/133/linux-ubuntu-x86_64/EasyAudioEncoder-linux-ubuntu-x86_64.zip
Apr 11, 2017 23:24:19.594 [0x7f8fabbff700] DEBUG - HTTP 200 response from POST http://127.0.0.1:32600/devices/discover
Apr 11, 2017 23:24:21.023 [0x7f8f9ffff700] DEBUG - HTTP 200 response from GET https://downloads.plex.tv/codecs/133/linux-ubuntu-x86_64/EasyAudioEncoder-linux-ubuntu-x86_64.zip
Apr 11, 2017 23:24:21.191 [0x7f8f9ffff700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] DEBUG - Streaming Resource: Terminated session 0x7f8fa3c39660:z1u2u16sxc8g20ht0j0n52el with reason Conversion failed. A required codec could not be found or failed to install.

Additional info
I’ll look in to the mount parameters and specifically exec and noexec options tomorrow after work.
Just a hypothesis; Plex is not setting the execution bit on the same level as root.
I created a random file in the folder with touch test, did chmod -x test and got the following error;
chmod: changing permissions of ‘test’: Operation not permitted
When I prefixed the command with sudo it did set the execution bit.

Did Plex Media Server, prior to 1.5.3, not set the execution bit when attempting to download the codes and do things with it?

It doesn’t work for me with 1.5.4 on a synology nas either.

I removed the specific setting for the transcoder folder. As a result the data is written in /tmp/pms-585a8427-0bc7-4062-acc7-eb70e4a06604/EasyAudioEncoder with 755 permission mask with files inside the “Convert to” folders with a 644 permission mask. The /tmp folder is located in the general aufs overlay of the container. Up to 1.5.3 it was located in a subfolders of Library if no specific transcoder folder was specified.

mounts inside the container:
... none on / type aufs (rw,relatime,si=8afe44667b095b1c,dio,dirperm1) /dev/vg1001/lv on /transcode type ext4 (rw,relatime,journal_checksum,synoacl,data=writeback,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group) ...

When the transcoder path is changed to /transcode and a volume is mapped to /transcode the result remains the same.

Appearently the docker inspect output is not enough:
{ ... { "Source": "/opt/docker/plex/transcode", "Destination": "/transcode", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, ... }
Since synoacl is specific to synology, i am pretty sure that docker controlls the mount parameters, doesn’t it…

@kopfpilot said:
It doesn’t work for me with 1.5.4 on a synology nas either.

I removed the specific setting for the transcoder folder. As a result the data is written in /tmp/pms-585a8427-0bc7-4062-acc7-eb70e4a06604/EasyAudioEncoder with 755 permission mask with files inside the “Convert to” folders with a 644 permission mask. The /tmp folder is located in the general aufs overlay of the container. Up to 1.5.3 it was located in a subfolders of Library if no specific transcoder folder was specified.

mounts inside the container:
... none on / type aufs (rw,relatime,si=8afe44667b095b1c,dio,dirperm1) /dev/vg1001/lv on /transcode type ext4 (rw,relatime,journal_checksum,synoacl,data=writeback,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group) ...

When the transcoder path is changed to /transcode and a volume is mapped to /transcode the result remains the same.

Appearently the docker inspect output is not enough:
{ ... { "Source": "/opt/docker/plex/transcode", "Destination": "/transcode", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, ... }
Since synoacl is specific to synology, i am pretty sure that docker controlls the mount parameters, doesn’t it…

If you are problems with the transcoder use of /tmp for the temporary transcoder cache directory then please post in this forum thread instead
http://forums.plex.tv/discussion/265492/transcoder-fails-when-transcode-is-on-a-network-share

If you are getting this error in the log ERROR - Unzip: could not set executable bit on output file then this is the right forum thread for your issue.

Could you check the Plex Media Server.log and if it is the latter, please attach your log here together with the details of the mount command / or mount entry in /etc/fstab

@chaosrose said:
FYI; I set up an environment where I can reproduce this issue, folder permissions etc is all 100% identical. This is done to preserve the working one and to not pollute it. I am attempting to play the same video file though.

Plex Folder Permissions

drwxrwxrwx 3 root users    0 Apr 11 23:08 Cache
drwxrwxrwx 3 root users    0 Apr 11 23:08 Metadata
drwxrwxrwx 3 root users    0 Apr 11 23:07 Media
drwxrwxrwx 3 root users    0 Apr 11 23:07 Logs
-rwxrwxrwx 1 1026 users 1286 Apr 11 23:06 Preferences.xml
-rwxrwxrwx 1 1026 users    3 Apr 11 23:06 plexmediaserver.pid
drwxrwxrwx 3 root users    0 Apr 11 23:04 Plug-ins
drwxrwxrwx 7 root users    0 Apr 11 23:03 Plug-in Support
drwxrwxrwx 3 root users    0 Apr 11 23:03 Codecs
drwxrwxrwx 3 root users    0 Apr 11 23:03 Crash Reports

/Codecs

drwxrwxrwx 3 root users 0 Apr 11 23:28 EasyAudioEncoder-133-linux-ubuntu-x86_64.tmp
drwxrwxrwx 2 root users 0 Apr 11 23:27 57aa73f-1206-linux-ubuntu-x86_64

/EasyAudioEncoder-133-linux-ubuntu-x86_64.tmp

drwxrwxrwx 2 root users 0 Apr 11 23:28 EasyAudioEncoder

As you can see, I’ve been quite lazy and given everyone full control over those files who is capable of logging in to the server.

Same log part with VERBOSE level
note; can be found in attached logs as well

Apr 11, 2017 23:24:18.109 [0x7f8f9ffff700] INFO - CodecManager: obtaining EAE
Apr 11, 2017 23:24:18.110 [0x7f8f9ffff700] DEBUG - Downloading document https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.110 [0x7f8f9ffff700] DEBUG - HTTP requesting GET https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.400 [0x7f8f9ffff700] DEBUG - HTTP 200 response from GET https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133
Apr 11, 2017 23:24:18.402 [0x7f8f9ffff700] DEBUG - Caching document https://plex.tv/api/codecs/easyaudioencoder?build=linux-ubuntu-x86_64&deviceId=5224f49b-fe84-4384-a24d-8fc85ad473ab&oldestPreviousVersion=1%2E2%2E5%2E2966-3f767e7&version=133 as 7db5dc82c1fe3b83396d497b5d7d98fc680728f7
Apr 11, 2017 23:24:18.406 [0x7f8f9ffff700] DEBUG - HTTP requesting GET https://downloads.plex.tv/codecs/133/linux-ubuntu-x86_64/EasyAudioEncoder-linux-ubuntu-x86_64.zip
Apr 11, 2017 23:24:19.594 [0x7f8fabbff700] DEBUG - HTTP 200 response from POST http://127.0.0.1:32600/devices/discover
Apr 11, 2017 23:24:21.023 [0x7f8f9ffff700] DEBUG - HTTP 200 response from GET https://downloads.plex.tv/codecs/133/linux-ubuntu-x86_64/EasyAudioEncoder-linux-ubuntu-x86_64.zip
Apr 11, 2017 23:24:21.191 [0x7f8f9ffff700] ERROR - Unzip: could not set executable bit on output file
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] ERROR - CodecManager: failed to extract zip
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae
Apr 11, 2017 23:24:21.193 [0x7f8f9ffff700] DEBUG - Streaming Resource: Terminated session 0x7f8fa3c39660:z1u2u16sxc8g20ht0j0n52el with reason Conversion failed. A required codec could not be found or failed to install.

Additional info
I’ll look in to the mount parameters and specifically exec and noexec options tomorrow after work.
Just a hypothesis; Plex is not setting the execution bit on the same level as root.
I created a random file in the folder with touch test, did chmod -x test and got the following error;
chmod: changing permissions of ‘test’: Operation not permitted
When I prefixed the command with sudo it did set the execution bit.

Did Plex Media Server, prior to 1.5.3, not set the execution bit when attempting to download the codes and do things with it?

Thanks for all the info. At the moment the theory is that there must be a noexec on the mount which is something that the script used cannot overturn.

@sa2000 said:

@kopfpilot said:
It doesn’t work for me with 1.5.4 on a synology nas either.

I removed the specific setting for the transcoder folder. As a result the data is written in /tmp/pms-585a8427-0bc7-4062-acc7-eb70e4a06604/EasyAudioEncoder with 755 permission mask with files inside the “Convert to” folders with a 644 permission mask. The /tmp folder is located in the general aufs overlay of the container. Up to 1.5.3 it was located in a subfolders of Library if no specific transcoder folder was specified.

mounts inside the container:
... none on / type aufs (rw,relatime,si=8afe44667b095b1c,dio,dirperm1) /dev/vg1001/lv on /transcode type ext4 (rw,relatime,journal_checksum,synoacl,data=writeback,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group) ...

When the transcoder path is changed to /transcode and a volume is mapped to /transcode the result remains the same.

Appearently the docker inspect output is not enough:
{ ... { "Source": "/opt/docker/plex/transcode", "Destination": "/transcode", "Mode": "rw", "RW": true, "Propagation": "rprivate" }, ... }
Since synoacl is specific to synology, i am pretty sure that docker controlls the mount parameters, doesn’t it…

If you are problems with the transcoder use of /tmp for the temporary transcoder cache directory then please post in this forum thread instead
http://forums.plex.tv/discussion/265492/transcoder-fails-when-transcode-is-on-a-network-share

If you are getting this error in the log ERROR - Unzip: could not set executable bit on output file then this is the right forum thread for your issue.

Could you check the Plex Media Server.log and if it is the latter, please attach your log here together with the details of the mount command / or mount entry in /etc/fstab

No signs of ERROR - Unzip: could not set executable bit on output file in my logs. Will move to the other thread.

@sa2000 said:

Thanks for all the info. At the moment the theory is that there must be a noexec on the mount which is something that the script used cannot overturn.

You were right, it was the noexec which was causing troubles. I fixed that and Plex Media Server seems to work again.

I still wonder though, does the latest PMS version set the bit and <=1.4.4 it did not?

@chaosrose said:

@sa2000 said:

Thanks for all the info. At the moment the theory is that there must be a noexec on the mount which is something that the script used cannot overturn.

You were right, it was the noexec which was causing troubles. I fixed that and Plex Media Server seems to work again.

I still wonder though, does the latest PMS version set the bit and <=1.4.4 it did not?

Glad it is fixed. It is different routine in 1.5.4

Hi,

I´m seeing the same issue. Where do I change the noexec setting?

I´m running Unraid offical pms docker.

May 28, 2019 22:04:39.037 [0x14d27f7fb700] ERROR - Unzip: could not set executable bit on output file
May 28, 2019 22:04:39.037 [0x14d27f7fb700] ERROR - CodecManager: failed to extract zip
May 28, 2019 22:04:39.037 [0x14d27f7fb700] ERROR - Error configuring transcoder: Decoder install failed: eac3_eae
May 28, 2019 22:04:39.037 [0x14d27f7fb700] DEBUG - Streaming Resource: Terminating session 0x14d29c2f9a80:1fcsrx64twbo7hgo43p7n067 which is using transcoder slot. Used slots is now 0
May 28, 2019 22:04:39.037 [0x14d27f7fb700] DEBUG - Streaming Resource: Terminated session 0x14d29c2f9a80:1fcsrx64twbo7hgo43p7n067 with reason Conversion failed. A required codec could not be found or failed to install.