Giter Club home page Giter Club logo

Comments (20)

jorenn92 avatar jorenn92 commented on May 23, 2024 1

Hey, good to hear this issue occurs due to the secure connection settings. Plex uses some magic to enable secure communication between clients and your local server. It'll create a unique secure URL for your server, containing your local IP and a unique hash.

This unique URL could be used as the hostname inside Maintainerr to enable secure communication. I'm planning to implement the same fetching mechanism as Overseerr (there, you can load your secure urls in Plex settings), but until then, you'll have to fetch it manually.

To fetch it manually, you'll have 2 options. Option 1 being the easiest

Option 1:
Open Overseerr, navigate to Plex settings and load your servers. Click on your secure '*.plex.direct' url and copy the value over to Maintainerr. You're probably already using this address, since Overseerr worked when Plex required secure connections.

Option 2:
Open Plex web on your pc/mac and navigate to any media page on your server, right click anywhere on the page, then click 'inspect'.

In the inspector, navigate to network. Then open something on Plex web (i.e. media details), you'll see the network calls Plex makes. Then find a 'GET' call that went to this kind of address: https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct:32400 (this is a dummy, your URL will look different, but it'll contain your local IP, a unique hash, and your Plex port).

This is the address you want. Copy the 'https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct' part in Maintainerr's hostname field and the '32400' in the 'port' field.

When you're using this address, you can change the 'secure connections' flag back to 'required'

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

Hi,

Are you trying to connect to an internal or external Plex service?

Could you try pinging your hostname or ip from within the Maintainerr container? To rule out network related issues.
Are you sure your Plex port is correct?

from maintainerr.

eqjunkie829 avatar eqjunkie829 commented on May 23, 2024

Also having this issue with my install on Unraid. I'm able to ping the plex ip including port 32400 successfully. This is running on proxynet custom network where all other *arr containers are running. Plex is running on Host network. Also able to successfully Authenticate with Plex however in the container logs it says "WARN [PlexApiService] Plex api communication failure.. Is the application running?"

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

I'm unfortunately not familiar with the Unraid community app. I didn't supply it, and to be honest, I actually don't know who did.

Do you know when it was last updated? Is it in sync with the GitHub releases, or is it based on an older version?

If you're able to also run regular containers on your system, you could try to run the image documented in this repo and verify if that version also has this issue.

from maintainerr.

DastardlyDino avatar DastardlyDino commented on May 23, 2024

So if I understand how Unraid works it pulls the container from docker-hub and gives you and easy interface for inputting your path, ports, variables, etc. So I am using the latest version that was updated 2 days ago on October 19th. The person who put it in Unraid does not have to maintain the container.
https://imgur.com/a/VOuyMmM

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

Thanks for the info! That does sound like it uses the latest image.

When testing this on my setup, I noticed that my browser capitalizes the first letter of the URL. And the server doesn’t normalize it.

Is it possible that’s what’s going on here? Is the first letter capitalized?

from maintainerr.

DastardlyDino avatar DastardlyDino commented on May 23, 2024

I'm a little confused by "capitalizes the first letter of the URL". I am using my internal IP address to try and connect to my Plex server. Is that not the correct way of doing it?

Side note my server name is two words like "Server Name". Not sure if that makes a difference.

https://imgur.com/a/SDT1sNL

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

If you're just using the IP, you can ignore my previous comment. I figured that you might be using 'http(s)://' in front of your URL, and when that's capitalized, something might go wrong.

The Plex name variable is actually not used (yet). This was added to keep the possibility open for a multiple Plex server feature in the future. Multiple words shouldn't be a problem here.

It puzzles me why you're having this issue. Your configuration seems fine from Maintainerr's standpoint. All I can think of is that Maintainerr isn't in the same subnet, or can't reach the Plex instance for some other reason.

Could you try to execute this command on your docker host machine where the Maintainerr container is running? Replace <container_name> with the name you gave your Maintainerr instance.

 docker exec -ti <container_name> wget 192.168.10.6:32400

This should return "wget: server returned error: HTTP/1.1 401 Unauthorized". That means something is running on the other side and we can reach it.

If it says "wget: can't connect to remote host (): Connection refused", that means the Maintainerr container can't reach Plex.

from maintainerr.

DastardlyDino avatar DastardlyDino commented on May 23, 2024

Sorry for the delay. Looks like Maintainerr can't connect to Plex and I have no idea why. They're on the same docker network.
https://imgur.com/a/BZic23n

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

No problem!
Did you try the commands from my previous comment?

You could also try to configure the Plex container name in the ‘hostname’ field instead of the Ip address.

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

In discussion #561, it came to my attention that Plex communication fails if you configured Plex to require secure connections. Is it possible that this is the issue?

If so, you could change the 'secure connections' flag to 'Preferred' instead of 'Required'. If you really want Maintainerr to communicate over the Plex redirect URL, you could fetch this URL from the Plex web network calls and configure it in Maintainerr (https:// included).

from maintainerr.

DastardlyDino avatar DastardlyDino commented on May 23, 2024

No problem! Did you try the commands from my previous comment?

You could also try to configure the Plex container name in the ‘hostname’ field instead of the Ip address.

Yes I did run the commands in your previous post. See the first image in the linked image.


In discussion #561, it came to my attention that Plex communication fails if you configured Plex to require secure connections. Is it possible that this is the issue?

If so, you could change the 'secure connections' flag to 'Preferred' instead of 'Required'. If you really want Maintainerr to communicate over the Plex redirect URL, you could fetch this URL from the Plex web network calls and configure it in Maintainerr (https:// included).

So it looks like you were right. If I change the Network settings inside of Plex to "Prefer" secure connections instead of "Require" that fixes the issue. But I am a bit confused by your instructions if I would like to keep the secure connection setting in Plex to "Required". What are the Plex web network calls? How do I find them?

from maintainerr.

davenasty avatar davenasty commented on May 23, 2024

I just started looking into Maintainerr yesterday. It looks like it connected to Plex correctly when I am configuring and authenticating. I can see my movies in Maintainerr but when I run a rule I am seeing the same thing as the above post.

"WARN [PlexApiService] Plex api communication failure.. Is the application running?

I have set the secure connections to preferred within Plex and I also tried using the secure address as the hostname with the remote port. In both instances the application authenitcated to plex correctly but errors when I run a rule.

My rule is currently looking for a specific playlist. I can see the GET requests in the Plex console requesting playlists and returning a 200 response.

Please let me know if you have any ideas or if there are any more details I can provide.

Thank you!

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

I just started looking into Maintainerr yesterday. It looks like it connected to Plex correctly when I am configuring and authenticating. I can see my movies in Maintainerr but when I run a rule I am seeing the same thing as the above post.

"WARN [PlexApiService] Plex api communication failure.. Is the application running?

I have set the secure connections to preferred within Plex and I also tried using the secure address as the hostname with the remote port. In both instances the application authenitcated to plex correctly but errors when I run a rule.

My rule is currently looking for a specific playlist. I can see the GET requests in the Plex console requesting playlists and returning a 200 response.

Please let me know if you have any ideas or if there are any more details I can provide.

Thank you!

Hey! This seems more like a functional error. Coincidentally, I've been adding debug logs today. If you're willing to try the 'develop' docker tag, you could add 'DEBUG=true' as an environment variable to your docker compose. This should enable more logs, and hopefully, show the exact error message.

from maintainerr.

davenasty avatar davenasty commented on May 23, 2024

Thank you for this fast response. Here is what I am showing in the debug logs.

Error: Cannot read properties of undefined (reading 'filter')

image

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

Thank you for this fast response. Here is what I am showing in the debug logs.

Error: Cannot read properties of undefined (reading 'filter')

image

Aha, that’s an actual code error. I’ll fix it later this weekend. Thank you for reporting it!

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

Thank you for this fast response. Here is what I am showing in the debug logs.

Error: Cannot read properties of undefined (reading 'filter')

image

I pushed a fix in #716. It'll be available in the next release.

I'll close this issue since the original question hasn't received a reply for a while. If you still encounter issues after the next release, feel free to create a new issue. Thanks for your report!

from maintainerr.

smurfster avatar smurfster commented on May 23, 2024

Hey, good to hear this issue occurs due to the secure connection settings. Plex uses some magic to enable secure communication between clients and your local server. It'll create a unique secure URL for your server, containing your local IP and a unique hash.

This unique URL could be used as the hostname inside Maintainerr to enable secure communication. I'm planning to implement the same fetching mechanism as Overseerr (there, you can load your secure urls in Plex settings), but until then, you'll have to fetch it manually.

To fetch it manually, you'll have 2 options. Option 1 being the easiest

Option 1: Open Overseerr, navigate to Plex settings and load your servers. Click on your secure '*.plex.direct' url and copy the value over to Maintainerr. You're probably already using this address, since Overseerr worked when Plex required secure connections.

Option 2: Open Plex web on your pc/mac and navigate to any media page on your server, right click anywhere on the page, then click 'inspect'.

In the inspector, navigate to network. Then open something on Plex web (i.e. media details), you'll see the network calls Plex makes. Then find a 'GET' call that went to this kind of address: https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct:32400 (this is a dummy, your URL will look different, but it'll contain your local IP, a unique hash, and your Plex port).

This is the address you want. Copy the 'https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct' part in Maintainerr's hostname field and the '32400' in the 'port' field.

When you're using this address, you can change the 'secure connections' flag back to 'required'

sadly this doesnt work for me, If I try the blahblah.plex.direct:32400 address in a browser it works fine, If I set plex to prefer secure it works.

logs just state " WARN [PlexApiService] Plex api communication failure.. Is the application running?"

Im using the latest which I assume is 1.7.1

from maintainerr.

jorenn92 avatar jorenn92 commented on May 23, 2024

Hey, good to hear this issue occurs due to the secure connection settings. Plex uses some magic to enable secure communication between clients and your local server. It'll create a unique secure URL for your server, containing your local IP and a unique hash.
This unique URL could be used as the hostname inside Maintainerr to enable secure communication. I'm planning to implement the same fetching mechanism as Overseerr (there, you can load your secure urls in Plex settings), but until then, you'll have to fetch it manually.
To fetch it manually, you'll have 2 options. Option 1 being the easiest
Option 1: Open Overseerr, navigate to Plex settings and load your servers. Click on your secure '*.plex.direct' url and copy the value over to Maintainerr. You're probably already using this address, since Overseerr worked when Plex required secure connections.
Option 2: Open Plex web on your pc/mac and navigate to any media page on your server, right click anywhere on the page, then click 'inspect'.
In the inspector, navigate to network. Then open something on Plex web (i.e. media details), you'll see the network calls Plex makes. Then find a 'GET' call that went to this kind of address: https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct:32400 (this is a dummy, your URL will look different, but it'll contain your local IP, a unique hash, and your Plex port).
This is the address you want. Copy the 'https://192-168-0-1.qsdgsdsgfdhdfh1dfhdfrh8hfdhqslmd.plex.direct' part in Maintainerr's hostname field and the '32400' in the 'port' field.
When you're using this address, you can change the 'secure connections' flag back to 'required'

sadly this doesnt work for me, If I try the blahblah.plex.direct:32400 address in a browser it works fine, If I set plex to prefer secure it works.

logs just state " WARN [PlexApiService] Plex api communication failure.. Is the application running?"

Im using the latest which I assume is 1.7.1

Could you provide a screenshot of the input you attempted?

Alternatively, on the develop (or main on ghcr.io) image, there's a select box available that allows you to search for servers. You should be able to select your preferred secure server from there. This feature will also be included in the upcoming release, expected somewhere this week.

from maintainerr.

t34wrj avatar t34wrj commented on May 23, 2024

I also have the same error, running 2.0.0. Plex authenticates but whichever of the three servers I select results in these errors:

[maintainerr] | 04/02/2024 18:17:18 [WARN] [PlexApiService] Plex api communication failure.. Is the application running?
[maintainerr] | 04/02/2024 18:17:18 [DEBUG] [PlexApiService] Cannot read properties of undefined (reading 'machineIdentifier')
[maintainerr] | 04/02/2024 18:17:20 [WARN] [PlexApiService] Plex api communication failure.. Is the application running?
[maintainerr] | 04/02/2024 18:17:20 [DEBUG] [PlexApiService] Cannot read properties of undefined (reading 'MediaContainer')
[maintainerr] | 04/02/2024 18:17:20 [DEBUG] [SettingsService] Cannot read properties of undefined (reading 'version')
[maintainerr] | 04/02/2024 18:19:47 [INFO] [SettingsService] Settings updated
[maintainerr] | 04/02/2024 18:19:47 [WARN] [PlexApiService] Plex api communication failure.. Is the application running?
[maintainerr] | 04/02/2024 18:19:47 [DEBUG] [PlexApiService] Cannot read properties of undefined (reading 'MediaContainer')
[maintainerr] | 04/02/2024 18:19:47 [WARN] [PlexApiService] Plex api communication failure.. Is the application running?
[maintainerr] | 04/02/2024 18:19:47 [DEBUG] [PlexApiService] Cannot read properties of undefined (reading 'machineIdentifier')
[maintainerr] | 04/02/2024 18:19:48 [WARN] [PlexApiService] Plex api communication failure.. Is the application running?
[maintainerr] | 04/02/2024 18:19:48 [DEBUG] [PlexApiService] Cannot read properties of undefined (reading 'MediaContainer')
[maintainerr] | 04/02/2024 18:19:48 [DEBUG] [SettingsService] Cannot read properties of undefined (reading 'version')

This even happens for the server address that works in Overseerr.

from maintainerr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.