truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.13k stars 617 forks source link

Plex probes fail when secure connections are required #8182

Closed fenichelar closed 1 year ago

fenichelar commented 1 year ago

App Name

Plex

SCALE Version

22.12.1

App Version

1.31.1.673_13.0.10

Application Events

Liveness probe failed: Get "http://172.16.1.116:32400/": EOF

Application Logs

DEBUG - Request: plaintext connection from 172.16.0.1:35582 rejected because secure connections are required

Application Configuration

N/A

Describe the bug

The probes are using HTTP. When Plex is configured to require secure connections, it only accepts HTTPS requests.

To Reproduce

  1. Deploy Plex with the default settings
  2. Configure Plex to require secure connections (see screenshot below)
image

Expected Behavior

It should be possible to require secure connections given Plex is generally accessible over the internet.

I can think of a few solutions:

  1. Make the Plex require secure connections configuration controlled in SCALE (boolean in questions.yml). Set the protocol (https://github.com/truecharts/charts/blob/master/charts/stable/plex/values.yaml#L9) to http if not checked and https if checked.
  2. Plex always supports HTTPS. Probes don't validate certificates. So the probes could simply be changed to always use HTTPS for Plex.
  3. Disable the probes for Plex.

Screenshots

N/A

Additional Context

N/A

I've read and agree with the following

fenichelar commented 1 year ago

I would be happy to submit a PR with a fix once the best solution is identified.

FYI, the 1st proposed solution has an unrelated advantage. The construction of the access URL(s) uses the defined protocol: https://github.com/truecharts/charts/blob/master/charts/stable/plex/templates/common.yaml#L7. The access URL should use HTTPS if secure connections are required, not HTTP.

PrivatePuffin commented 1 year ago

I'm not going to work on the access url code, as this has to be done totally different implementing new common features. We never officially supported switching plex to require https and have been very open about that on all previous issues about this.

PrivatePuffin commented 1 year ago

Not a bug, we never support http->https related changes outside of ingress though.

fenichelar commented 1 year ago

@Ornias1993 Understood. Thank you!!

fenichelar commented 1 year ago

@stavros-k

Secure connections are controlled via secureConnections in Library/Application Support/Plex Media Server/Preferences.xml. But the config is opposite of what you would assume:

"1" means Preferred (default) "0" means Required

Reference: https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/

truecharts-admin commented 1 year ago

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists