Quickie question… I had to force stop and remove the QNAP Multimedia Console as the indexing/thumbnail scans were causing a crash/reboot loop. Each time I was able to stop the process, the system was left with a Plex error indicating an unexpected stop… which caused me to stop/start Plex to get it working again.
I removed Multimedia Console to solve the boot loop believing that to be the full cause… but could Plex have contributed to the issue with the database change?
Plex is bare metal installed, and the directories are aimed at a share I created called Multimedia with subfolders for TV, Movies, ETC… Assuming that is not what you mean?
Multimedia Console was aimed at the Photos subfolder in the Multimedia share.
QTS creates Multimedia right out of the box. Not sure how you got it to a state where you needed create it but the moment you install any qnap multimedia software, it’s going to jump in deep.
My concern is this:
Q14: Where should I put my medias?
It’s not important, as long as you DO NOT use the default shares from QNAP, like “Multimedia” etc, since they also are used with some QNAP bundled applications, that creates files and directories, that confuse the Plex scanners. If you however decide to go with that directory, we urge you to look for hidden directories and files in it, and add an exclusion for those by using PlexIgnore functionallity.
And to create a shared folder just for Plex Medias, follow this guide and remember to grant full rights to your self, so you can add new items there.
[Back to top](Qnap faq.....read me first!
Not to matter… I’m going to get plex.sh overhauled.
It’s been a few years since I set it all up. I could have just as well used the one already there. In any case, I’ll do some file maneuvering and get it out of there into a guaranteed new one just to be sure.
I have done a heavy overhaul of the startup portion of the script
The biggest change is that it will now detect when a crash has occurred.
When this happens, it makes certain to force a process cleanup first.
(It will also tell you it detected a crash (PIDs) and is ensuring it will start fresh)
This is a first draft of what will go to testing.
So far, it recovers well but I would appreciate feedback.
(Kill the Plex pid and see how it handles the different failures)
i think i can confirm that your new plex.sh works fine.
i used “kill -9 PLEXPID” and “plex.sh start” still worked fine despite the pid file being around (which is also often the situation after a reboot of the NAS).
i got those messages:
Plex Media Server is recovering from previous crash. Please standby.
Starting Plex Media Server…
I’ve finally now found the right thread for the problem I have been having for months now.
After a power outage, and subsequent reboot of my QNAPd NAS (TS_h973Ax), the Plex app appears to lose all of its config and requires the app to be restarted. At the moment, this needs to be done manually by logging into the NAS as an Admin and restarting the app. The problem is if I am not at home, or can’t get to my NAS, the family is hosed and can’t use Plex.
The fix being discussed here, has this been integrated into the Plex app itself, or a recent firmware update? I’m running QuTS Hero 5.1.6.2734…
@ChuckPa i’ve been having the same problem after power outages with plex on qnap. thanks for working on this. any timeline on when the updated plex.sh will officially be released?
If you look at the distribution /etc/init.d/plex.sh, you’ll find it’s been published in its final form.
When you lose power, that’s usually filesystem damage and the most likely file to get damaged is Preferences.xml which has nothing to do with plex.sh
I would be very interested to know if , when you get into the shell, and navigate into where PMS is, (/share/ZFS530_DATA/Ple*/Li*/Ple* on QuTS ?? )
or cd /share/*/.qpkg/Ple*/Li*/Ple* on QTS
Knowing if there exists a Preferences.xml.tmp .
I’m going to ask very overly obvious question – Why isn’t there a UPS to shut it down gracefully and prevent this damage – handling abrupt power outages ? They aren’t expensive.
Regarding it not starting, I’m going to need the logs (tar.gz or ZIP file) of the Logs directory under Plex Media Server to see what’s actually happening.
Given we’re both in the same timezone, maybe we can make some arrangements ?
thanks for the quick reply. sorry, didn’t realize your edits were already published. what pms release was it in? my qnap is running qts and pms is v1.40.3.8555-fef15d30c. i checked and do not have a Preferences.xml.tmp. and i agree with the ups. had one delivered yesterday and setting it up this weekend.
for some reason and despite the updated plex.shi still have to start Plex Media Server manually after a power outage on the QNAP. either “Stop & Start” in the Dashboard, or running plex.sh via SSH.
after the QNAP has restarted, i do see the failure to start Plex in the Dashboard notifications.
the weird thing is that running plex.sh via SSH works fine. if the script works fine, why does PMS not start automatically after the outage?
The screenshot shows four of “the system was not shutdown properly last time.”
As far as debugging goes while we wait for chuck, please share some info about your UPS. And before you manually start PMS, have a look at the server log to see if tried to start. The file you are looking for is Plex Media Server.log which gets created each time the server starts. So you only need to look at the first few lines to see that.
As an aside, in case it helps, most server operators want their UPS to:
do five critical jobs
Protect against power surges.
Run on batteries during a power cut.
Provide a clean 120 V sine wave at 60 Hz.
Send a shutdown message to your server via USB during power abnormal.
Protect against inevitable brown outs when the power is restored.
APC, Tripp Lite, and CyberPower are all on the Compatibility List for QTS.
One sized at 1500 VA is the sweet spot. A lesser UPS will only do #'s 1 & 2.
thats the point. Plex fails to start if the system has been shutdown uncleanly, i.e. after a power failure.
please share some info about your UPS.
i fail to see a connection here. if the UPS did its job fine, the system would not have shutdown (uncleanly) at all. the point here is that PMS still fails to start on QNAP after an unclean shutdown, i.e. if you don’t have a UPS or the power outage was longer than the UPS can support.
And before you manually start PMS, have a look at the server log to see if tried to start. The file you are looking for is Plex Media Server.log which gets created each time the server starts.
i looked into the logfiles but could not find any traces of the failed attempt by the system to launch PMS after the unclean reboot