-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Cannot connect to Plex #536
Comments
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. |
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?" |
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. |
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. |
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? |
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. |
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.
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. |
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. |
No problem! You could also try to configure the Plex container name in the ‘hostname’ field instead of the Ip address. |
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). |
Yes I did run the commands in your previous post. See the first image in the linked image.
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? |
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: Option 2: 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' |
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. |
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! |
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. |
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? This even happens for the server address that works in Overseerr. |
Describe the bug
I have my server name, host IP & port correctly filled in. I have authenticated my server with an admin account. I then click "Save Changes". But when I click "Test Saved" I get an error saying "Connection failed! Please check and save your settings". I am able to connect to all my other services (Overseerr, Radarr & Sonarr) just not Plex.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Maintainerr is able to connect to my Plex server
Device:
The text was updated successfully, but these errors were encountered: