PlexConnect times out when trying to view movie sections

I have two movie sections and one TV section. Browsing around in the TV section works fine, but I can't browse any of the movie sections with PlexConnect. Web interface and Plex iOS app works perfectly.

 

Latest Plex Media server (0.9.11.1) and latest PlexConnect (freshly pulled from git just now, version 0.4-dev). The PlexConnect.log shows:

11:07:56 XMLConverter: XML_ExpandNode - Error in cmd ADDXML, line 
{{ADDXML(RecentlyReleased::newest)}}

{{VAR(items:NoKey:FALSE)}}  

Traceback (most recent call last):
File “/Users/username/PlexConnect/XMLConverter.py”, line 630, in XML_ExpandNode
res = getattr(CommandCollection, ‘TREE_’+cmd)(elem, child, src, srcXML, param)
File “/Users/username/PlexConnect/XMLConverter.py”, line 1032, in TREE_ADDXML
PMS = PlexAPI.getXMLFromPMS(self.PMS_baseURL, path, self.options, auth_token)
File “/Users/username/PlexConnect/PlexAPI.py”, line 363, in getXMLFromPMS
XML = etree.parse(response)
File “”, line 62, in parse
File “”, line 38, in parse
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 380, in read
data = self._sock.recv(left)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 567, in read
s = self.fp.read(amt)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 380, in read
data = self._sock.recv(left)
timeout: timed out

Any idea what's going on? Let me know if I can do anything to shed more light on this, providing more logs, settings, etc.

I'd be happy to provide more information. Just let me know what you need.

Guess, I need a full log. From the start to browsing into the bad movie section.... loglevel = High.

How many movies per section are we taking about?

Edit: Did you try a PMS library refresh?

Tried to refresh the library, didn't help. Pulled latest version from git yesterday (11 november 2014), still same problem. The two libraries have ~200 and ~100 items.

Set loglevel to High and entered one library. This time I get the On Deck view, but it times out. Recently added in the On Deck view doesn't show anything.

There seems to be a lot of DNS requests received, not sure what's going on there. I only have 192.168.1.x addresses on my local network. I get these even if I physically disconnect the WAN cable from my ADSL modem.

Here's the log from starting fresh (also restarted AppleTV) and just going into the On Deck view for one library

What are you running PlexConnect on and what is your router's IP address (it looks like you are running on an OSX machine but you have some weird IP addressing setup or are serving DHCP from there indicating a server setup)?

Could you please verify what those two request to PMS will answer (from another machine/browser)?

>> http://192.168.1.1:32400/library/sections/1/recentlyAdded

>> http://192.168.1.1:32400/library/sections/1/newest

This whole issue really looks like a somewhat messed up PMS library. Though - I guess - PlexConnect shouldn't freak out in such a way either.

Could you please verify what those two request to PMS will answer (from another machine/browser)?

>> http://192.168.1.1:32400/library/sections/1/recentlyAdded

>> http://192.168.1.1:32400/library/sections/1/newest

This whole issue really looks like a somewhat messed up PMS library. Though - I guess - PlexConnect shouldn't freak out in such a way either.

Response comes fairly quickly. Output looks OK to me, but I'm not sure what I'm looking for.

http://pastebin.com/LVipHRMa

and

http://pastebin.com/VXhVTbAM

respectively. Response comes fairly quickly. Output looks OK to me, but I'm not sure what I'm looking for.

Just to make sure - those XMLs were captured, while aTV/PlexConnect still throws the errors?

I really don't understand what is going on here...

Just to make sure - those XMLs were captured, while aTV/PlexConnect still throws the errors?

I really don't understand what is going on here...

Yes, that is correct. Other data point: Other Plex clients (web and iOS) works fine against this library. It is only PlexConnect that has problems.

I tried the latest release of Plex as well (November 4 I believe), but see same errors. Checked the database as well with

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"

and it reports status ok.

It sounds like the easiest way forward might be to remove the library and rebuild it from scratch. If nobody else has seen this error it might not be worth spending too much time to figure out.

Edit: I just removed one of the two library sections and re-added it. Still see the same problem.

What are you running PlexConnect on and what is your router's IP address (it looks like you are running on an OSX machine but you have some weird IP addressing setup or are serving DHCP from there indicating a server setup)?

What are you running PlexConnect on and what is your router's IP address (it looks like you are running on an OSX machine but you have some weird IP addressing setup or are serving DHCP from there indicating a server setup)?

I'm running Plex on a Mac Mini with Internet Sharing turned on (which is probably why you see the DHCP stuff). IP address of router is 192.168.1.254 (but the Mac Mini itself is also routing from the 192.168.2/24 network to 192.168.1/24). Mac Mini is connected to 192.168.1/24 over wireless (which is how I use Plex), while the 192.168.2/24 network is on the wired interface.

That might be an issue for autodetection in the code.

Can you give:

- an overview of your network topology, including what devices are connected to what

- your settings.cfg

- a log from plexconnect

Hopefully it just means hard coding some values but the above should help Baa and I understand what is happening better.

That might be an issue for autodetection in the code.

Can you give:

- an overview of your network topology, including what devices are connected to what

- your settings.cfg

- a log from plexconnect

Hopefully it just means hard coding some values but the above should help Baa and I understand what is happening better.

I'm not sure what else to say about the network, it looks like this:

[Wired 192.168.2/24 network]<-->[Mac Mini w/Internet Sharing]<-->[Wireless 192.168.1/24 network]<-->[Router on 192.168.1.254]<-->[Internet]

The 192.168.2/24 wired network is a pure home automation network and should not be in play when using Plex. All Plex clients (iOS both on iPhones and iPads, web from several different Mac laptops and AppleTV) are on the wireless 192.168.1/24 network. All clients work fine except the AppleTV when accessing the two movie libraries through PlexConnect.

Settings.cfg:

[PlexConnect]
enable_plexgdm = True
ip_pms = 192.168.178.10
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 = 80
enable_webserver_ssl = True
port_ssl = 443
certfile = ./assets/certificates/trailers.pem
loglevel = Normal
logpath = .

PlexConnect log with loglevel=High is in the fourth post in this thread, let me know if I missed something when posting that. Or do you want one with loglevel=Normal?

I have made some progress. Messing around with the Settings.cfg did not help (turning off GDM and auto detect and setting the IP address to 192.168.1.1).

But when I turn off Internet Sharing on the Mac Mini everything works perfectly. Unfortunately this means my home automation system is useless.

If I turn Internet Sharing back on (without changing any settings or even restarting PlexConnect) I get the same problems as I reported previously in the thread.

Hope this helps with further debugging.

No way to use an additional router in between the main router and your mac for your home automation gear instead of your mac internet sharing? What is the protocal for your home automation/network layout for it to work? I have a few devices running off a few additional ap’s (cheap airport expresses purchased used on eBay) like a wifi thermostat and a few harmony links for av control of my whole house audio and lighting control. My main router is a ddwrt router that pulls in the ISP and the wifi is not even in use. I run all my hard wired networks with Ethernet to coax converters but could also run plain ethernet if desired to each room instead. I have multiple ap’s for AirPlay use in my garage for audio and other locations but all my ip addresses run in the 192.168.2.x range on all my routers/ap’s and I have no issues with my aTV clients or other home automation/hard wired/wifi clients running in the same network segment. I don’t use any internet sharing whatsoever.

Hmm internet sharing can interfere with it as it can hog port 53(?).

You probably have two options:

1> Try hardcoding all the relevant settings.cfg options (make sure you use 'False' with a capital F), although if it is a port 53 hogging issue this will not help:

enable_plexgdm = True
ip_pms = 192.168.178.10
port_pms = 32400

enable_plexconnect_autodetect = True
ip_plexconnect = 0.0.0.0

2> Use something like a wireless extender  instead of internet sharing on your Mac to setup a second network or transparently extend your own

I don't use any internet sharing whatsoever.

That seems to be what is causing the issue. The only way for me to _not_ use Internet sharing is to buy more hardware. I'd rather avoid that.

Hmm internet sharing can interfere with it as it can hog port 53(?).

You probably have two options:

1> Try hardcoding all the relevant settings.cfg options (make sure you use 'False' with a capital F), although if it is a port 53 hogging issue this will not help:

enable_plexgdm = True
ip_pms = 192.168.178.10
port_pms = 32400

enable_plexconnect_autodetect = True
ip_plexconnect = 0.0.0.0

2> Use something like a wireless extender  instead of internet sharing on your Mac to setup a second network or transparently extend your own

Thanks. I tried your first option to no avail. OS X seems impossible to configure as a bridge between the wired and wireless network, otherwise that could be one way to go.

The weird thing is that my TV library works just fine through PlexConnect, it is only the two movie libraries that I have problems with... Also, I can browse some sections of the movie library without problems as well (e.g. directors and decades work just fine). I would expect either everything to work or nothing if port 53 was taken by internet sharing. I can always connect to PlexConnect with my AppleTV.

I have the same problem. Only a few libaries showing "trailer unavailable" when trying to play something from those libraries. But I can browser the libraries just fine. IMHO the error must have come with a recnt new version of Plexconnect as 1. it worked before flawless and 2. no other change in the configuration hardware or software. There is a chance that a firmware update of my QNAP (to 4.1.1.) had something to do with it but I doubt it as then the whole setup shouldn't work and not single library folders...

Sorry, I cannot 100% track the point when it broke as I have been travelling abroad for the last 3 weeks and didnt use the system.

Just an idea: could this have something to do with trailers? Does Plexconnect support playing trailers before the movie yet? This could be a logical explanation why certain libaries are affected...

No... no auto-insertion of trailers aka "cinema mode" in PlexConnect.