PlexConnect.py hangs or is waiting for something

Hi Guys, hopefully someone can help me here. I'm using PlexConnect since months with updating it regulary. The last update after four weeks absence was on March the 25th. With this update the script is not working for me. 

 

Here is my configuration:

 

  • Your ATV model (2 or 3) and firmware version (found under the ATV settings > general > about > Apple TV software): ATV3 6.1 (6698.99.16)

  • The DNS server set on the ATV (found under the ATV settings > general > network > DNS): 192.168.178.20

  • The local IP address of the device that PlexConnect is installed on: 192.168.178.20

  • The device and operating system (including version number) that PlexConnect is installed on: QNAP TS-559 Pro+ (linux Ubuntu 4.1.2-16ubuntu2)

  • The device and operating system (including version number) that the Plex media server (PMS) is installed on: QNAP TS-559 Pro+ (linux Ubuntu 4.1.2-16ubuntu2)

  • The Plex media server (PMS) version number you are running (do not put 'latest'): 0.9.9.7.429-f80a8d6

  • The local IP address of the device that the Plex media server (PMS) is installed on: 192.168.178.20

  • The PlexConnect version number. If using Github source then a time and date of download (look at the creation date of the folder) and if you are using any non-standard setup e.g. Plexify or a fork. The last download and try happened today 27.03.2014

The content of my "Settings.cfg":

[PlexConnect]
enable_plexgdm = True
ip_pms = 192.168.178.20
port_pms = 32400
enable_dnsserver = True
port_dnsserver = 53
ip_dnsmaster = 8.8.8.8
prevent_atv_update = True
enable_plexconnect_autodetect = True
ip_plexconnect = 0.0.0.0
hosttointercept = trailers.apple.com
port_webserver = 88
enable_webserver_ssl = True
port_ssl = 443
certfile = ./assets/certificates/trailers.pem
loglevel = High
logpath = . 

The LogFile is attached

For this try I left most of the entries on default but it is even not working if I use my standard configuration.

[PlexConnect]
enable_plexgdm = True
ip_pms = 192.168.178.20
port_pms = 32400
enable_dnsserver = True
port_dnsserver = 53
ip_dnsmaster = 192.168.178.1
prevent_atv_update = True
enable_plexconnect_autodetect = True
ip_plexconnect = 192.168.178.20
hosttointercept = trailers.apple.com
port_webserver = 88
enable_webserver_ssl = True
port_ssl = 443
certfile = /root/Library/PlexConnect/assets/certificates/trailers.pem
loglevel = Normal
logpath = . 
 
The LogFile doesn't show the Plexapi call but I'm not really familiar with this. At this time it seem that the script hangs or something. Any ideas?
 
Cheers
oVo

You have the webserver on port 88, is this intentional and do you have a reverse proxy setup to account for this?

It's not possible to use Port 80 because it is used on my device. I am using it for months without problems. Should I open a port on my router for this? 

The ATV only listens on port 80 so you cannot change this without setting up a reverse proxy to account for this.

There were so code changes on the 25th March around this, could you see if you get the same issue if you try with the commit previous to this?


https://github.com/iBaa/PlexConnect/tree/58e95a3a8f7bca8efca0baa0d1db02f14a9d8269

Thank you for you quick response. I will try it immediately. In the meanwhile I have also cleared the port 80 on my device so I can test both. The most recent commit with the web server on port 80 and the one provided by you with the web server on port 88 or port 80. 

I'll be back soon......

Okay here comes the log with the actual commit and the web server on port 80:

15:18:19 PlexConnect: started: 15:18:19
15:18:19 PlexConnect: Version: 0.3.1+
15:18:19 PlexConnect: Python: 2.7 (r27:82500, Aug 21 2010, 07:52:47) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
15:18:19 PlexConnect: Host OS: linux2
15:18:19 Settings: getsetting enable_plexconnect_autodetect=True
15:18:19 PlexConnect: IP_self: 192.168.178.20
15:18:19 Settings: getsetting hosttointercept=trailers.apple.com
15:18:19 Settings: getsetting enable_dnsserver=True
15:18:19 DNSServer: started: 15:18:19
15:18:19 Settings: getsetting port_dnsserver=53
15:18:19 Settings: getsetting ip_dnsmaster=8.8.8.8
15:18:19 Settings: getsetting prevent_atv_update=True
15:18:19 DNSServer: ***
15:18:19 DNSServer: DNSServer: Serving DNS on 192.168.178.20 port 53.
15:18:19 DNSServer: intercept: ['trailers.apple.com'] => 192.168.178.20
15:18:19 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
15:18:19 DNSServer: forward other to higher level DNS: 8.8.8.8
15:18:19 DNSServer: ***
15:18:19 WebServer: started: 15:18:19
15:18:19 Settings: getsetting port_webserver=80
15:18:19 WebServer: ***
15:18:19 WebServer: WebServer: Serving HTTP on 192.168.178.20 port 80.
15:18:19 WebServer: ***
15:18:19 ATVSettings: init class CATVSettings
15:18:19 ATVSettings: load settings
15:18:19 Settings: getsetting enable_webserver_ssl=True
15:18:19 WebServer: started: 15:18:19
 
 
Sadly the issue is the same! 
 
 
Next try with the commit prior to 25th March with web server on port 88:
 
 
15:32:00 PlexConnect: started: 15:32:00
15:32:00 PlexConnect: Version: 0.3.1+
15:32:00 PlexConnect: Python: 2.7 (r27:82500, Aug 21 2010, 07:52:47) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
15:32:00 PlexConnect: Host OS: linux2
15:32:00 Settings: getsetting enable_plexconnect_autodetect=True
15:32:00 PlexConnect: IP_self: 192.168.178.20
15:32:00 Settings: getsetting hosttointercept=trailers.apple.com
15:32:00 Settings: getsetting enable_dnsserver=True
15:32:00 DNSServer: started: 15:32:00
15:32:00 Settings: getsetting port_dnsserver=53
15:32:00 Settings: getsetting ip_dnsmaster=8.8.8.8
15:32:00 Settings: getsetting prevent_atv_update=True
15:32:00 DNSServer: ***
15:32:00 DNSServer: DNSServer: Serving DNS on 192.168.178.20 port 53.
15:32:00 DNSServer: intercept: ['trailers.apple.com'] => 192.168.178.20
15:32:00 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
15:32:00 DNSServer: forward other to higher level DNS: 8.8.8.8
15:32:00 DNSServer: ***
15:32:00 WebServer: started: 15:32:00
15:32:00 Settings: getsetting port_webserver=88
15:32:00 WebServer: ***
15:32:00 WebServer: WebServer: Serving HTTP on 192.168.178.20 port 88.
15:32:00 WebServer: ***
15:32:00 ATVSettings: init class CATVSettings
15:32:00 ATVSettings: load settings
15:32:00 Settings: getsetting enable_webserver_ssl=True
15:32:00 WebServer: started: 15:32:00
15:32:00 Settings: getsetting port_ssl=443
15:32:00 Settings: getsetting certfile=./assets/certificates/trailers.pem
15:32:00 Settings: getsetting certfile=./assets/certificates/trailers.pem
15:32:00 WebServer: ***
15:32:00 WebServer: WebServer: Serving HTTPS on 192.168.178.20 port 443.
15:32:00 WebServer: ***
15:32:08 PlexConnect: Shutting down.
15:32:09 WebServer: Shutting down.
15:32:09 ATVSettings: save settings
15:32:09 WebServer: Shutting down.
15:32:10 DNSServer: Shutting down.
15:32:10 PlexConnect: shutdown
 
 

Okay and the third one with the commit prior to 25th March with web server on port 80:

15:36:35 PlexConnect: started: 15:36:35
15:36:35 PlexConnect: Version: 0.3.1+
15:36:35 PlexConnect: Python: 2.7 (r27:82500, Aug 21 2010, 07:52:47) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
15:36:35 PlexConnect: Host OS: linux2
15:36:35 Settings: getsetting enable_plexconnect_autodetect=True
15:36:35 PlexConnect: IP_self: 192.168.178.20
15:36:35 Settings: getsetting hosttointercept=trailers.apple.com
15:36:35 Settings: getsetting enable_dnsserver=True
15:36:35 DNSServer: started: 15:36:35
15:36:35 Settings: getsetting port_dnsserver=53
15:36:35 Settings: getsetting ip_dnsmaster=8.8.8.8
15:36:35 Settings: getsetting prevent_atv_update=True
15:36:35 DNSServer: ***
15:36:35 DNSServer: DNSServer: Serving DNS on 192.168.178.20 port 53.
15:36:35 DNSServer: intercept: ['trailers.apple.com'] => 192.168.178.20
15:36:35 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
15:36:35 DNSServer: forward other to higher level DNS: 8.8.8.8
15:36:35 DNSServer: ***
15:36:35 WebServer: started: 15:36:35
15:36:35 Settings: getsetting port_webserver=80
15:36:35 WebServer: ***
15:36:35 WebServer: WebServer: Serving HTTP on 192.168.178.20 port 80.
15:36:35 WebServer: ***
15:36:35 ATVSettings: init class CATVSettings
15:36:35 ATVSettings: load settings
15:36:35 Settings: getsetting enable_webserver_ssl=True
15:36:35 WebServer: started: 15:36:35
15:36:35 Settings: getsetting port_ssl=443
15:36:35 Settings: getsetting certfile=./assets/certificates/trailers.pem
15:36:35 Settings: getsetting certfile=./assets/certificates/trailers.pem
15:36:35 WebServer: ***
15:36:35 WebServer: WebServer: Serving HTTPS on 192.168.178.20 port 443.
15:36:35 WebServer: ***
15:36:43 PlexConnect: Shutting down.
15:36:43 WebServer: Shutting down.
15:36:43 ATVSettings: save settings
15:36:43 WebServer: Shutting down.
15:36:45 DNSServer: Shutting down.
15:36:45 PlexConnect: shutdown
 
 
The only difference I can see is that the former version shows the processing of the cert files from the settings.cfg. The port of the web server is good on 80 or on 88.
 
Can it be a timeout or something? It seems not to be a crash because the ctrl-c keys are working.

I don't really understand what you are waiting for.

You got to go to your aTV and select "trailers" for things to move forward...

YES you are completely right Baa. 

I just waited for an entry like "PlexApi: PMS discovered" or something like that. Because the last two days I always received the well known "Trailers not available" error. Therefore I only tested on the console. Apologies for the inconvenience.

Is it now save to use the most recent commit or should I wait a few days with the update?

The latest commit is _always_ safe. Per definition. :-D

You might not want to use for life-saving-devices, though... but I don't think the aTV would fit that bill anyways.

Okay, Baa and f00b4r you both saved my a**! :rolleyes:

Thank you very much. It's not really funny to tell my wife that her favorite TV-show is over for now.....  :D

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