PlexConnect running on a QNAP NAS

i keep getting this error when i launch PlexConnect.py:

Failed to connect to port 80 (http): [Errno 98] Address already in use
PlexConnect : WebServer not alive. Shutting down.
 
i tried loads of things, but nothing seems to work. does anyone of you guys know what i need to do?
thanks in advance

Sounds like your NAS already has something on port 80 and you can’t have two things on it.


In sure I saw steps in this thread to fix it?

I was getting the same error and i tried changing it to 81 but that did not work.

What fixed for me was to release port 80 from my nas and after doing that i gave the nas port 81 and now everything is back to normal. Try to do that.

i keep getting this error when i launch PlexConnect.py:

Failed to connect to port 80 (http): [Errno 98] Address already in use
PlexConnect : WebServer not alive. Shutting down.
 
i tried loads of things, but nothing seems to work. does anyone of you guys know what i need to do?
thanks in advance

ok thanks guys and sorry for the late response. i think i fixed the port 80 thing. However it's stil not working. plex connect starts up no problem. But then when i select the trailer app, it says trailers unavailable. and in terminal i see this:

19:01:25 DNSServer: DNS request received!
19:01:25 DNSServer: Source: ('10.0.1.2', 63974)
19:01:25 DNSServer: Domain: trailers.apple.com
19:01:25 DNSServer: ***intercept request
19:01:25 DNSServer: -> DNS response: 10.0.1.3
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 60961)
19:01:29 DNSServer: Domain: a3.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 50613)
19:01:29 DNSServer: Domain: a1.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 63773)
19:01:29 DNSServer: Domain: a4.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 62059)
19:01:29 DNSServer: Domain: a2.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:31 DNSServer: DNS request received!
19:01:31 DNSServer: Source: ('10.0.1.2', 59977)
19:01:31 DNSServer: Domain: a1499.phobos.apple.com
19:01:31 DNSServer: ***forward request
19:01:31 DNSServer: -> DNS response from higher level
19:01:32 DNSServer: DNS request received!
19:01:32 DNSServer: Source: ('10.0.1.2', 58581)
19:01:32 DNSServer: Domain: a969.phobos.apple.com
19:01:32 DNSServer: ***forward request
19:01:32 DNSServer: -> DNS response from higher level
19:01:35 DNSServer: DNS request received!
19:01:35 DNSServer: Source: ('10.0.1.2', 55107)
19:01:35 DNSServer: Domain: a564.phobos.apple.com
19:01:35 DNSServer: ***forward request
19:01:35 DNSServer: -> DNS response from higher level
19:01:38 DNSServer: DNS request received!
19:01:38 DNSServer: Source: ('10.0.1.2', 61937)
19:01:38 DNSServer: Domain: a1497.phobos.apple.com
19:01:38 DNSServer: ***forward request
19:01:38 DNSServer: -> DNS response from higher level
19:01:38 DNSServer: DNS request received!
19:01:38 DNSServer: Source: ('10.0.1.2', 49720)
19:01:38 DNSServer: Domain: a1619.phobos.apple.com
19:01:38 DNSServer: ***forward request
19:01:39 DNSServer: -> DNS response from higher level
19:02:09 DNSServer: DNS request received!
19:02:09 DNSServer: Source: ('10.0.1.2', 60951)
19:02:09 DNSServer: Domain: itunes.apple.com
19:02:09 DNSServer: ***forward request
19:02:09 DNSServer: -> DNS response from higher level
19:02:11 DNSServer: DNS request received!
19:02:11 DNSServer: Source: ('10.0.1.2', 63167)
19:02:11 DNSServer: Domain: ocsp.verisign.net
19:02:11 DNSServer: ***forward request
19:02:11 DNSServer: -> DNS response from higher level
 
any ideas what i need to do?

ok thanks guys and sorry for the late response. i think i fixed the port 80 thing. However it's stil not working. plex connect starts up no problem. But then when i select the trailer app, it says trailers unavailable. and in terminal i see this:

19:01:25 DNSServer: DNS request received!
19:01:25 DNSServer: Source: ('10.0.1.2', 63974)
19:01:25 DNSServer: Domain: trailers.apple.com
19:01:25 DNSServer: ***intercept request
19:01:25 DNSServer: -> DNS response: 10.0.1.3
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 60961)
19:01:29 DNSServer: Domain: a3.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 50613)
19:01:29 DNSServer: Domain: a1.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 63773)
19:01:29 DNSServer: Domain: a4.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:29 DNSServer: DNS request received!
19:01:29 DNSServer: Source: ('10.0.1.2', 62059)
19:01:29 DNSServer: Domain: a2.mzstatic.com
19:01:29 DNSServer: ***forward request
19:01:29 DNSServer: -> DNS response from higher level
19:01:31 DNSServer: DNS request received!
19:01:31 DNSServer: Source: ('10.0.1.2', 59977)
19:01:31 DNSServer: Domain: a1499.phobos.apple.com
19:01:31 DNSServer: ***forward request
19:01:31 DNSServer: -> DNS response from higher level
19:01:32 DNSServer: DNS request received!
19:01:32 DNSServer: Source: ('10.0.1.2', 58581)
19:01:32 DNSServer: Domain: a969.phobos.apple.com
19:01:32 DNSServer: ***forward request
19:01:32 DNSServer: -> DNS response from higher level
19:01:35 DNSServer: DNS request received!
19:01:35 DNSServer: Source: ('10.0.1.2', 55107)
19:01:35 DNSServer: Domain: a564.phobos.apple.com
19:01:35 DNSServer: ***forward request
19:01:35 DNSServer: -> DNS response from higher level
19:01:38 DNSServer: DNS request received!
19:01:38 DNSServer: Source: ('10.0.1.2', 61937)
19:01:38 DNSServer: Domain: a1497.phobos.apple.com
19:01:38 DNSServer: ***forward request
19:01:38 DNSServer: -> DNS response from higher level
19:01:38 DNSServer: DNS request received!
19:01:38 DNSServer: Source: ('10.0.1.2', 49720)
19:01:38 DNSServer: Domain: a1619.phobos.apple.com
19:01:38 DNSServer: ***forward request
19:01:39 DNSServer: -> DNS response from higher level
19:02:09 DNSServer: DNS request received!
19:02:09 DNSServer: Source: ('10.0.1.2', 60951)
19:02:09 DNSServer: Domain: itunes.apple.com
19:02:09 DNSServer: ***forward request
19:02:09 DNSServer: -> DNS response from higher level
19:02:11 DNSServer: DNS request received!
19:02:11 DNSServer: Source: ('10.0.1.2', 63167)
19:02:11 DNSServer: Domain: ocsp.verisign.net
19:02:11 DNSServer: ***forward request
19:02:11 DNSServer: -> DNS response from higher level
 
any ideas what i need to do?

Please port your .cfg file settings.

Looks like its partially working, you can test that by going to netflix and if it works that means your dns server its intercepting the ATV3 request.

You're right jkronos Netflix works, strange.

Anyways here is my settings.cfg:

[PlexConnect]
logpath = ./
enable_dnsserver = True
ip_webserver = 0.0.0.0
prevent_atv_update = True
port_dnsserver = 53
enable_plexconnect_autodetect = True
port_pms = 32400
port_webserver = 80
ip_plexconnect = 10.0.1.41
certfile = ./assets/certificates/trailers.pem
ip_dnsmaster = 8.8.8.8
loglevel = High
ip_pms = 10.0.1.41
enable_plexgdm = True
port_ssl = 443
 
I hope you can help me.

Have you installed the Certificate on the ATV?

Is this .cer file created at the same time as the .pem file?

You're right jkronos Netflix works, strange.

Anyways here is my settings.cfg:

[PlexConnect]
logpath = ./
enable_dnsserver = True
ip_webserver = 0.0.0.0
prevent_atv_update = True
port_dnsserver = 53
enable_plexconnect_autodetect = True
port_pms = 32400
port_webserver = 80
ip_plexconnect = 10.0.1.41
certfile = ./assets/certificates/trailers.pem
ip_dnsmaster = 8.8.8.8
loglevel = High
ip_pms = 10.0.1.41
enable_plexgdm = True
port_ssl = 443
 
I hope you can help me.

Change your ip web server to 10.0.1.41

Is the plex server running on your qnap?  is that .41? also make sure port 80 is not in use before you run plexconnect.psy

My guess is that you generated a bad trailers.pem file make a new one from here and try again:


https://langui.sh/2013/08/27/appletv-ssl-plexconnect/

Hi.

Help me please. I can't generate certification for Plex on Qnap TS412:

#openssl req -new -nodes -newkey rsa:2048 -out trailers.pem -keyout trailers.key -x509 -days 365 -subj "/C=US/CN=trailers.apple.com" 

Unable to load config info
Generating a 2048 bit RSA private key
..........................+++
....+++
writing new private key to 'trailers.key'
-----
unable to find 'distinguished_name' in config
problems making Certificate Request
29025:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:conf_lib.c:325:

I install pakages OpenSSL and Iphone Config Utilites to Windows 7 workstation. Generate a key trailers.pem on Windows 7 and copy it to Qnap. I'm right?

I followed the guide and everything worked. However, the next day I got "Trailers is unavailable" error.
 
Is there anyway to restart the Qpkg without restarting the entire NAS?

Hello,

Sorry for my english.

Somebody for help me.

My Nas is Qnap Ts212P on wifi

My apple TV2 with 6.0.2

I'm on the step 6

[~/Library/PlexConnect] # date
Wed Jan 29 13:30:22 CET 2014
[~/Library/PlexConnect] # ./PlexConnect.py
PlexConnect : ***
PlexConnect : PlexConnect
PlexConnect : Press ENTER to shut down.
PlexConnect : ***
PlexConnect : IP_self: 192.168.1.2
PlexGDM : ***
PlexGDM : looking up Plex Media Server
PlexGDM : ***
PlexGDM : servers discovered: 1
DNSServer : ***
DNSServer : Starting up.
DNSServer : intercept trailers.apple.com: 192.168.1.2
DNSServer : forward other to higher level DNS: 192.168.1.1
DNSServer : ***
WebServer : ***
WebServer : WebServer: Serving HTTP on 0.0.0.0 port 80.
WebServer : ***

No result on apple tv.

Please help me.

Thx

Your running a very old version of plex connect. Where did you get it? Suggest you update to the latest. Also make sure you read the pinned post “read before posting” and include all the trouble shooting information.

Oops thank you. :rolleyes:

I follow google. But it's not a good idee. :blink:

plexconnet qnap =

<a data-ipb='nomediaparse' href='https://forums.plex.tv/topic/70373-plexconnect-running-on-a-qnap-nas/'><em>PlexConnect</em> running on a <em>QNAP</em> NAS - AppleTV - <em>PlexConnect</em> - ...</a>

Sorry to open up an old thread, but i can't seem to get my Qnap 509 to auto start plex connect. 

my Autostart.sh
 

**********************autorun.sh*********************************************
#!/bin/sh
sleep 100
/usr/bin/python2.7 /share/MD0_DATA/.qpkg/PlexConnect-master/PlexConnect.py -d &
*********************************************************************************
 
If i run the above command, it successfully launches plexconnect and it works fine. I just can't get the damn thing to auto start.  I'm using the qkpg method stated in the above post to create a qpkg and all the 
 
[autorun]
Name = autorun
Version = 0.1
Author = neomilium
Date = 2013-05-06
Shell = /share/MD0_DATA/.qpkg/Autorun/autorun.sh
Install_Path = /share/MD0_DATA/.qpkg/Autorun
QPKG_File = autorun.qpkg
Enable = TRUE
 
Can anyone point me in the right direction. 

 

Sorry to open up an old thread, but i can't seem to get my Qnap 509 to auto start plex connect. 

my Autostart.sh
 

**********************autorun.sh*********************************************
#!/bin/sh
sleep 100
/usr/bin/python2.7 /share/MD0_DATA/.qpkg/PlexConnect-master/PlexConnect.py -d &
*********************************************************************************
 
If i run the above command, it successfully launches plexconnect and it works fine. I just can't get the damn thing to auto start.  I'm using the qkpg method stated in the above post to create a qpkg and all the 
 
[autorun]
Name = autorun
Version = 0.1
Author = neomilium
Date = 2013-05-06
Shell = /share/MD0_DATA/.qpkg/Autorun/autorun.sh
Install_Path = /share/MD0_DATA/.qpkg/Autorun
QPKG_File = autorun.qpkg
Enable = TRUE
 
Can anyone point me in the right direction. 

 

Does this help?

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.

Hello,

With no offence to the first poster (NeoAP), I think this is the wrong version of PlexConnect for any system (explanation follows), not just for QNAP.

  • I did what the guide described, but with no outcome and I am sure everything it was like it was supposed to be. Apple TV was unable to get data from PlexConnect even though it was able to “see” it (I checked the messages on the terminal running PlexConnect and they showed traffic). I searched many sites for solutions, I tried everything they proposed and still no result (I even add certificate to Apple TV via USB and Apple Configurator).
  • Then I applied the same installation guide on my Windows PC, where I had allready installed this version of PlexConnect, which is called PlexConnect-master and this version was installed with great success and no problems at all. The version in the proposed installation guide is called PlexConnect-new-movie-sections. I installed it with no problems (as on QNAP), but still Apple TV was not able to get data even though it was able to see it.
  • Therefore I installed the first version (PlexConnect-master) on my QNAP as described here mixed with some parts from this guide, since this version was working succesfully on my PC. Of course for the QNAP installation I followed the linux section and not the Windows section as I did for my PC.
  • The installation was easy, even though I had to disable some fuctions (e.g. WebServer for port 443) and terminate others by hand (e.g. Qthttpd for port 80) as described in the comments above in this blog post.
  • I also followed the link in the first post of this topic to make QNAP run my script on startup. I think you should also add the command “killall Qthttpd” to the script if you have problems with process Qthttpd on port 443 (by the way I think it is the Apache Server) and then the command “usleep 500” to make the script wait untill the process Qthttpd is killed.



    Let us know if someone installed the proposed version of PlexConnect on QNAP succesfully.

@Theofanis: I think for most people the instructions work just fine but it would make sense to use the iBaa's master at https://github.com/iBaa/PlexConnect

In case somebody is looking for an really easy way to maintain Plexconnect, I can recommend Tommeier's PlexConnect update & install script ( https://gist.github.com/tommeier/6255771 ) -> super easy to install and convenient to update (just put into into autorun QPKG).

But I have a question myself: did anybody get PIL/Pillow to work on the Qnap?