Mailing List Archive

[mod_backhand-users] Logging backhand activity...
Howdy. I'm debugging a backhand install and am trying to figure out
how to get things working (imagine that!). Here's my snippet from my conf
file:


LoadModule backhand_module libexec/mod_backhand.so
AddModule mod_backhand.c
<IfModule mod_backhand.c>
UnixSocketDir /usr/local/apache/backhand
MulticastStats 192.168.1.178 192.168.1.255:4445
AcceptStats 192.168.1.0/24
</IfModule>

<Directory "/www/docs">
Backhand byAge 3
BackhandFromSO libexec/byHostname.so byHostname atlas
Backhand byLogWindow
Backhand byCost
Backhand addPrediction
</Directory>
BackhandLogLevel +netall,+mbcsall,+dcsnall


With that config, when I telnet to port 8000, and "GET / HTTP/1.0",
here's what I get in the log:


orion04# [Wed Jul 12 02:52:50 2000] [notice] (Translate <=) = { /, (null),
(null) }
[Wed Jul 12 02:52:50 2000] [notice] (Translate =>) = { /, (null), (null) }
[Wed Jul 12 02:52:50 2000] [notice] (Type <=) = { (null), /, (null) }
[Wed Jul 12 02:52:50 2000] [notice] Func executed for (null) [byAge(3)] (256
-> 11)
[Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
[libexec/byHostname.so::byHostname((atlas))] (11 -> 5)
[Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
[byLogWindow(NULL)] (5 -> 2)
[Wed Jul 12 02:52:50 2000] [notice] Func executed for (null) [byCost(NULL)]
(2 -> 1)
[Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
[addPrediction(NULL)] (1 -> 1)
[Wed Jul 12 02:52:50 2000] [notice] All funcs executed -> atlas04.internal
[Wed Jul 12 02:52:50 2000] [notice] (Type =>) = *{ backhand-redirection,
backhand:/, backhand/redirect }
[Wed Jul 12 02:52:50 2000] [notice] (Postread =>) = { Backhanding to 2 }
[Wed Jul 12 02:52:50 2000] [notice] (Postread =>) = { backhand:/,
backhand-redirection, (null) }
[Wed Jul 12 02:52:50 2000] [notice] (Translate <=) = { backhand:/,
backhand-redirection, (null) }
[Wed Jul 12 02:52:50 2000] [notice] (Type <=) = { backhand-redirection, /,
(null) }
[Wed Jul 12 02:52:50 2000] [notice] (Type =>) = *{ backhand-redirection, /,
(null) }


And the system blocks on a socket and you sit there for a LONG time.
The atlas hosts have the same backhand config, just no <Directory>
directive. Any thoughts?

-sc

Orion hosts =~ proxy servers
Atlas == app servers
[mod_backhand-users] Logging backhand activity... [ In reply to ]
Sean Chittenden wrote:
> Howdy. I'm debugging a backhand install and am trying to figure out
> how to get things working (imagine that!). Here's my snippet from my conf
> file:
>
> LoadModule backhand_module libexec/mod_backhand.so
> AddModule mod_backhand.c
> <IfModule mod_backhand.c>
> UnixSocketDir /usr/local/apache/backhand
> MulticastStats 192.168.1.178 192.168.1.255:4445
> AcceptStats 192.168.1.0/24
> </IfModule>

Make sure you have the first parameter to MulticastStats set
appropriately (read: differently) on each system. You can play tricks
with /etc/hosts and omit the first parameter entirely :)

> <Directory "/www/docs">
> Backhand byAge 3
> BackhandFromSO libexec/byHostname.so byHostname atlas
> Backhand byLogWindow
> Backhand byCost
> Backhand addPrediction
> </Directory>

You definetly DO NOT want LogWindow unless you first to byRandom.
Otherwise every machine will always limit itself to the same set of
machines. Stick a Backhand byRandom before your Backhand byLogWindow
and that looks like a pretty good decision making approach.

> BackhandLogLevel +netall,+mbcsall,+dcsnall
>
> With that config, when I telnet to port 8000, and "GET / HTTP/1.0",
> here's what I get in the log:
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null) [byAge(3)] (256
> -> 11)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [libexec/byHostname.so::byHostname((atlas))] (11 -> 5)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [byLogWindow(NULL)] (5 -> 2)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null) [byCost(NULL)]
> (2 -> 1)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [addPrediction(NULL)] (1 -> 1)
> [Wed Jul 12 02:52:50 2000] [notice] All funcs executed -> atlas04.internal

At least you get a good decision :)

> And the system blocks on a socket and you sit there for a LONG time.
> The atlas hosts have the same backhand config, just no <Directory>
> directive. Any thoughts?

That is distrubing to say the least. So, lets verbally diagram this:
You have a set of machines A[12345] (A for Atlas). You also have a set
of machines B[12345] (B for backhanders :) All requests originate to
one of the B's and you want them to be backhanded to the A's.

So, confirm that, when logged into B1, you can actually telnet A[12345]
80 and retrieve the intended document. Other than that, it sounds like
you are (or I am) going to have to break out the debugger. :(


--
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] Logging backhand activity... [ In reply to ]
I hate to say this, but I can telnet from one system to the other.
Scenario:

1) Telnet from personal box to A[1-5]
GET /
...page is returned...

2) Telnet from B[1-5] to A[1-5]
GET /
...page is returned...

3) Telnet from personal box to B[1-5]
GET /
...error log produces previous output, I wait for a long time over a
bottomless cup of coffee, come back in morning, and kill apache on B[1-5]...



As far as things that you are interested in:

1) Same subnet
2) Can telnet amongst machines
3) All running on port 80 (does this make a difference?)
4) All are able to broadcast to each other and I get a nice list of
about XX machines
5) Multicast is set properly
6) I've added the byRandon, still the same problem
7) No TCP connections are made (at least none that I've been able
to observe)
8) I need about two cups of Joe and 8 hours of sleep before I think
it's time to ^C apache.


I think something is blocking in the backhand-redirection, some
place shortly after line 526 in mod_backhand.c, but I could be wrong.


Umm... I think that's about it. FreeBSD 4 with shared * compiled
in. Oh! And a possible nine, but I think this is an unrelated observation.
Every now and then the number of servers comes up as 0/0. After a graceful
they'll show up, but... I haven't tried playing around with the module load
orders... yet. >:)

-sc


-----Original Message-----
From: Theo E. Schlossnagle [mailto:theos@cnds.jhu.edu]
Sent: Thursday, July 13, 2000 1:37 PM
To: Sean Chittenden
Cc: 'backhand-users@lists.backhand.org'
Subject: Re: [mod_backhand-users] Logging backhand activity...


Sean Chittenden wrote:
> Howdy. I'm debugging a backhand install and am trying to figure
out
> how to get things working (imagine that!). Here's my snippet from my conf
> file:
>
> LoadModule backhand_module libexec/mod_backhand.so
> AddModule mod_backhand.c
> <IfModule mod_backhand.c>
> UnixSocketDir /usr/local/apache/backhand
> MulticastStats 192.168.1.178 192.168.1.255:4445
> AcceptStats 192.168.1.0/24
> </IfModule>

Make sure you have the first parameter to MulticastStats set
appropriately (read: differently) on each system. You can play tricks
with /etc/hosts and omit the first parameter entirely :)

> <Directory "/www/docs">
> Backhand byAge 3
> BackhandFromSO libexec/byHostname.so byHostname atlas
> Backhand byLogWindow
> Backhand byCost
> Backhand addPrediction
> </Directory>

You definetly DO NOT want LogWindow unless you first to byRandom.
Otherwise every machine will always limit itself to the same set of
machines. Stick a Backhand byRandom before your Backhand byLogWindow
and that looks like a pretty good decision making approach.

> BackhandLogLevel +netall,+mbcsall,+dcsnall
>
> With that config, when I telnet to port 8000, and "GET /
HTTP/1.0",
> here's what I get in the log:
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null) [byAge(3)]
(256
> -> 11)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [libexec/byHostname.so::byHostname((atlas))] (11 -> 5)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [byLogWindow(NULL)] (5 -> 2)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
[byCost(NULL)]
> (2 -> 1)
> [Wed Jul 12 02:52:50 2000] [notice] Func executed for (null)
> [addPrediction(NULL)] (1 -> 1)
> [Wed Jul 12 02:52:50 2000] [notice] All funcs executed -> atlas04.internal

At least you get a good decision :)

> And the system blocks on a socket and you sit there for a LONG
time.
> The atlas hosts have the same backhand config, just no <Directory>
> directive. Any thoughts?

That is distrubing to say the least. So, lets verbally diagram this:
You have a set of machines A[12345] (A for Atlas). You also have a set
of machines B[12345] (B for backhanders :) All requests originate to
one of the B's and you want them to be backhanded to the A's.

So, confirm that, when logged into B1, you can actually telnet A[12345]
80 and retrieve the intended document. Other than that, it sounds like
you are (or I am) going to have to break out the debugger. :(


--
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