Stuck on startup - no logs

Server Version#: 1.15.1.791 and 1.15.2.793

All of the sudden my plex won’t startup - it did hang at first and I needed to kill -9 the remaining processes after stopping the plex-server.

Now it just hangs - no new logs (I’ve tried to start it a couple of hours now) - this is the latest log before the first crash:
Mar 15, 2019 19:09:09.548 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:09:28.367 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:19:09.654 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:19:28.658 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:29:09.765 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:29:28.950 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:39:09.872 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:39:29.110 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:49:09.980 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.
Mar 15, 2019 19:49:29.270 [0x7f1bf7fff700] ERROR - EventSource: Retrying in 600 seconds.

I tried to restore the backuped database from tonight - but no luck.
Tried to empty all Plug-Ins - no luck.

If I start it now it just hangs like this:
[admin@Bertha Logs]# ps |grep -i plex
12018 admin 28512 S ./Plex Media Server

Any ideas?

from the shell,

  1. get into the /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer directory
  2. Invoke manual start to see what happens: ./plex.sh start

Commands at your disposal: stop start restart

Ah, already tried that. Same thing happens.

Ah, a little sleep and then I found the culprit - it was an error in the Preferences.xml that caused it.

If someone in the future wants home hints how to proceed when stuck in this stage, I thought I will write down how I found this one. :slight_smile:

As no logs were made - I thought I make some own with the strace-command.
It’s not installed default in the qnap so you need the Entware-ng-package, install that first.

First: Stop the plex-server and make sure that no plex-processes are left running. If they do - kill (-9) them.

Then everything in the terminal (ssh) as admin:

/share/CACHEDEV1_DATA/.qpkg/Entware-ng/bin/opkg update
/share/CACHEDEV1_DATA/.qpkg/Entware-ng/bin/opkg install strace

Then edit the /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/plex.sh that the qnap uses for starting the service, change the row that starts the “Plex Media Server”.

Change:

./Plex\ Media\ Server &

To:

/share/CACHEDEV1_DATA/.qpkg/Entware-ng/bin/strace -f -ff -o strace.out ./Plex\ Media\ Server &

Now when you start the plex-server you will get several strace.out.[pid]-files that shows what the plex-server trying to do.

In my case:

-rw-rw-rw- 1 admin administrators 59105 2019-03-16 08:58 strace.out.26499
-rw-rw-rw- 1 admin administrators 1055 2019-03-16 08:58 strace.out.26500
-rw-rw-rw- 1 admin administrators 923 2019-03-16 08:58 strace.out.26501
-rw-rw-rw- 1 admin administrators 431 2019-03-16 08:58 strace.out.26502
-rw-rw-rw- 1 admin administrators 137 2019-03-16 08:58 strace.out.26669

Then all you need is some luck. :slight_smile: In my case I saw that in one of the pid-files the last thing it did was reading the preference-file:

stat(“/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Preferences.xml”, {st_mode=S_IFREG|0600, st_size=1947, …}) = 0
open(“/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Preferences.xml”, O_RDONLY) = 10
read(10, “<?xml version="1.0" encoding="ut”…, 8191) = 1947
close(10) = 0

Strange that it stopped there, so I had a look in that file with an editor and saw something strange in the middle:
image

That doesn’t seem like a standard xml-variable? I just deletede the whole CloudSyncNeedsUpdate-variable from the xml.

Started it up - and it works again!

Changed back the plex.sh and removed the strace from the line again. - Important last step when everything works! Otherwise you will have gigantic traceroutes.

Why did you move PMS from where it’s installed ?

/share/CACHEDEV?_DATA/.qpkg/PlexMediaServer

If you moved it manually through some 3rd party package… Nothing any of us can do.

The package provides QTS-native migration to any volume you wish. Just keep it under .qpkg

If you want a share which you can access the logs (coming soon natively), install this package by one of the Plex Ninjas.

I think you read my instructions wrong - I haven’t moved anything.

I you read the strace-output you can clearly see that it reads “/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Preferences.xml”

I actually think this is a bug in the plex preferences-parser and/or somthing with the CloudSyncNeedsUpdate-variable that I never used.

Thank you… Yes I did.

I just reached out to Engineering. Hopefully someone is around to shed some light on what that might be.

1 Like

I just bounced off Engineering.

We all agree.

Someone/something ran strace and put the output into Preferences.xml.

Finding who / what did that will be a challenge because PMS doesn’t even have access to strace on QNAP.

I think you still read my explanation too fast. :slight_smile:

It was I that started the strace - that’s how I found the garbled text in the CloudSyncNeedsUpdate-variable:
image

The question is - why plex put the garbled text instead of the real variable.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.