Server Version#: QNAP 1.18.4.2171
Hello Guys,
Since the last update, the Plex Media Server keeps running after I stop it in the QNAP Web UI. It keeps listening on ports, thus it cannot start back again, as the allocated port is already in use. I have to kill Plex by force in order to be able to start it again.
I can see this with lsof -i -P -n | grep LISTEN:
Plex 18259 admin 60u IPv6 1174828 0t0 TCP *:32400 (LISTEN)
Plex 18259 admin 61u IPv4 1174830 0t0 TCP 127.0.0.1:32401 (LISTEN)
Also the service still generates some logs, it looks like it is working + lsof show that it uses a lot of files on the system.
Now, after a NAS reboot it started to work again, and I’m afraid to stop it again, cause I fear its not going to start up properly again.
ps did not show any Plex process running, that’s why it was even more strange.
If this reappears, I will upload logs too, but they actually said, that the shutdown was complete.
This has my curiosity now too. Something isn’t right.
If QPKG says it’s stopped then it’s stopped.
It gets that information by calling my scripts.
They look to see if anything is actually there (running/hung) and then returns a status.
Should you find this again, I very much would like to see it.
So looks like Plex is still listening on port 32400.
In the logs, I can see that it cannot start up anymore, as something is listening on the port:
Feb 12, 2020 19:42:16.183 [0x7f1dbc558740] DEBUG - HttpServer: Listening on IPv6 as well as IPv4.
Feb 12, 2020 19:42:16.183 [0x7f1dbc558740] ERROR - HttpServer: Error binding acceptor: Address already in use
Feb 12, 2020 19:42:16.183 [0x7f1dbc558740] ERROR - HttpServer: Error opening acceptor on IPv6, falling back to IPv4: Address already in use
Feb 12, 2020 19:42:16.183 [0x7f1dbc558740] ERROR - HttpServer: Error binding acceptor: Address already in use
Feb 12, 2020 19:42:16.246 [0x7f1dbc558740] ERROR - Error: Unable to set up server: listen: Address already in use (N5boost10wrapexceptINS_6system12system_errorEEE)
The latest logs before the startup:
Feb 12, 2020 19:42:25.256 [0x7f6835668700] DEBUG - HTTP requesting GET https://downloads.plex.tv/codecs/527/linux-x86_64-standard/EasyAudioEncoder-linux-x86_64-standard.zip
Feb 12, 2020 19:42:25.435 [0x7f6835668700] DEBUG - HTTP 200 response from GET https://downloads.plex.tv/codecs/527/linux-x86_64-standard/EasyAudioEncoder-linux-x86_64-standard.zip
Feb 12, 2020 19:42:25.650 [0x7f6835668700] DEBUG - Codecs: Deleting old EAE directory at ‘“/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Codecs/EasyAudioEncoder-436-linux-x86_64”’
Feb 12, 2020 19:42:41.680 [0x7f6835668700] DEBUG - BPQ: [Starting] → [Processing]
Feb 12, 2020 19:42:41.683 [0x7f6835668700] DEBUG - BPQ: generating queue items from 3 generator(s)
Feb 12, 2020 19:42:41.683 [0x7f6835668700] DEBUG - BPQ: generated 0 item(s) for queue
Feb 12, 2020 19:42:41.683 [0x7f6835668700] DEBUG - PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Feb 12, 2020 19:42:41.683 [0x7f6835668700] DEBUG - PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Feb 12, 2020 19:42:41.683 [0x7f6835668700] DEBUG - BPQ: [Processing] → [Idle]
So like nothing that it has been stopped or such
PS shows the following:
ps aux | grep Plex
19634 admin 908 S grep Plex
29693 admin 30604 S ./Plex Media Server
I see from your screenshot that Codex Pack is installed. That is obvious.
I am specifically asking if you’re using the Multimedia share as the reference point for Plex.
If so, you need to stop using it that way. Here’s why:
The Multimedia share isn’t a real share. It’s a software construction (API) . The Codex Pack changes those pathnames dynamically.
It has been well established PMS, especially transcoding, optimization, and DVR, will not work well destinations under the influence (which are dynamic) of Multimedia and Codex Pack. Both those APIs are very QNAP-centric and always have been.
To your issue of why PMS appears to be hanging,
Please provide the following:
ps -ef | grep -i plex
tar.gz of all files in the Logs directory (easy path is cd /sh*/CAC*/.qpkg/Ple*/Li*/Pl*/Logs
The information provided is insufficient to diagnose with.
EDIT: What you’re seeing is not normal. The plex shutdown script is very good at taking down the processes. Which QTS and PMS versions do you have ?
I do not use the the multimedia share as a reference point for Plex. I point Plex to normal file system shares. Plex works even when Multimedia addon is stopped.
I will try to replicate the problem and provide you the logs later Today.
Now I cannot replicate the issue. Plex stops properly. Once the issue reappears, I will update this thread with the requested information. It usually happens after PMS or QTS updates.