Synology - DSM 7.0 Release - Plex Installation (Not Operational) Issues

This is not a critical error; Sinology itself describes it as an optional feature.

It doesn’t work that way, you need to reinstall the already fixed package.

Install / uninstall service port config file during package install / uninstall.

https://help.synology.com/developer-guide/resource_acquisition/port_config.html

During installation it is copied here /usr/local/etc/service.d/ If it’s not there, then it won’t update.

@vladlenas

I’ve gotten the package resource fixed.

Test package installs without error.

PlexMediaServer is not listed in Control Panel - Security - Create - Select (built-ins)

To confirm it’s updating now without issue, I slapped it a bit.

  1. I found the file installed in services.d as it should be
bash-4.4# chown root:root PlexMediaServer.sc 
bash-4.4# 
bash-4.4# 
bash-4.4# ls -la
total 28
drwxr-xr-x  3 root root 4096 Sep 12 14:16 .
drwxr-xr-x 17 root root 4096 Mar 10  2023 ..
-rw-r--r--  1 root root  703 Aug  1 11:39 DownloadStation.sc
-rw-r--r--  1 root root  202 Sep 12 12:56 PlexMediaServer.sc
-rw-r--r--  1 root root  592 Apr 28 03:55 ScsiTarget.sc
-rw-r--r--  1 root root  480 May  4  2021 SMBService.sc
drwxr-xr-x  2 root root 4096 Sep 12 14:16 tmp
bash-4.4# /usr/syno/sbin/synopkghelper update PlexMediaServer port-config
bash-4.4# ls -la
total 28
drwxr-xr-x  3 root            root            4096 Sep 12 14:16 .
drwxr-xr-x 17 root            root            4096 Mar 10  2023 ..
-rw-r--r--  1 root            root             703 Aug  1 11:39 DownloadStation.sc
-rw-r--r--  1 PlexMediaServer PlexMediaServer  202 Sep 12 12:56 PlexMediaServer.sc
-rw-r--r--  1 root            root             592 Apr 28 03:55 ScsiTarget.sc
-rw-r--r--  1 root            root             480 May  4  2021 SMBService.sc
drwxr-xr-x  2 root            root            4096 Sep 12 14:16 tmp
bash-4.4# 

Here you can see it’s copied back into position from the target.

I’m not understanding what’s missing

Regrettably, the DSM 7 guide is far more vague than it used to be.
The 7.2 update doesn’t have nearly the same as it did originally for DSM 7.0 beta

This seems to be why things aren’t working. (ports aren’t actually being reserved)

bash-4.4# servicetool --conf-port-conflict-check --tcp 32400
IsConflict: false	Port: 32400	Protocol: tcp	ServiceName: (null)
bash-4.4# servicetool --conf-port-conflict-check --tcp 32410
IsConflict: false	Port: 32410	Protocol: tcp	ServiceName: (null)
bash-4.4# servicetool --conf-port-conflict-check --udp 32410
IsConflict: false	Port: 32410	Protocol: udp	ServiceName: (null)
bash-4.4# 

I don’t understand what you want to check here?

Easy way to check:
Control Panel-Info Center-Service
Control Panel-Externel Access-Router Configuration-Create-Bulit-in application

That’s how it should be. This is explicitly stated in your privileges file.

{
    "defaults":{
        "run-as": "package"
    },
    "username": "PlexMediaServer",
    "groupname": "PlexMediaServer"
}

here from my system

rw-r--r-- 1 sc-jackett      synocommunity   87 Apr 26 05:20 jackett.sc
-rw-r--r-- 1 MediaServer     MediaServer    394 Jun  7  2021 MediaServer.sc
-rw-r--r-- 1 root            root           231 Jul 23  2020 ReplicationService.                                         sc
-rw-r--r-- 1 root            root           592 Apr 28 10:55 ScsiTarget.sc
-rw-r--r-- 1 root            root           480 Jun 27  2021 SMBService.sc
drwxr-xr-x 2 root            root          4096 Sep 11 19:29 tmp
-rw-r--r-- 1 TorrServer      TorrServer     104 Sep  3 12:16 TorrServer.sc
-rw-r--r-- 1 sc-transmission synocommunity  103 Sep  9 21:13 transmission.sc
-rw-r--r-- 1 root            root           153 Apr 14 07:05 Virtualization.sc

So for my BIG question :slight_smile:

What makes it show up in Control Panel - Security - Firewall - (select)

e.g. This list

I presume this is why we’re fixing it?

You wrote a little incorrectly where. Yes, and this too, if Plex is not there, then the port config did not work.

1 Like

it should be something like this

root@SYNO:~# servicetool --conf-port-conflict-check --tcp 9091
IsConflict: true        Port: 9091      Protocol: tcp   ServiceName: transmission

Can you hand-craft a SPK file which does make it work?

Ok, i will try

I found part of the problem:

bash-4.4# servicetool --conf-port-conflict-check --tcp 32400
IsConflict: true	Port: 32400	Protocol: tcp	ServiceName: PlexMediaServer
bash-4.4# 

Now to see if I can make the rest work

1 Like

:+1:

Great, I’m shutting down the virtual machine.

1 Like

it’s as broken as it ever was. :frowning:

Time to see if I can hack it.

bash-4.4# /usr/syno/sbin/synopkghelper update PlexMediaServer port-config
bash-4.4# servicetool --conf-port-conflict-check --tcp 32400
IsConflict: false	Port: 32400	Protocol: tcp	ServiceName: (null)
bash-4.4# servicetool --conf-port-conflict-check --udp 32410
IsConflict: true	Port: 32410	Protocol: udp	ServiceName: PlexMediaServer
bash-4.4# servicetool --conf-port-conflict-check --udp 32400
IsConflict: true	Port: 32400	Protocol: udp	ServiceName: PlexMediaServer
bash-4.4#

This is why I didn’t add in DSM 7.

  1. We don’t have ‘root’ privilege
  2. I can’t update the firewall (as root) from the shell.

The package’s PlexMediaServer.sc is from DSM 6 where it works.

I see some ports have passed the test, maybe you have an error in the .sc file.

dst.ports="32400/tcp,32401/tcp,32469/tcp,32600/tcp,3005/tcp,8324/tcp,1900/udp,32410/udp,32412/udp,32413/udp,32414/udp"

this is from the config of the Sinology virtual machine

dst.ports="2379:2382,2385,16509,16514,30200:30299,30300/tcp"

this is a Samba server

dst.ports="137,138,139,445/udp,tcp"

Here I tested it on my package

dst.ports="8090,8092,8094,8096,8099,55555,55655/udp,tcp"

everything is working

You’re allowing UDP+TCP on those ports.

That’s not the spec here. I have TCP-only and UDP-only ports.

I can get this (UDP) or the TCP ports but not both:

Screenshot from 2023-09-12 16-39-10

Then I don’t know, I reviewed a lot of Synology services. They always use TCP and UDP for the same port.
They point this out explicitly in their GitBook.

Required

Each service should have destination ports. The value should contain at least the port numbers, and a default protocol that is tcp + udp.

It’s up to you to decide what to do. Have a nice day, it’s already night for me. :slightly_smiling_face:

1 Like

@vladlenas

ALL following here:

I’ve found a way to implement predefined firewall rules for PMS. It’s not pretty.

This is the only way which works on DSM 7 without knowing DSM 7 internals & documentation.

Is this acceptable ? (TCP & UDP settings for the firewall)

1 Like

Why It’s not pretty? Look above, the same method is used by Download Station.
I think it’s a great job on your part, all minor bugs are now fixed. :+1:

1 Like

This is what I found, everything is in the Sinology documentation.

Usually a package only has one unique service name. If your package needs more than one port description, you can define service_name2, service_name3, …