Stuck at the very first step! Please help me...

Hi Everybody,

 

I just bought an AppleTV (3) and want to run PlexConnect on it. I did all the steps and everything, but I'm going crazy over this problem:

 

It does not start PlexGDM and it just hangs on this line in the terminal:

17:12:17 WebServer: WebServer: Serving HTTPS on 192.168.0.12 port 443.
17:12:17 WebServer: ***

Can anybody please help me? My settings.cfg is as follows:

[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 = .

Help us help you:


https://github.com/iBaa/PlexConnect/wiki/How-to-report-an-issue

hi,


I will report the issue but i was wondering if i was missing something or doing something wrong. What could be possible reasons for PlexGDM not starting?

The expected output of what you see in the terminal has changed somewhat so you might not see the GDM messages that you saw in earlier code.

If you provide the info in the sticky along with the log (plexconnect.log in the app's folder NOT the terminal output) then we should be able to get you up and running ;)

Hi,

The content of the PlexConnect.log seems to be the same as the one in the terminal.

20:38:34 PlexConnect: started: 20:38:34
20:38:34 PlexConnect: Version: 0.3.1+
20:38:34 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)]
20:38:34 PlexConnect: Host OS: darwin
20:38:34 PlexConnect: IP_self: 192.168.0.35
20:38:34 DNSServer: started: 20:38:34
20:38:34 DNSServer: ***
20:38:34 DNSServer: DNSServer: Serving DNS on 192.168.0.35 port 53.
20:38:34 DNSServer: ***
20:38:35 WebServer: started: 20:38:35
20:38:35 WebServer: ***
20:38:35 WebServer: WebServer: Serving HTTP on 192.168.0.35 port 80.
20:38:35 WebServer: ***
20:38:35 WebServer: started: 20:38:35
20:38:35 WebServer: ***
20:38:35 WebServer: WebServer: Serving HTTPS on 192.168.0.35 port 443.
20:38:35 WebServer: ***

Are you then using the ATV to click into the trailers app?

...you should (at least) see some DNS requests, from aTV to PlexConnect and forwarded to "the internet".

If not...

1) your firewall is doing a good job of blocking them or

2) you didn't set the aTV's DNS correctly.

Hi,

The requests are all working fine, this is wat I see when I click the trailers app:

20:50:53 PlexConnect: ***
20:50:53 PlexConnect: PlexConnect
20:50:53 PlexConnect: Press CTRL-C to shut down.
20:50:53 PlexConnect: ***
20:50:53 PlexConnect: started: 20:50:53
20:50:54 PlexConnect: Version: 0.3.1+
20:50:54 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)]
20:50:54 PlexConnect: Host OS: darwin
20:50:54 PlexConnect: IP_self: 192.168.0.35
20:50:54 DNSServer: started: 20:50:54
20:50:54 DNSServer: ***
20:50:54 DNSServer: DNSServer: Serving DNS on 192.168.0.35 port 53.
20:50:54 DNSServer: intercept: ['trailers.apple.com'] => 192.168.0.35
20:50:54 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
20:50:54 DNSServer: forward other to higher level DNS: 8.8.8.8
20:50:54 DNSServer: ***
20:50:54 WebServer: started: 20:50:54
20:50:54 WebServer: ***
20:50:54 WebServer: WebServer: Serving HTTP on 192.168.0.35 port 80.
20:50:54 WebServer: ***
20:50:54 WebServer: started: 20:50:54
20:50:54 WebServer: ***
20:50:54 WebServer: WebServer: Serving HTTPS on 192.168.0.35 port 443.
20:50:54 WebServer: ***
20:51:07 DNSServer: DNS request received!
20:51:07 DNSServer: Source: ('192.168.0.15', 62195)
20:51:07 DNSServer: Domain: trailers.apple.com
20:51:07 DNSServer: ***intercept request
20:51:07 DNSServer: -> DNS response: 192.168.0.35

But then it gives me the message that trailers are not available. Also I cannot find anywhere that It found my plex server. Any idea(s)? (No firewall is enabled)

Maybe if it is of any help. When I go to the webserver in my browser, i get this:

Error code 403.

Message: Not Serving Client 192.168.0.35.

Error code explanation: 403 = Request forbidden – authorization will not help.

Please shutdown PlexConnect cleanly (using CTRL+C), open settings.cfg and change log level to "High" (note the capital H) and provide a new log plus the info requested in the sticky.

The 403 message is expected behaviour because of your browser's user string.

Hi,

This is the log after I did the things you requested and started the Trailer app:

21:17:30 PlexConnect: started: 21:17:30
21:17:30 PlexConnect: Version: 0.3.1+
21:17:30 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)]
21:17:30 PlexConnect: Host OS: darwin
21:17:30 Settings: getsetting enable_plexconnect_autodetect=True
21:17:30 PlexConnect: IP_self: 192.168.0.35
21:17:30 Settings: getsetting hosttointercept=trailers.apple.com
21:17:30 Settings: getsetting enable_dnsserver=True
21:17:30 DNSServer: started: 21:17:30
21:17:30 Settings: getsetting port_dnsserver=53
21:17:30 Settings: getsetting ip_dnsmaster=8.8.8.8
21:17:30 Settings: getsetting prevent_atv_update=True
21:17:30 DNSServer: ***
21:17:30 DNSServer: DNSServer: Serving DNS on 192.168.0.35 port 53.
21:17:30 DNSServer: intercept: ['trailers.apple.com'] => 192.168.0.35
21:17:30 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
21:17:30 DNSServer: forward other to higher level DNS: 8.8.8.8
21:17:30 DNSServer: ***
21:17:30 WebServer: started: 21:17:30
21:17:30 Settings: getsetting port_webserver=80
21:17:30 WebServer: ***
21:17:30 WebServer: WebServer: Serving HTTP on 192.168.0.35 port 80.
21:17:30 WebServer: ***
21:17:30 ATVSettings: init class CATVSettings
21:17:30 ATVSettings: load settings
21:17:31 Settings: getsetting enable_webserver_ssl=True
21:17:31 WebServer: started: 21:17:31
21:17:31 Settings: getsetting port_ssl=443
21:17:31 Settings: getsetting certfile=./assets/certificates/trailers.pem
21:17:31 Settings: getsetting certfile=./assets/certificates/trailers.pem
21:17:31 WebServer: ***
21:17:31 WebServer: WebServer: Serving HTTPS on 192.168.0.35 port 443.
21:17:31 WebServer: ***
21:17:48 DNSServer: DNS request received!
21:17:48 DNSServer: Source: ('192.168.0.15', 51754)
21:17:48 DNSServer: Domain: trailers.apple.com
21:17:48 DNSServer: ***intercept request
21:17:48 DNSServer: -> DNS response: 192.168.0.35

Sticky info:

ATV Model 3 

Model: MD199NF/A

Firmware: 6.1 (6998.99.16)

DNS server: 192.168.0.35

Local ip plexconnect: 192.168.0.35 (OSX 10.9.2)

Local ip plexmediaserver: 192.168.0.35 (OSX 10.9.2)

Plex media server version: 0.9.9.5.411-da1d892

Version: Checked out couple of minutes ago from now

I would try deleting the cert from PlexConnect and the ATV and reinstall as everything else looks okay.

I would say generate new certs and load them on your aTV again. Reboot your entire network after loading certs - mac, aTV, router, etc. Do you have any anti-virus or firewall enabled on your mac? What is your network setup from aTV to router and mac to router? Is a webserver running?


Edit - f00b4r beat me to it.

Hi,

For the cert part, let's see if I did it the right way:

I generate the 2 files like this: 

openssl req -new -nodes -newkey rsa:2048 -out ~/Desktop/trailers.pem -keyout ~/Desktop/trailers.key -x509 -days 7300 -subj "/C=US/CN=trailers.apple.com"
openssl x509 -in ~/Desktop/trailers.pem -outform der -out ~/Desktop/trailers.cer && cat ~/Desktop/trailers.key >> ~/Desktop/trailers.pem

Then I add them to the correct folder etc and on the apple tv is do this:

Go to the AppleTV settings menu.
Select “General” then scroll the cursor down to highlight “Send Data To Apple” and set to "No".
With "Send Data To Apple" highlighted, press “Play” (not the normal “Select” button) and you will be prompted to add a profile.
Enter (without the quotes): "http://trailers.apple.com/trailers.cer"

This should be enough right? I have tried to do to this step over and over again but it always gives me the same error message as above.

As for my internet connection: no firewall, and everything is connected to a router that acts like a bridge that it then again connected to the modem. I can connect the plex server from anywhere, so I don't think there should be a problem there.

By the way, thanks alot for helping guys!

If you try and readd a cert profile to the ATV you should delete the existing one first, maybe that is the issue.

Also in the support/OSX folder there is a createcert.bash script that will generate certs for you.

Ok, so I tried removing the certs and creating them via the createcert.bash script. @f00b4r you mean just deleting the trailers.apple.com profile and going through these steps again?:

Go to the AppleTV settings menu.
Select “General” then scroll the cursor down to highlight “Send Data To Apple” and set to "No".
With "Send Data To Apple" highlighted, press “Play” (not the normal “Select” button) and you will be prompted to add a profile.
Enter (without the quotes): "http://trailers.apple.com/trailers.cer"

Yes AND removing the certs from the /assets/certificates folder.

The new ones will not match the old ones so you need to replace both.

I did it and tried restarting everything etc. Nothing works :(. Do you have any other ideas?

I would think it would have to be something with your mac or your network. I have yet to see any problems with any aTV besides bad certs.