Plex(no)Connect

I've installed PlexConnect on my mac mini running PMS 0.9.9.0 (IP 192.168.0.100), uploaded the certificate to the AppleTV MD199ZP/A (running 6.0.2) but somehow things don't work. (Both PlexConnect and PMS are running on the same machine)

 

PlexConnect doesnt seams to be able to locate PMS. I tried GDM on, GDM off, set IP as 127.0.0.1 and all possible combinations... 

 
I am not running the DNS on PlexConnect as I have another one running on the same machine. That part works fine and trailers.apple.com points back to 192.168.0.100
 
 
My config is
 
[PlexConnect]
ip_plexconnect = 192.168.0.100
port_webserver = 80
ip_pms = 192.168.0.100
port_pms = 32400
prevent_atv_update = True
enable_plexconnect_autodetect = True
enable_plexgdm = False
enable_webserver_ssl = True
port_ssl = 443
certfile = ./assets/certificates/trailers.pem
ip_dnsmaster = 192.168.0.100
enable_dnsserver = False
hosttointercept = trailers.apple.com
port_dnsserver = 53
loglevel = High
logpath = .
 
 
 
The log looks like this
 
 
$ sudo ./PlexConnect.py 
17:32:08 PlexConnect: ***
17:32:08 PlexConnect: PlexConnect
17:32:08 PlexConnect: Press CTRL-C to shut down.
17:32:08 PlexConnect: ***
17:32:08 PlexConnect: started: 17:32:08
17:32:08 PlexConnect: Version: 0.3.1+
17:32:08 PlexConnect: Python: 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
17:32:08 PlexConnect: Host OS: darwin
17:32:08 PlexConnect: IP_self: 192.168.0.100
17:32:08 WebServer: started: 17:32:08
17:32:08 WebServer: ***
17:32:08 WebServer: WebServer: Serving HTTP on 192.168.0.100 port 80.
17:32:08 WebServer: ***
17:32:08 WebServer: started: 17:32:08
17:32:08 WebServer: ***
17:32:08 WebServer: WebServer: Serving HTTPS on 192.168.0.100 port 443.
17:32:08 WebServer: ***
17:32:12 WebServer: serving .xml: /
----------------------------------------
Exception happened during processing of request from ('192.168.0.21', 64353)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 649, in __init__
    self.handle()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/Users/ovidiu/Applications/PlexConnect/WebServer.py", line 215, in do_GET
    XML = XMLConverter.XML_PMS2aTV(PMSaddress, self.path + args, options)
  File "/Users/ovidiu/Applications/PlexConnect/XMLConverter.py", line 349, in XML_PMS2aTV
    PMS = PlexAPI.getXMLFromPMS(PMS_baseURL, path, options, authtoken=auth_token)
  File "/Users/ovidiu/Applications/PlexConnect/PlexAPI.py", line 320, in getXMLFromPMS
    response = urllib2.urlopen(request, timeout=20)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 396, in open
    protocol = req.get_type()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 258, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /
----------------------------------------

Anyone can give a hint ? What am I missing ??? 

 

Thanks.

 

 

a - an IP setting of 127.0.0.1 will never work, as this address will never specify your PMS host when looking from the aTV.

b - to my knowledge, PlexConnect/the aTV trying to connect will never request path "/". What did you do to get this error?

For further investigation, please set log_level to High and provide the full log (PlexConnect.log),including the time when you actually enter the trailers app.

I am an idiot.

I omitted one part of my setup in the question above (thinking I obviously got that one right). What I am trying to do is run plexconnect on different ports and use apache proxy. Once I removed that part, plexconnect works.

The issue now is, beside the apache proxy, that loading the movies or tv series lists happens extremely slow. It takes tens of seconds for the appletv to load the lists. Is that normal ?

Secondly, I need to figure out the proxy thing...

Edit: figured out the proxy... Since thw AppleTV now only fires https requests, the apache proxy needs to serve the right SSL cert. SSLCertificateFile and SSLCertificateKeyFile must be specified otherwise the default SSL cert is served (which is not recognized by the AppleTV)

now apache config looks like this: 


ServerName trailers.apple.com
SSLEngine off
RequestHeader set User-Agent AppleTV
ProxyPass / http://192.168.0.100:880/ nocanon
ProxyPassReverse / http://192.168.0.100:880/

<VirtualHost *:443>
ServerName trailers.apple.com
SSLEngine on
SSLProxyEngine on
SSLCertificateFile “[path_to]/PlexConnect/assets/certificates/trailers.cer”
SSLCertificateKeyFile “[path_to]/PlexConnect/assets/certificates/trailers.key”
RequestHeader set User-Agent AppleTV
ProxyPass / https://192.168.0.100:8443/ nocanon
ProxyPassReverse / https://192.168.0.100:8443/

Strangely, now the loading speed is much much better... Strange...

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