FreeNAS: MyPlex does not log in

After upgrading PMS, PlexConnect cannot login into MyPlex anylonger.

Local content plays fine. Shared content via PlexWeb & iPhone app plays fine.

 

What could be the possible reason for this ? 

ATV: 3 (iOS 7.0 - 6897.5)
ATV DNS: 10.0.0.2
PlexConnect: 10.0.0.2 (0.5-dev)
PMS: 10.0.0.2 (plexmediaserver-0.9.11.4.739_1-amd64)
PlexConnect+PMS: FreeNAS-9.2.1.8-RELEASE-x64

Settings.cfg

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

PlexConnect.log

11:48:59 PlexConnect: started: 11:48:59
11:48:59 PlexConnect: Version: 0.5-dev
11:48:59 PlexConnect: Python: 2.7.9 (default, Dec 25 2014, 16:22:06)
[GCC 4.2.1 20070831 patched [FreeBSD]]
11:48:59 PlexConnect: Host OS: freebsd9
11:48:59 PlexConnect: PILBackgrounds: Is PIL installed? True
11:48:59 Settings: getsetting enable_plexconnect_autodetect=False
11:48:59 Settings: getsetting ip_plexconnect=10.0.0.2
11:48:59 PlexConnect: IP_self (from settings): 10.0.0.2
11:48:59 Settings: getsetting hosttointercept=trailers.apple.com
11:48:59 ATVSettings: init class CATVSettings
11:48:59 ATVSettings: load settings
11:48:59 Settings: getsetting enable_dnsserver=True
11:48:59 DNSServer: started: 11:48:59
11:48:59 Settings: getsetting port_dnsserver=53
11:48:59 Settings: getsetting ip_dnsmaster=8.8.8.8
11:48:59 Settings: getsetting prevent_atv_update=True
11:48:59 DNSServer: ***
11:48:59 DNSServer: DNSServer: Serving DNS on 10.0.0.2 port 53.
11:48:59 DNSServer: intercept: ['trailers.apple.com'] => 10.0.0.2
11:48:59 DNSServer: restrain: ['mesu.apple.com', 'appldnld.apple.com', 'appldnld.apple.com.edgesuite.net'] => 127.0.0.1
11:48:59 DNSServer: forward other to higher level DNS: 8.8.8.8
11:48:59 DNSServer: ***
11:48:59 WebServer: started: 11:48:59
11:48:59 Settings: getsetting port_webserver=80
11:48:59 WebServer: ***
11:48:59 WebServer: WebServer: Serving HTTP on 10.0.0.2 port 80.
11:48:59 WebServer: ***
11:49:00 Settings: getsetting enable_webserver_ssl=True
11:49:00 WebServer: started: 11:49:00
11:49:00 Settings: getsetting port_ssl=443
11:49:00 Settings: getsetting certfile=./assets/certificates/trailers.pem
11:49:00 Settings: getsetting certfile=./assets/certificates/trailers.pem
11:49:00 WebServer: ***
11:49:00 WebServer: WebServer: Serving HTTPS on 10.0.0.2 port 443.
11:49:00 WebServer: ***
11:49:21 DNSServer: DNS request received!
11:49:21 DNSServer: Source: ('10.0.0.8', 63117)
11:49:21 DNSServer: Domain: appldnld.apple.com
11:49:21 DNSServer: ***restrain request
11:49:21 DNSServer: -> DNS response: 10.0.0.2
11:49:23 DNSServer: DNS request received!

11:50:17 WebServer: http request path:
/&PlexConnect=MyPlexLogin&PlexConnectCredentials=%3A&PlexConnectUDID=C07HP02BDRHN
11:50:17 Localize: aTVLanguage: en
11:50:17 WebServer: pms address:

11:50:17 WebServer: cleaned path:
/
11:50:17 WebServer: PlexConnect options:
{‘aTVAddress’: ‘10.0.0.8’, ‘PlexConnectCredentials’: ‘:’, ‘aTVLanguage’: ‘en’, ‘PlexConnectUDID’: ‘C07HP02BDRHN’, ‘aTVScreenResolution’: ‘1080’, ‘aTVFirmwareVersion’: ‘7.0’, ‘PlexConnect’: ‘MyPlexLogin’}
11:50:17 WebServer: additional arguments:

11:50:17 WebServer: serving .xml: /
11:50:17 XMLConverter: ---------------------------------------------
11:50:17 XMLConverter: Input: /
11:50:17 XMLConverter: Initial Command: MyPlexLogin
11:50:17 XMLConverter: MyPlex->Logging In…
11:50:18 WebServer: http request header:
Host: trailers.apple.com
X-Apple-Store-Front: 143452-2,19
Accept: /
Accept-Encoding: gzip, deflate
Accept-Language: en;q=0.9
Cookie: mz_at0-1032705956=AwQAAAEMAADEfAAAAABSUqj8MsxLx1+vL/DR7IHgAUF9lYK6ZsY=; s_vi=[CS]v1|28949D1B85163A3D-600001A4402EA9ED[CE]
Connection: keep-alive
X-Apple-TV-Resolution: 1080
X-Apple-TV-Version: 7.0
User-Agent: AppleTV/7.0 iOS/8.0 AppleTV/7.0 model/AppleTV3,1 build/12A365b (3; dt:12)

11:50:18 WebServer: http request path:
/PlexConnect.xml&PlexConnectUDID=C07HP02BDRHN
11:50:18 Localize: aTVLanguage: en
11:50:18 WebServer: pms address:

11:50:18 WebServer: cleaned path:
/PlexConnect.xml
11:50:18 WebServer: PlexConnect options:
{‘aTVScreenResolution’: ‘1080’, ‘PlexConnectUDID’: ‘C07HP02BDRHN’, ‘aTVFirmwareVersion’: ‘7.0’, ‘aTVLanguage’: ‘en’, ‘aTVAddress’: ‘10.0.0.8’}
11:50:18 WebServer: additional arguments:

11:50:18 WebServer: serving .xml: /PlexConnect.xml

 

fallback done to 0.5 and plexmediaserver-0.9.11.1.678-amd64, no difference, myplex won't login. 

I have truly no idea where to look.  

Is your plex id locked? Try signing out/in on your host machine...

Signed out/in on the server, ID is not locked.

Content plays from remote shares via plexweb/iphone (both wifi & 4g).

Could this be a network related issue for redirecting plexconnect requests ?

is this supposed to remain empty ?

11:50:17 WebServer: pms address:

>>WebServer: pms address:

It's not supposed to stay empty. But if no PMS is needed - like in the settings section - it doesn't matter. :-)

>>WebServer: pms address:

It's not supposed to stay empty. But if no PMS is needed - like in the settings section - it doesn't matter. :-)

But it has been set in the settings (10.0.0.2) ?

?

Well, in settings.cfg you need to specify that address, unless you let PlexConnect figure it out.

I meant, when browsing into the aTV/PlexConnect/Settings menu, there is no need for PlexConnect to address a special PMS. It all stays internal, no Settings are broadcasted to PMS.

Understood. I have set it in Settings.cfg

Would it matter if I have enabled GDM in PMS?

PMS shouldn't be needed for sign in - though it might need to share data later on.

From you log...

>>11:50:17 XMLConverter: MyPlex->Logging In...

>>11:50:18 WebServer: serving .xml: /PlexConnect.xml

It's just one second. You don't seem to navigate within PlexConnect. What happens? Do you cancel signing in with long MENU press? Give it some time - 1sec surely shouldn't be the timeout. :-)

I try to sign in, spinning indicator and left it spinning for more than a minute (are these credentials stored somewhere btw?)

Stored in ATVSettings.cfg, under your aTV UDID.

it is very weird behaviour. ATVSetting.cfg does not save the UDID (as it never receives an ack)

Installed Plexconnect on my mac, works instantly.

Somehow the requests that are send to plex for the tokenrequest (?) are not being received back to this machine. (running in freenas with jail configuration - worked before without having to preconfigure anything).

Looking at this part:

11:50:17 XMLConverter: Input:  /
11:50:17 XMLConverter: Initial Command: MyPlexLogin
11:50:17 XMLConverter: MyPlex->Logging In...
11:50:18 WebServer: http request header:
Host: trailers.apple.com
X-Apple-Store-Front: 143452-2,19

The request appears to go outside ? (x-apple-store-front ?)

>>it is very weird behaviour. ATVSetting.cfg does not save the UDID (as it never receives an ack)

You don't get a section "[<your aTV ID]" in ATVSettings.cfg? Do your settings (like preferred view) stick when rebooting the host? Ist you ATVSettings.cfg file writeable by python?

I have to correct myself: it stores the aTV ID, but it does not store the myplex credentials and the rest of the preferences that normally end up in that sections of the .cfg

Yes the file is writable.

I have verified the dirs against my mac config, they are identical and functional, except for the login on the freenas. 

Is there anything with FreeNAS to not be able to connect to plex.tv?

It has no problem connecting to plex.tv but whatever comes back, does not arrive/or is not handled on the freenas box. 

I can do a curl to plex.tv - no problem response comes back.

The aTV works fine as well (internet connection exists).

It used to work without any problem, I have no idea where to look, a natting/bridge/gateway issue maybe ?

Any news on this? I just installed the latest PlexConnect in a new jail but cannot log into a myplex account. The loading wheel keeps spinning. 

Since I setup the server for somebody else it is connected to a router, which does NAT into my home net. In order to reach the web two NAT routers are in between the web and the plexconnect running on the freenas server. Could this impose any issues? 

No news - I am still having this issue, in the mean time I have about 5 PlexConnect instances running in my network (out of testing-frustration), which all function properly on various platforms, except on the FreeNAS.

I have used tcpdump to see the packets leaving my freenas towards plex.tv, nothing comes back. Have no idea where this goes wrong (url encoding? natting? routing?) 

Have you tried changing your myplex password to make sure it’s not an issue with a special character in your current password?

i don't use special characters and it would not explain the fact that my 5 other plexconnect installations work except this one.