RickDB / PlexAniSync

Sync Plex anime library to AniList
GNU General Public License v3.0
279 stars 44 forks source link

Unable to authenticate to plex #8

Closed hwwilliams closed 4 years ago

hwwilliams commented 4 years ago

So I'm using the docker container to run this and looking through the logs PlexAniSync successfully connects to AniList and sees my existing series in my lists but won't connect to Plex.

I have the plex_url/base_url set to https://192.168.1.210:32400 but I've also tried http, I normally use the https variant to connect other services to Plex's API like Tautulli.

Error when using https://192.168.1.210:32400:

2019-09-27 03:57:39 [ANILIST] Found 10 anime series on list
2019-09-27 03:57:39 Unable to authenticate to Plex Media Server, traceback: HTTPSConnectionPool(host='192.168.1.210', port=32400): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError("hostname '192.168.1.210' doesn't match '*.1f20241f564747b0ab51b25f722d76fc.plex.direct'")))
2019-09-27 03:57:39 Plex authentication failed, check access to your Plex Media Server and settings

Error when using http://192.168.1.210:32400:

2019-09-27 09:26:47 [ANILIST] Found 10 anime series on list
2019-09-27 09:26:47 Unable to authenticate to Plex Media Server, traceback: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2019-09-27 09:26:47 Plex authentication failed, check access to your Plex Media Server and settings

Any help would be appreciated.

RickDB commented 4 years ago

Looks like SSL problem, do you have enforce secure connection enabled here perhaps:

image

It should be http in PlexAniSync as PMS doesn't supply a valid certificate by default and will error out on the Python side. Otherwise can be firewall issue, the default authentication method MyPlex might then be a better option.

hwwilliams commented 4 years ago

I do have that set as required, I guess I assumed since Tautulli is able to connect fine using it that other apps would as well.

Is my only option setting it as preferred?

RickDB commented 4 years ago

Using MyPlex aythentication would be the preferred method as that way you can just input Plex user details:

https://github.com/RickDB/PlexAniSync#myplex-authentication-prefered

If that isn't an option and Secure Connections is set to required believe you can only direct connect via SSL / TLS (https://*) but since no valid certificate is supplied by default any modern application will return an error or warning.