Pms web page on 32400 keeps trying to connect to localhost

Server Version#: 1.18.0.1944
Player Version#: none

The plex media server is deployed on a nas server, behind a nginx reverse proxy.

The reverse proxy rule is plex.local:80 -> localhost:32400

After that, i am visiting pms page from http://plex.local/web inside local network.
Basically all functions are ok, but i notice there are many errors in the brower debug console, cause this page keeps trying to connect to these urls:

http://127.0.0.1:32400/media/providers?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=uv7cictze6cpb4m41bgeihe1&X-Plex-Platform=Chrome&X-Plex-Platform-Version=77.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=OSX&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1420x746%2C1440x900&X-Plex-Language=en
http://127.0.0.1:32400/?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=uv7cictze6cpb4m41bgeihe1&X-Plex-Platform=Chrome&X-Plex-Platform-Version=77.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=OSX&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1420x746%2C1440x900&X-Plex-Language=en

Since the domain is plex.local, it seems plex frontend webpage doesn’t figure out this and still procedding to localhost:32400. This may be a bug?

1 Like

Plex has always been on port 32400 (internal port). It’s not a bug.

Fix your proxy.

It’s not about the port, but about the hostname plex use to connecting to backend.

I guess ‘localhost:32400’ was hardcoded into the frontend javascript code. Instead it should choose hostname based on hostname in current address bar of browser. In my case, when i am accessing pms via http://plex.local, frontend javascript should replace its hardcoded ‘localhost:32400’ with ‘plex.local’.

I searched around pms settings and found an option to use, which is ‘Custom server access URLs’. But this didn’t change the problem.

Btw, i don’t think there are anything wrong with my proxy configuration, because the whole site is functional except for those browser console errors i pointed above.

are you using a mdns?
I ask because .local does conflict with certain things, especially mdns.
I originally had .local and had issues.
Once I switched the domain to the proper .lan, everything was fine.

1 Like

No, i am not using mdns.

I tryied to bypass reverse proxy and connectted to pms with http://plex.apporc.local:32400 directly(I maintain this domain name ‘plex.apporc.local’ on my router). This time the problem was still there, so this should have nothing to do with the reverse proxy.

I captured the whole console log:
chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Connections] Testing all 1 connection(s) for [Loopback] chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Servers] Waiting for initial servers = [Loopback] chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Commands] Executing testServerConnection chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Connections] Retrying connection tests for [Loopback] in 30 seconds chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Connections] Testing connection for [Loopback] at http://127.0.0.1:32400/media/providers chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Connections] Testing legacy connection for [Loopback] at http://127.0.0.1:32400 chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 GET http://127.0.0.1:32400/media/providers?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=vijgu5kq99kufwqzu6y91mpz&X-Plex-Platform=Chrome&X-Plex-Platform-Version=77.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=OSX&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1420x438%2C1440x900&X-Plex-Language=en net::ERR_CONNECTION_REFUSED 2VM47 backend.js:6 [Connections] [Loopback] is unavailable at http://127.0.0.1:32400/media/providers (Status 0) VM47 backend.js:6 [Connections] All connections to [Loopback] failed chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Servers] Found all servers = plex.apporc.local, plex.tv chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 GET http://127.0.0.1:32400/?X-Plex-Product=Plex%20Web&X-Plex-Version=4.8.4&X-Plex-Client-Identifier=vijgu5kq99kufwqzu6y91mpz&X-Plex-Platform=Chrome&X-Plex-Platform-Version=77.0&X-Plex-Sync-Version=2&X-Plex-Features=external-media&X-Plex-Model=bundled&X-Plex-Device=OSX&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1420x438%2C1440x900&X-Plex-Language=en net::ERR_CONNECTION_REFUSED chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Companion] Opening long poll to plex.apporc.local at http://192.168.1.10:32400/player/proxy/poll chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Companion] Poll connection successfully opened with plex.apporc.local chunk-2-b2c07a7794e6186e0e42-plex-4.8.4-d12b992.js:140 [Companion] Opening long poll to plex.apporc.local at http://192.168.1.10:32400/player/proxy/poll

It seems like this is the frontend code’s feature, which is just annoying.

I can’t help with that. I’m the OS/platform guy.

Regarding what may be driving them, given the need to support Apple products,

This is what drove me.
I know they are moving some things around in the Web client but cannot speak to the details (don’t understand them)

Good to know the ‘.local’ thing, thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.