X-Forwarded-For Header not shown

Server Version#: Version 1.18.7.2415
Player Version#: NA

I have a reverse proxy set up on my machine (localhost) that my clients connect through so that I can utilize a CDN to get better speeds. This works great except for one small thing I noticed, sometimes Plex thinks that the traffic is local. I can see that there is the X-Forwarded-For header in the requests and plex is logging this however its not using that IP and instead is saying Local (127.0.0.1) or Local (::1). This doesn’t happen all the time, so its almost as if maybe the original request didn’t have the header for some reason but Plex didn’t pick it up. The really strange thing I’ve noticed is that it seems to be consistent for some users and not others.

Plex Media Server Logs_2020-02-17_09-53-12.zip (1.3 MB)

Unfortunately, because you turned off DEBUG logging (there is nothing saved by doing so), you’ve taken away the ability to help. Would you mind enabling again and capturing a full fresh set?

DEBUG is default for this reason. Logs consume 52 MB of disk space whether DEBUG on or OFF.

If greater retention is needed, the NumLogFiles="x" can be added.

Here ya go! Sorry I forgot I had turned that off to reduce the logs in my Splunk instance since I’m running free and it was causing me to use a lot of my license it appeared, but I could be wrong (wouldn’t turning that off reduce the number of logs and log file size?)

Plex Media Server Logs_2020-02-26_09-50-56.zip (4.5 MB)

Thanks!

  1. Turning everything off does not change the consumption. They are a fixed size. 6 log files of 10 MB each. Turning DEBUG on only adds to the level of detain contained in them

  2. In the logs, I see a 208.x.x.x addresss being shown as the forwarded-for remote. Is this not correct?

  3. You do need take look at CPU/IO loading as there are some spikes.

Feb 26, 2020 08:15:22.925 [0x7fc92effd700] DEBUG - Auth: authenticated user 15874443 as jja0538@gmail.com
Feb 26, 2020 08:15:22.926 [0x7fc830ff9700] DEBUG - It took 80.000000 ms to retrieve 62 items.
Feb 26, 2020 08:15:22.926 [0x7fc91effd700] DEBUG - Request: [127.0.0.1:48568 (WAN)] GET /hubs/metadata/37646/related?includeExternalMetadata=1 (51 live) GZIP Signed-in Token (jja0538@gmail.com)
Feb 26, 2020 08:15:22.929 [0x7fc85e7fc700] DEBUG - It took 140.000000 ms to retrieve 95 items.
Feb 26, 2020 08:15:22.930 [0x7fc85cff9700] WARN - SLOW QUERY: It took 780.000000 ms to retrieve 7 items.
Feb 26, 2020 08:15:22.931 [0x7fc91cff9700] DEBUG - It took 80.000000 ms to retrieve 59 items.
Feb 26, 2020 08:15:22.932 [0x7fc8e0ff9700] DEBUG - It took 130.000000 ms to retrieve 78 items.
Feb 26, 2020 08:15:22.933 [0x7fc8faffd700] DEBUG - It took 80.000000 ms to retrieve 88 items.
Feb 26, 2020 08:15:22.937 [0x7fc8a0ff9700] DEBUG - It took 150.000000 ms to retrieve 101 items.
Feb 26, 2020 08:15:22.938 [0x7fc86ffff700] DEBUG - It took 110.000000 ms to retrieve 45 items.
Feb 26, 2020 08:15:22.939 [0x7fc85dffb700] DEBUG - It took 70.000000 ms to retrieve 49 items.
Feb 26, 2020 08:15:22.942 [0x7fc91cff9700] DEBUG - It took 30.000000 ms to retrieve 176 items.
Feb 26, 2020 08:15:22.944 [0x7fc86d7fa700] DEBUG - It took 90.000000 ms to retrieve 71 items.
Feb 26, 2020 08:15:22.946 [0x7fc8faffd700] DEBUG - It took 40.000000 ms to retrieve 103 items.
Feb 26, 2020 08:15:22.951 [0x7fc8c5ffb700] DEBUG - It took 90.000000 ms to retrieve 75 items.
Feb 26, 2020 08:15:22.955 [0x7fc8a3fff700] DEBUG - It took 120.000000 ms to retrieve 151 items.
Feb 26, 2020 08:15:22.956 [0x7fc8317fa700] DEBUG - It took 160.000000 ms to retrieve 60 items.
Feb 26, 2020 08:15:22.956 [0x7fc830ff9700] DEBUG - It took 110.000000 ms to retrieve 76 items.
Feb 26, 2020 08:15:22.958 [0x7fc85cff9700] DEBUG - It took 110.000000 ms to retrieve 120 items.
Feb 26, 2020 08:15:22.959 [0x7fc8e3fff700] WARN - SLOW QUERY: It took 930.000000 ms to retrieve 7 items.
Feb 26, 2020 08:15:22.963 [0x7fc8a0ff9700] DEBUG - It took 90.000000 ms to retrieve 94 items.
Feb 26, 2020 08:15:22.964 [0x7fc86e7fc700] DEBUG - It took 150.000000 ms to retrieve 108 items.
Feb 26, 2020 08:15:22.966 [0x7fc91f7fe700] WARN - SLOW QUERY: It took 390.000000 ms to retrieve 7 items.
Feb 26, 2020 08:15:22.967 [0x7fc8e0ff9700] DEBUG - It took 60.000000 ms to retrieve 91 items.
Feb 26, 2020 08:15:22.970 [0x7fc8c5ffb700] DEBUG - It took 50.000000 ms to retrieve 107 items.
  1. In the logs, I see a 208.x.x.x addresss being shown as the forwarded-for remote. Is this not correct?

That’s correct, but its not respected int he UIs. I also run Tautulli, and it shows the same thing so that leads me to believe its in the reporting and not the client in the receiving end:

This person is in FL:
image
But it shows it as local, even when it has the X-Forwarded-For header, from what I can tell

  1. Let me look at that… This is running in a Samsung SSD so I wouldn’t expect latency issues…

So this isn’t a functional problem and is only a display problem?

Yes, it doesn’t appear to cause any functional issues.

Thank you.

“Not Respected” means that it is being functionally ignored.

This is a lot different than “Not Shown”.

My apologies in the verbiage there.

No problem. I’m glad it’s sorted out.

A good example of “Not Respected” is when you WhiteList an IP address to be free of authentication requirement but that IP is still challenged at each connect.

I will submit this to the Web team.

I think my thinking on there, and tagging this as a server issue, was that both a third party client and the plex web client see the same thing that is incorrect so I thought it might be in the reporting, however plex reports that, but I don’t know how you guys are structured :slight_smile:

Engineering will start with Plex/Web. While Tautulli is popular, and a staple in the community, they will first determine whether it’s a Web issue or a Server issue.

Given I see it in the logs, the forwarding address is being received.

Now to determine if that info is being sent out or not displayed :smiley:

Random thought: could it be related to IPv6?
As far as I can see with my limited knowledge it is only showing ‘localhost’ in IPv6 notation.

I have submitted logs and thread reference to Engineering (with screenshots) for their review.

OttoKerner does raise a good point. It might be the IPv6

It will also show it was a 127.0.0.1

FWIW, I tried to change my proxy pass to my local ip, 127.0.0.1 and 192.168.1.1, and the ui still shows it as “local” then the ip I set in the proxypass. If I set it to localhost, it’ll pass the ipv6 localhost in

Thanks for checking on that.

I have submitted it to Engineering and linked this thread for their inspection.

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