PlexConnect running on a QNAP NAS

@Maddhin

In my both systems (QNAP & Windows) it says it is not installed. 

I don't even know what PIL/Pillow is.

You need PIL/Pillow for the fanartview feature (see this thread: https://forums.plex.tv/topic/123222-official-plexconnect-fanart-views/) but I cannot get it working on the Qnap.

I have successfully used the autorun feature both on my QNAP TS-470Pro and my TS-410 and I have identified a quite serious issue. At first I was not sure that PlexConnect was the issue but after 4 months of searching for solutions, having the QNAP team examine the QNAP and also replacing the 470 I'm quite sure PlexConnect is the problem since I now have exactly the same problem on the 410 after moving the plexconnect script there.

What happens is that the whole NAS get unresponsible (you can't connect in any way and the QNAP web server returns an error page telling that the server is not responding). I believe that all processes are still running (torrent, checking file system etc) but you can't access the nas in any way. The only thing you can do is a hard reset and then run check file system and then reboot and you got the plexconnect working again.

Have anyone else experienced this? My guess is that the QNAP doesn't like that you use port 80 and 443 but that is just my guess.... I have no idea how to work around this (it happens intermittent) but I will try to schedule some reboots on my 410 and see if it doesn't happen that often. I did post this on the QNAP forum as well.

 Hi sorry for my english

 
After one year from you, I have the same problem: the Qnap crashed and I can't access the nas in any way. I've tried to add this line in the autorun: sleep 100, but without luck.
Qnap support tell me that Qnap boot don't finsh correctly when in the autorun is present the command to start plexconnect.
 
Someone have found a solution?
 
Thank in advance!
 
Giorgio

Ok I've found a solution, based on:

https://gist.github.com/tommeier/6255771

My autorun file is:

cd /share/MD0_DATA/.plexconnect
sh ./PlexConnect_daemon.bash start
 
Now it's wok!!!

Sublime:

I have the exact same problem thst you experience.

Every two days, my QNAP cease to respond. The LED screen lights when you press any of the buttons, but shows nothing. There is no way to acces the unit, no web, no SSH, no Win SCP, and of course the ATV message of terror "trailers unavailable" (at home, this meas "HAVOC"). Strange thing, the router detetects the QNAP in the DHCP list but nothing makes it reachable again. I have to manually restart the unit by pushing the power button for 5 secs. After a restart the unit Works like a charm (auto plexconnect and everything) for 2 more days.

Like you, I just found out a couple of weeks ago. QNAP support made me reset the unit to safe mode, install de qnap operating sistem from a USB, change all the HDDs, install everything again, but the same happens again and again. No matter what you do. A couple of weeks ago I disable the PlexConnect autorun script an Voilá! 15 days without an issue. I have been crash testing the QNAP with 5 movies simultaneously from Plex Icon on the unit (Plex Media Server WEB), but the unit runs like a charm. CPU nice and cool (QNAP support suggests that there could be a temperature problem (that for some reason never appears on the logs).

Have you found any solution? I got the TS-470 Pro as well,  with 2 Gigs of RAM (maybe is the RAM, dont know).

Sublime:

I have the exact same problem thst you experience.

Every two days, my QNAP cease to respond. The LED screen lights when you press any of the buttons, but shows nothing. There is no way to acces the unit, no web, no SSH, no Win SCP, and of course the ATV message of terror "trailers unavailable" (at home, this meas "HAVOC"). Strange thing, the router detetects the QNAP in the DHCP list but nothing makes it reachable again. I have to manually restart the unit by pushing the power button for 5 secs. After a restart the unit Works like a charm (auto plexconnect and everything) for 2 more days.

Like you, I just found out a couple of weeks ago. QNAP support made me reset the unit to safe mode, install de qnap operating sistem from a USB, change all the HDDs, install everything again, but the same happens again and again. No matter what you do. A couple of weeks ago I disable the PlexConnect autorun script an Voilá! 15 days without an issue. I have been crash testing the QNAP with 5 movies simultaneously from Plex Icon on the unit (Plex Media Server WEB), but the unit runs like a charm. CPU nice and cool (QNAP support suggests that there could be a temperature problem (that for some reason never appears on the logs).

Have you found any solution? I got the TS-470 Pro as well,  with 2 Gigs of RAM (maybe is the RAM, dont know).

Hi Whitefang,

I have been running into the same issue as you.  Like most of the posters, I have created an Autorun file and in that file I have killed the Qthttp processes.  I noticed that after a couple of days, the system would become unresponsive and require a hard reset to get it running again.  After some investigation, I ran the ps faxo "%U %t %p %a” command and noticed that there were pages and pages of Zombied httpd processes.  I disabled the autorun for PlexConnect, restarted and noticed that the problem went away.  My theory is that once you kill the original httpd process, start PlexConnect, that subsequent httpd processes attempt to kick off again.  They run into PlexConnect on port 80, cannot start and then go into Zombie.  I'm assuming that this continues over and over and eventually results in the issue we are seeing.

This happens even though I have the Web Server disabled in the NAS.  The weird thing that is happening to me now is I can start the Web Server in the NAS, change the port to something like 8082 and then run PlexConnect manually.  It does not run into the port 80 issue and things continue to run correctly.  The problem that I am running into is that if I restart my NAS, the port in the Web Server settings changes back to port 80 on its own.  With this, of course, PlexConnect will no longer run.

If I could keep my NAS web server on port 8082, I think everything would be perfect.  I could run PlexConnect and I could run my other web applications.

Not sure if that helps, but hopefully it moves things along where someone else might be able to assist.

Edited to add NAS Configuration:

TS-469 Pro

Firmware 4.1.3 (2015/02/17)

Hey Guys,

I've done some more work on this, and I have to say - my theory is that PlexConnect really messes up the QNAP.

I was eventually able to change the port manually in the QNAP console.  (For the record, it is mono that caused my problem.  The include into apache.conf was causing a corruption issue.  Once I fixed that, I was able to change the default port from 80 to 8082.)

I thought that would allow PlexConnect to run, since it needs to run on port 80.  However, after getting PlexConnect running for about 10 hrs, the NAS again slowed down to the point it was almost unusable.  I'm beginning to think this is not a workable solution.  

I'm not a linux guy, but if there is anybody out there that wants to work this issue with me, I am willing to try any suggestions.

Thanks.

Ok I've found a solution, based on:

https://gist.github.com/tommeier/6255771

My autorun file is:

cd /share/MD0_DATA/.plexconnect
sh ./PlexConnect_daemon.bash start
 
Now it's wok!!!

Gipasoft, can you explain a little bit or point me in the rigth direction. I have NO linux knowledge and dont understand the link you posted. I think this would help cdnSpinalTap and me.

Here is what I have configured to run my plexconnect on qnap. It works perfectly (but for a day or two).

qpkg.cfg

[PlexConnectAutorun]

Name = PlexConnectAutorun
Version = 1.0
Author = Whitefang1977
Date = 2015-01-11
Shell = /share/CACHEDEV1_DATA/.qpkg/PlexConnectAutorun/PlexConnectAutorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/PlexConnectAutorun/
Enable = TRUE
 
PlexConnectAutorun.sh
#!/bin/sh
/share/CACHEDEV1_DATA/.qpkg/Python/bin/python /share/CACHEDEV1_DATA/.qpkg/PlexConnect/PlexConnect.py -d
 
Thanx for your time.

Gipasoft, can you explain a little bit or point me in the rigth direction. I have NO linux knowledge and dont understand the link you posted. I think this would help cdnSpinalTap and me.

Here is what I have configured to run my plexconnect on qnap. It works perfectly (but for a day or two).

qpkg.cfg

[PlexConnectAutorun]

Name = PlexConnectAutorun
Version = 1.0
Author = Whitefang1977
Date = 2015-01-11
Shell = /share/CACHEDEV1_DATA/.qpkg/PlexConnectAutorun/PlexConnectAutorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/PlexConnectAutorun/
Enable = TRUE
 
PlexConnectAutorun.sh
#!/bin/sh
/share/CACHEDEV1_DATA/.qpkg/Python/bin/python /share/CACHEDEV1_DATA/.qpkg/PlexConnect/PlexConnect.py -d
 
Thanx for your time.

Hi, also me have no Linux knowledge (I am a .net developer) but I have found this script to autorun and autoupdate plexconnect.

For me the script doesn't work, I am not a linux guru, but  I have modified my autorun.sh (your PlexConnectAutorun.sh) and now PlexConnect works great without problem!

My autorun.sh content is:

#!bin/sh
cd /share/MD0_DATA/.plexconnect
sh ./PlexConnect_daemon.bash start

Hi, also me have no Linux knowledge (I am a .net developer) but I have found this script to autorun and autoupdate plexconnect.

For me the script doesn't work, I am not a linux guru, but  I have modified my autorun.sh (your PlexConnectAutorun.sh) and now PlexConnect works great without problem!

My autorun.sh content is:

#!bin/sh
cd /share/MD0_DATA/.plexconnect
sh ./PlexConnect_daemon.bash start

Hi gipasoft,

So, just so I understand - you have PlexConnect working fine on the QNAP?  Can you answer the following questions:

 - What QNAP hardware and firmware are you running?  

 - Are you running Sonarr or something else.  (One theory I am working on is that it is bumping up against Sonarr and causing the zombie kernels)

 - Do you have web services enabled or disabled on your QNAP?

 - Are you running PlexConnect on port 80?

Can you run the following command after running PlexConnect for a bit?    ps faxo "%U %t %p %a”

I don't need the full results, just curious if you have a bunch of zombie kernels or NAS_soldiers.

Thanks!

Hi gipasoft,

So, just so I understand - you have PlexConnect working fine on the QNAP?  Can you answer the following questions:

 - What QNAP hardware and firmware are you running?  

 - Are you running Sonarr or something else.  (One theory I am working on is that it is bumping up against Sonarr and causing the zombie kernels)

 - Do you have web services enabled or disabled on your QNAP?

 - Are you running PlexConnect on port 80?

Can you run the following command after running PlexConnect for a bit?    ps faxo "%U %t %p %a”

I don't need the full results, just curious if you have a bunch of zombie kernels or NAS_soldiers.

Thanks!

Hi I have a TS-469 PRO with 4.1.3

I don't run Sonarr or similar service

I have installed a svn server, Qsync, FTP, Telnet/SSH, TVStation and the default services (UPNP, DLNA Media server etc...)

I have try to run your command: ps faxo "%U %t %p %a” at putty command prompt but I don't see anything

Hi gipasoft,

So, just so I understand - you have PlexConnect working fine on the QNAP?  Can you answer the following questions:

 - What QNAP hardware and firmware are you running?  

 - Are you running Sonarr or something else.  (One theory I am working on is that it is bumping up against Sonarr and causing the zombie kernels)

 - Do you have web services enabled or disabled on your QNAP?

 - Are you running PlexConnect on port 80?

Can you run the following command after running PlexConnect for a bit?    ps faxo "%U %t %p %a”

I don't need the full results, just curious if you have a bunch of zombie kernels or NAS_soldiers.

Thanks!

yes I'm running plexconnect on port 80

Hi I have a TS-469 PRO with 4.1.3

I don't run Sonarr or similar service

I have installed a svn server, Qsync, FTP, Telnet/SSH, TVStation and the default services (UPNP, DLNA Media server etc...)

I have try to run your command: ps faxo "%U %t %p %a” at putty command prompt but I don't see anything

Thanks for the quick response.   I sometimes had problems with that command if I copied and pasted - had to type it in.  A "ps -ef | grep httpd" would show if you have the same symptoms as me.  If I run that command after plex connect has been running for a while, I would have a tonne of Zombies.

Just for clarification - is your web server enabled on your QNAP (Control Panel --> Applications --> Web Server)?

Thanks for the quick response.   I sometimes had problems with that command if I copied and pasted - had to type it in.  A "ps -ef | grep httpd" would show if you have the same symptoms as me.  If I run that command after plex connect has been running for a while, I would have a tonne of Zombies.

Just for clarification - is your web server enabled on your QNAP (Control Panel --> Applications --> Web Server)?

Hi yes  I have web server enabled (port 8083), this is the putty output:

[~] # ps -ef | grep httpd
httpdusr  4738  5441  0 Apr07 ?        00:00:01 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  4832  5441  0 Apr07 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  4838  5441  0 Apr07 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  4839  5441  0 Apr07 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  4840  5441  0 Apr07 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  4841  5441  0 Apr07 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  5446  5441  0 Apr06 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  5447  5441  0 Apr06 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  5448  5441  0 Apr06 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
httpdusr  5450  5441  0 Apr06 ?        00:00:00 /usr/local/apache/bin/apache -k                                              start -c PidFile /var/lock/apache.pid
admin     5517     1  0 Apr06 ?        00:01:18 /usr/local/sbin/_thttpd_ -p 5808                                             0 -nor -nos -u admin -d /home/httpd -c **.* -h 127.0.0.1 -i /var/lock/._thttpd_.                                             pid
httpdusr  5754     1  0 Apr06 ?        00:00:12 /sbin/lpb_scheduler -d
httpdusr 11580 11578  0 Apr06 ?        00:00:17 (squid) -f /share/MD0_DATA/.qpkg                                             /Squid/opt/etc/squid/squid.conf
httpdusr 11666 11580  0 Apr06 ?        00:00:00 (unlinkd)
httpdusr 12072 11580  0 Apr07 ?        00:00:00 (squid_unix_group) -p
httpdusr 12073 11580  0 Apr07 ?        00:00:00 (squid_unix_group) -p
httpdusr 12074 11580  0 Apr07 ?        00:00:00 (squid_unix_group) -p
httpdusr 12075 11580  0 Apr07 ?        00:00:00 (squid_unix_group) -p
httpdusr 12076 11580  0 Apr07 ?        00:00:00 (squid_unix_group) -p
admin    20505     1  0 00:45 ?        00:00:00 [_thttpd_]

Yeah, you are definitely not seeing the same symptoms as me.

I've had the QNAP up for about 8 hours running Sonarr without PlexConnect.  Everything is fine, no zombies, etc.  I just kicked of PlexConnect and will watch the system for a while and see if the symptoms appear.  If they do, I will try the same thing without Sonarr running and see if that is causing the conflict.

Thanks for your help.

Yeah, you are definitely not seeing the same symptoms as me.

I've had the QNAP up for about 8 hours running Sonarr without PlexConnect.  Everything is fine, no zombies, etc.  I just kicked of PlexConnect and will watch the system for a while and see if the symptoms appear.  If they do, I will try the same thing without Sonarr running and see if that is causing the conflict.

Thanks for your help.

Here's the scenario that I tested:

 - fresh restart on NAS, Sonarr and SABnzbd starting normally on their own.  PlexConnect autostart disabled

 - ran NAS for about 10 hours, no issues with Zombie kernels or NAS soldiers

 - after the 10 hrs, in an active terminal window, I executed PlexConnect.py

 - after an additional 12 hours running PlexConnect, no issues with NAS, no Zombie kernels

This leads me to a couple of conclusions that I will need to test.  Either my PlexConnect auto startup is incorrect, or the startup sequence is wrong.

Here's the scenario that I tested:

 - fresh restart on NAS, Sonarr and SABnzbd starting normally on their own.  PlexConnect autostart disabled

 - ran NAS for about 10 hours, no issues with Zombie kernels or NAS soldiers

 - after the 10 hrs, in an active terminal window, I executed PlexConnect.py

 - after an additional 12 hours running PlexConnect, no issues with NAS, no Zombie kernels

This leads me to a couple of conclusions that I will need to test.  Either my PlexConnect auto startup is incorrect, or the startup sequence is wrong.

a little curiosity what is the content of your autostart file ?

a little curiosity what is the content of your autostart file ?

I added the following to my qpkg.conf:

[autorun]

Name = autorun
Version = 0.1
Auther = hidden
Date = 2015-03-30
Shell = /share/CACHEDEV1_DATA/.qpkg/autorun/autorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/autorun
Enable = TRUE

My autorun.sh is the following:

#!/bin/sh

sleep 300

 

/share/CACHEDEV1_DATA/.qpkg/Python/bin/python /root/Library/PlexConnect/PlexConnect.py -d

 
 
I have tried both with the sleep active and with it commented out - same issue.

I added the following to my qpkg.conf:

[autorun]

Name = autorun
Version = 0.1
Auther = hidden
Date = 2015-03-30
Shell = /share/CACHEDEV1_DATA/.qpkg/autorun/autorun.sh
Install_Path = /share/CACHEDEV1_DATA/.qpkg/autorun
Enable = TRUE

My autorun.sh is the following:

#!/bin/sh

sleep 300

 

/share/CACHEDEV1_DATA/.qpkg/Python/bin/python /root/Library/PlexConnect/PlexConnect.py -d

 
 
I have tried both with the sleep active and with it commented out - same issue.

ok can  you try this content?:

#!/bin/sh
cd /root/Library/PlexConnect
sh ./PlexConnect_daemon.bash start

ok can  you try this content?:

#!/bin/sh
cd /root/Library/PlexConnect
sh ./PlexConnect_daemon.bash start

Certainly.  Just waiting for some other processes to complete and will give that a try.

Thanks.