[SOLVED] Proxy problems?

Found a bug? Make a post in this forum.

[SOLVED] Proxy problems?

Postby pvdleek » Tue Dec 29, 2009 5:46 pm

I have a few visitors of my website that are complaining that they get an instant white page instead of my website. The similarity between those visitors seems to be that they are behind a proxy.
My website is behind an XR load balancer (made redundant with heartbeat) that balances over 6 webservers.

-bash-3.2# xr -V
XR version : 2.54
Written by : Karel Kubat <karel@kubat.nl>
Maintained by : Karel Kubat <karel@kubat.nl>
Primary site : http://crossroads.e-tunity.com
Compiled with : /usr/bin/g++
Optimization : -O3
System : Linux
Libraries : -L/usr/lib -lnsl -lpthread -lm
Type sizes : ssize_t=4, int=4, long=4, double=8, ptr=4
getopt.h : present
INADDR_NONE : present
getopt_long() : present
inet_aton() : present
strnstr() : absent

-bash-3.2# ps ax | grep xr
6752 ? Sl 0:06 xr -x -C -c 60 -t 30 -d S:600 --server http:0:80 --backend *.*.*.*:80 --backend *.*.*.*:80 --backend *.*.*.*:80 --backend *.*.*.*:80 --backend *.*.*.*:80 --backend *.*.*.*:80
6753 ? S 0:00 logger -t xr-web
(I masked the IP's)

In my website I have seen that some of these users have multiple IP addresses, they come comma seperated in the headers, for example 1.2.3.4,5.6.7.8,9.10.11.12

I've searched the forum but found no meaningful messages on proxy behaviour, so I'm wondering if it's even something in XR or maybe in my website...
Kind regards,
Peter van der Leek
pvdleek
 
Posts: 8
Joined: Tue Nov 03, 2009 11:43 pm
Location: Houten, The Netherlands

Re: Proxy problems?

Postby pvdleek » Tue Dec 29, 2009 7:27 pm

Ouch, stupid me. I found a huge bug in my website. It's working again now.

Can an admin please move this discussion to "Crossroads Help" because I would still like an answer to my question about the multiple IP's. Why do some users have multiple IP's seperated by a comma?
Kind regards,
Peter van der Leek
pvdleek
 
Posts: 8
Joined: Tue Nov 03, 2009 11:43 pm
Location: Houten, The Netherlands

Re: Proxy problems?

Postby Karel » Sun Jan 03, 2010 2:49 pm

pvdleek wrote:Why do some users have multiple IP's seperated by a comma?


That would be a side effect of the proxy. The downstream HTTP server will typically only see the IP of its direct client (the proxy), so the proxy adds the IP of its own client to the list, in order to enable the downstream server to see it. Most typically this is e.g. (without XR in between):

Browser, e.g. at 1.2.3.4 --> proxy, e.g. at 192.168.1.1 --> Apache, e.g. at 192.168.1.100

The client IP list at the Apache server would then typically state both 1.2.3.4 and 192.168.1.1.

Hope this helps, Karel
Karel
Site Admin
 
Posts: 308
Joined: Mon Sep 22, 2008 11:13 am
Location: Netherlands

Postby pvdleek » Sun Jan 03, 2010 3:10 pm

This certainly helps, thanks.
In your example the browser IP is the first in the list. Is that always the case or do proxies behave differently?
Kind regards,
Peter van der Leek
pvdleek
 
Posts: 8
Joined: Tue Nov 03, 2009 11:43 pm
Location: Houten, The Netherlands

Postby Karel » Sun Jan 03, 2010 4:59 pm

pvdleek wrote: In your example the browser IP is the first in the list. Is that always the case or do proxies behave differently?


TBH, I don't know offhand, you would need to check it... I think that the Apache proxy module handles it the way I described, but I'm not even sure there ;-)
Karel
Site Admin
 
Posts: 308
Joined: Mon Sep 22, 2008 11:13 am
Location: Netherlands

Postby pvdleek » Mon Jan 04, 2010 8:12 pm

Ok, thanks for your replies.
Kind regards,
Peter van der Leek
pvdleek
 
Posts: 8
Joined: Tue Nov 03, 2009 11:43 pm
Location: Houten, The Netherlands


Return to Crossroads Bugs

Who is online

Users browsing this forum: No registered users and 0 guests

cron