Mailing List Archive

[mod_backhand-users] Problems with communications between two mod_backhands ...
This is a multi-part message in MIME format.
--------------6F2E42768C974A5D28A10BF4
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,

I have some problems with setting up mod_backhand:

I have two servers running linux (Debian potato), apache 1.3.9 and
mod_backhand 1.0.9. The apache is the precompiled debian-package and
mod_backhand installation is done via apxs.

The servers should proxy connections to other servers hidden behind them
(on other ports than port 80). But that isn't set up yet.

on dns both server have their own names (tterragate01 and tterragate02),
another entry for tterragate points to both addresses.

The status interface works (when requesting /backhand/ both servers are
shown). The backhand config for the cgi-bin is:

<Directory /home/web/tterragate01/cgi-bin>
Options ExecCGI FollowSymLinks

Backhand byLoad
# Backhand byAge
Backhand byRandom
# Backhand byLogWindow
</Directory>

Backhand configuration is done like this:

<IfModule mod_backhand.c>
UnixSocketDir /var/spool/backhand
MulticastStats 212.227.111.127:4445
# MulticastStats 225.220.221.20:4445,1
AcceptStats 212.227.111.0/25
BackhandLogLevel +dcsnall
BackhandLogLevel +netall
BackhandLogLevel +mbcsall
BackhandSelfRedirect On
</IfModule>

But when I use /cgi-bin/backhand-test I get the attached error log. If I
get it right, the Server isn't able to connect to the other one. The
output of the backhand-test script is attached, too.

Since I'm very new to mod_backhand I'm doing something terrible wrong.
Please help since I need to find a solution till monday morning.

bye,
Roland

--
Cyland AG the Roland T. Lichti
Hebelstra=DFe 15 presence Systemadministration
76133 Karlsruhe company Tel: 0721 / 1608 337



--------------6F2E42768C974A5D28A10BF4
Content-Type: text/plain; charset=us-ascii;
name="backhand-error"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="backhand-error"

[Wed Jul 26 14:29:01 2000] [notice] (Translate <=) = { /cgi-bin/backhand-test, (null), (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Translate =>) = { /cgi-bin/backhand-test, (null), (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Type <=) = { cgi-script, /cgi-bin/backhand-test, (null) }
[Wed Jul 26 14:29:01 2000] [notice] Func executed for (null) [byLoad(NULL)] (256 -> 256)
[Wed Jul 26 14:29:01 2000] [notice] Func executed for (null) [byRandom(NULL)] (256 -> 256)
[Wed Jul 26 14:29:01 2000] [notice] All funcs executed ->
[Wed Jul 26 14:29:01 2000] [notice] (Type =>) = *{ backhand-redirection, backhand:/cgi-bin/backhand-test, backhand/redirect }
[Wed Jul 26 14:29:01 2000] [notice] (Postread =>) = { Backhanding to 222 }
[Wed Jul 26 14:29:01 2000] [notice] (Postread =>) = { backhand:/cgi-bin/backhand-test, backhand-redirection, (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Translate <=) = { backhand:/cgi-bin/backhand-test, backhand-redirection, (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Type <=) = { backhand-redirection, /cgi-bin/backhand-test, (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Type =>) = *{ backhand-redirection, /cgi-bin/backhand-test, (null) }
[Wed Jul 26 14:29:01 2000] [error] (2)No such file or directory: mod_backhand: MBCSP error (recv file descriptor)
[Wed Jul 26 14:29:01 2000] [notice] (Postread =>) = { DECLINED }
[Wed Jul 26 14:29:01 2000] [notice] (Translate <=) = { /cgi-bin/backhand-test, (null), (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Translate =>) = { /cgi-bin/backhand-test, (null), (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Type <=) = { cgi-script, /cgi-bin/backhand-test, (null) }
[Wed Jul 26 14:29:01 2000] [notice] (Type =>) = { cgi-script, /cgi-bin/backhand-test, (null) }
[Wed Jul 26 14:29:01 2000] [error] mod_backhand: could not get valid connection -- forced local


--------------6F2E42768C974A5D28A10BF4--
[mod_backhand-users] Problems with communications between two mod_backhands ... [ In reply to ]
Roland Thomas Lichti wrote:
> The status interface works (when requesting /backhand/ both servers are
> shown). The backhand config for the cgi-bin is:

From the error log below, it looks like your servers IP addresses aren't
Status: O

set right in mod_backhand. This is could be due to a bug in 1.0.9 that
Sean Chittenden found a few weeks ago. It was an uninitalized pointer
value, but over the last year, this was the first time I had seen it
rear its ugly head. Strange...

I doubt you are actually experiencing this bug, you problem lies in your
configuration. See below.

To know for sure, what are the servers IP address:port's shown on the
status page. If the port is obviously wrong, that is this bug. I will
release mod_backhand 1.2.0 shortly with the fix.

For a quick fix, put this line:
memset(&mystat, 0, sizeof(serverstat));

before each of the two lines like:
fillstat(&mystat, s, sins[0].from, sins[0].webport);

CONFIGURATION PROBLEM:

Another problem is that you NEED byAge. It will throw away all of the
servers that have expired. mod_backhand allows for itself to proxy to
up to HAD_SERVER_LIMIT other servers. byAge will cull away the old ones
(like the ones you haven't heard from yet). Notice below that byLoad is
passed 256 servers and returns 256 servers in sorted order. The servers
that you haven't heard from, don't have valid IPs, but do have a load of
0 (you haven't heard otherwise), so it is putting non existant servers
infront of your real servers. And the failed to get a connection error
is it trying to connect to 0.0.0.0 (which, of course, fails). A simple
Backhand byAge in you <Directory> clause will fix that. (before
everything else -- for performance).

> <Directory>
> Options ExecCGI FollowSymLinks
>
> Backhand byLoad
> # Backhand byAge
> Backhand byRandom
> # Backhand byLogWindow
> </Directory>
>
> [Wed Jul 26 14:29:01 2000] [notice] Func executed for (null) [byLoad(NULL)] (256 -> 256)
> [Wed Jul 26 14:29:01 2000] [notice] Func executed for (null) [byRandom(NULL)] (256 -> 256)
> [Wed Jul 26 14:29:01 2000] [notice] All funcs executed ->
> [Wed Jul 26 14:29:01 2000] [error] mod_backhand: could not get valid connection -- forced local

--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
[mod_backhand-users] Problems with communications between two mod_backhands ... [ In reply to ]
"Theo E. Schlossnagle" wrote:

> Roland Thomas Lichti wrote:
> > The status interface works (when requesting /backhand/ both servers are
> > shown). The backhand config for the cgi-bin is:
>
> From the error log below, it looks like your servers IP addresses aren't
> set right in mod_backhand. This is could be due to a bug in 1.0.9 that
> Sean Chittenden found a few weeks ago. It was an uninitalized pointer
> value, but over the last year, this was the first time I had seen it
> rear its ugly head. Strange...

Well, That was it. I thought, that port 1869 is a port used by mod_backhand to communicate with each other. And that was the port shown by the status page for the two servers

After inserting the quickfix it works fine.

> I doubt you are actually experiencing this bug, you problem lies in your
> configuration. See below.
>
> To know for sure, what are the servers IP address:port's shown on the
> status page. If the port is obviously wrong, that is this bug. I will
> release mod_backhand 1.2.0 shortly with the fix.

tterragate01.cyland.com 212.227.111.16:1869 ...
tterragate02.cyland.com 212.227.111.17:1869 ...

After the fix the port is :80 ...

> CONFIGURATION PROBLEM:
>
> Another problem is that you NEED byAge. It will throw away all of the
> servers that have expired. mod_backhand allows for itself to proxy to

Thanks. I fixed that problem.

bye,
Roland

--
Cyland AG the Roland T. Lichti
Hebelstra=DFe 15 presence Systemadministration
76133 Karlsruhe company Tel: 0721 / 1608 337