You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by michael bienstein <mb...@yahoo.fr> on 2010/08/20 12:05:06 UTC

[users@httpd] Re : [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

Here's the error.log snippet for sending my Chrome browser to 
http://localhost:8081/qlikview

The first request gets sent to 127.0.0.1:80 and works. It is a redirect to 
/qlikview/index.htm.
The second request gets sent to 127.0.0.1:81. This says that it acquired a 
connection which can't be true. The existing socket is then forcibly closed by 
remote host OS 10054. Now I have run netstat -ab and nothing is listening on 
port 81. So it is really strange. In any case, my Apache sends back the 502 
because of this. Then there is a request for the favicon which fails because it 
isn't mapped to anything.

So what is that OS 10054 and how to fix it?

Michael
---
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: 
canonicalising URL //mycluster/qlikview
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1003): proxy: Entering 
byrequests for BALANCER (balancer://mycluster)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1046): proxy: byrequests 
selected worker "http://127.0.0.1" : busy 0 : lbstatus 0
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(581): proxy: BALANCER 
(balancer://mycluster) worker (http://127.0.0.1) rewritten to 
http://127.0.0.1/qlikview
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy.c(993): Running scheme balancer 
handler (attempt 0)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1966): proxy: HTTP: serving 
URL http://127.0.0.1/qlikview
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2011): proxy: HTTP: has acquired 
connection for (127.0.0.1)
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2067): proxy: connecting 
http://127.0.0.1/qlikview to 127.0.0.1:80
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2193): proxy: connected 
/qlikview to 127.0.0.1:80
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket 
created to connect to 127.0.0.1
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2576): proxy: HTTP: connection 
complete to 127.0.0.1:80 (127.0.0.1)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1736): proxy: start body 
send
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1840): proxy: end body send
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2029): proxy: HTTP: has released 
connection for (127.0.0.1)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: 
canonicalising URL //mycluster/qlikview/index.htm
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1003): proxy: Entering 
byrequests for BALANCER (balancer://mycluster)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1046): proxy: byrequests 
selected worker "http://127.0.0.1:81" : busy 0 : lbstatus 10
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(581): proxy: BALANCER 
(balancer://mycluster) worker (http://127.0.0.1:81) rewritten to 
http://127.0.0.1:81/qlikview/index.htm
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy.c(993): Running scheme balancer 
handler (attempt 0)
[Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1966): proxy: HTTP: serving 
URL http://127.0.0.1:81/qlikview/index.htm
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2011): proxy: HTTP: has acquired 
connection for (127.0.0.1)
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2067): proxy: connecting 
http://127.0.0.1:81/qlikview/index.htm to 127.0.0.1:81
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2193): proxy: connected 
/qlikview/index.htm to 127.0.0.1:81
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket 
created to connect to 127.0.0.1
[Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2576): proxy: HTTP: connection 
complete to 127.0.0.1:81 (127.0.0.1)
[Fri Aug 20 10:49:33 2010] [error] [client 127.0.0.1] (OS 10054)An existing 
connection was forcibly closed by the remote host.  : proxy: error reading 
status line from remote server 127.0.0.1:81
[Fri Aug 20 10:49:33 2010] [debug] mod_proxy_http.c(1458): [client 127.0.0.1] 
proxy: NOT Closing connection to client although reading from backend server 
127.0.0.1:81 failed.
[Fri Aug 20 10:49:33 2010] [error] [client 127.0.0.1] proxy: Error reading from 
remote server returned by /qlikview/index.htm
[Fri Aug 20 10:49:33 2010] [debug] proxy_util.c(2029): proxy: HTTP: has released 
connection for (127.0.0.1)
[Fri Aug 20 10:49:34 2010] [error] [client 127.0.0.1] File does not exist: 
C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/favicon.ico




________________________________
De : Rainer Jung <ra...@kippdata.de>
À : users@httpd.apache.org
Envoyé le : Jeu 19 août 2010, 17h 58min 40s
Objet : Re: [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

On 19.08.2010 16:44, michael bienstein wrote:
> Hi,
>
> Thanks for the help. I have a IIS listening on port 80 and nothing on
> port 81.
>
> Version is Apache/2.2.16 (Win32)
> Server Built: Jul 30 2010 16:15:37
>
> Here's the changes I've made to the httpd.config from the default install:
> httpd.config
>
> Listen 8081
>
> #Used in other tests (sticky session cookie writing)
> LoadModule headers_module modules/mod_headers.so
> #Used for this test
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule proxy_connect_module modules/mod_proxy_connect.so

You likely don't need to activate mod_proxy_connect. At least you don't 
allow the CONNECT method in the config below.

> LoadModule proxy_http_module modules/mod_proxy_http.so
> #Used in other tests (sticky session tests)
> LoadModule setenvif_module modules/mod_setenvif.so
> #For seeing the scoreboard
> LoadModule status_module modules/mod_status.so
>
> ProxyRequests Off
> <Proxy balancer://mycluster>
> BalancerMember http://127.0.0.1:80 loadfactor=10
> BalancerMember http://127.0.0.1:81 loadfactor=10
> </Proxy>
> ProxyPassMatch (?i)^/qlikview(.*) balancer://mycluster/qlikview$1
> ProxyPassMatch (?i)^/qvajaxzfc/(.*) balancer://mycluster/qvajaxzfc/$1
> ProxyPassMatch (?i)^/qvprint/(.*) balancer://mycluster/qvprint/$1
> ProxyPassReverse /qlikview balancer://mycluster/qlikview
> ProxyPassReverse /qvajaxzfc/ balancer://mycluster/qvajaxzfc/
> ProxyPassReverse /qvprint/ balancer://mycluster/qvprint/
> <Location /balancer-manager>
> SetHandler balancer-manager
> </Location>

Looks OK as a basic configuration.

If the port 81 doesn't listen, then the request should fail earlier than 
the error message you showed. Maybe it does fail over to port 80 and we 
get the error there.

Could you please increase your LogLevel to "debug" and provide the error 
log snippet?

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


      

[users@httpd] Re : [users@httpd] Re : [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

Posted by michael bienstein <mb...@yahoo.fr>.
Thanks Joost, but it confirms that I don't have anything listening on that port. 
Really weird. 

See attachment.



________________________________
De : Joost de Heer <jo...@sanguis.xs4all.nl>
À : users@httpd.apache.org
Envoyé le : Ven 20 août 2010, 14h 41min 30s
Objet : Re: [users@httpd] Re : [users@httpd] Re : [users@httpd] 
proxy_loadbalancer and failover

On 08/20/2010 02:05 PM, michael bienstein wrote:
> Thanks Rainer,
> 
> I checked and clearly there is something listening on port 81 but I can't
> figure out what it is. When I switxh to port 82 it works as I'd expect.

Use tcpview ( 
http://technet.microsoft.com/nl-nl/sysinternals/bb897437%28en-us%29.aspx)to see 
which process has port 81 in use.

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


      

Re: [users@httpd] Re : [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On 08/20/2010 02:05 PM, michael bienstein wrote:
> Thanks Rainer,
>
> I checked and clearly there is something listening on port 81 but I can't
> figure out what it is. When I switxh to port 82 it works as I'd expect.

Use tcpview ( 
http://technet.microsoft.com/nl-nl/sysinternals/bb897437%28en-us%29.aspx)to see 
which process has port 81 in use.

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re : [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

Posted by michael bienstein <mb...@yahoo.fr>.
Thanks Rainer,

I checked and clearly there is something listening on port 81 but I can't figure 
out what it is. When I switxh to port 82 it works as I'd expect.

Next up is sticky session support when I can't control the origin server's 
session cookie ...



________________________________
De : Rainer Jung <ra...@kippdata.de>
À : users@httpd.apache.org
Envoyé le : Ven 20 août 2010, 12h 21min 49s
Objet : [users@httpd] Re : [users@httpd] proxy_loadbalancer and failover


      

[users@httpd] Re : [users@httpd] proxy_loadbalancer and failover

Posted by Rainer Jung <ra...@kippdata.de>.
On 20.08.2010 12:05, michael bienstein wrote:
> Here's the error.log snippet for sending my Chrome browser to
> http://localhost:8081/qlikview
>
> The first request gets sent to 127.0.0.1:80 and works. It is a redirect
> to /qlikview/index.htm.
> The second request gets sent to 127.0.0.1:81. This says that it acquired
> a connection which can't be true. The existing socket is then forcibly
> closed by remote host OS 10054. Now I have run netstat -ab and nothing
> is listening on port 81. So it is really strange. In any case, my Apache
> sends back the 502 because of this. Then there is a request for the
> favicon which fails because it isn't mapped to anything.
>
> So what is that OS 10054 and how to fix it?

It is the winsock error numbr, so 10054 is "Connection reset by peer".

> Michael
> ---
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(46): proxy:
> BALANCER: canonicalising URL //mycluster/qlikview
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1003): proxy:
> Entering byrequests for BALANCER (balancer://mycluster)
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1046): proxy:
> byrequests selected worker "http://127.0.0.1" : busy 0 : lbstatus 0
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(581): proxy:
> BALANCER (balancer://mycluster) worker (http://127.0.0.1) rewritten to
> http://127.0.0.1/qlikview
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy.c(993): Running scheme
> balancer handler (attempt 0)
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1966): proxy: HTTP:
> serving URL http://127.0.0.1/qlikview
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2011): proxy: HTTP: has
> acquired connection for (127.0.0.1)
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2067): proxy: connecting
> http://127.0.0.1/qlikview to 127.0.0.1:80
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2193): proxy: connected
> /qlikview to 127.0.0.1:80
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2444): proxy: HTTP: fam
> 2 socket created to connect to 127.0.0.1
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2576): proxy: HTTP:
> connection complete to 127.0.0.1:80 (127.0.0.1)
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1736): proxy: start
> body send
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1840): proxy: end
> body send
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2029): proxy: HTTP: has
> released connection for (127.0.0.1)


> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(46): proxy:
> BALANCER: canonicalising URL //mycluster/qlikview/index.htm
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1003): proxy:
> Entering byrequests for BALANCER (balancer://mycluster)
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(1046): proxy:
> byrequests selected worker "http://127.0.0.1:81" : busy 0 : lbstatus 10
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_balancer.c(581): proxy:
> BALANCER (balancer://mycluster) worker (http://127.0.0.1:81) rewritten
> to http://127.0.0.1:81/qlikview/index.htm
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy.c(993): Running scheme
> balancer handler (attempt 0)
> [Fri Aug 20 10:49:32 2010] [debug] mod_proxy_http.c(1966): proxy: HTTP:
> serving URL http://127.0.0.1:81/qlikview/index.htm
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2011): proxy: HTTP: has
> acquired connection for (127.0.0.1)

It only means we got a connection object from the pool. It is not 
necessarily actually connected yet.

> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2067): proxy: connecting
> http://127.0.0.1:81/qlikview/index.htm to 127.0.0.1:81
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2193): proxy: connected
> /qlikview/index.htm to 127.0.0.1:81
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2444): proxy: HTTP: fam
> 2 socket created to connect to 127.0.0.1
> [Fri Aug 20 10:49:32 2010] [debug] proxy_util.c(2576): proxy: HTTP:
> connection complete to 127.0.0.1:81 (127.0.0.1)

But this tells us, that there *is* something at port 81 we could connect to.

> [Fri Aug 20 10:49:33 2010] [error] [client 127.0.0.1] (OS 10054)An
> existing connection was forcibly closed by the remote host. : proxy:
> error reading status line from remote server 127.0.0.1:81

And our peer closes the new connection. That's the problem, why the 
worker isn't put into error state.

Can you try using "telnet 127.0.0.1 81" to connect to port 81? If this 
also works, then we no longer have any indication of an Apache problem. 
Instead you need to find out, what accepts connctions on this port on 
your machine. To check the opposite, if you find some port nothing 
responds to, you can verify the correct setting of the error state using 
that port.

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org