Mailing List Archive

[mod_backhand-users] 0/0 servers on two machines.
Hi! I am trying to get backhand working but I don't seem to be doing too
well at it. I figured the best thing to do would be to first practice with
a couple machines. However it seems that mercury and cox don't feel like
clustering together.

Ultimately, my goal is to have a "feeder" server with ips
63.197.220.106 and 192.168.2.1 that in feeds to machines on 192.168.2.0/24

Well, maybe it would look better in ascii art... :)

Internet
(lggw .105)
|
----------------------------------------------63.197.220.104/29
| |
(.106) (Other machines)
mercury
(.1)
|
------------------------------------------192.168.2.0/24
| | |
(.2) (.3) (eventually
rms cox other machines)


However, according to cox's logs, backhand seems to be binding to the
wrong ip (192.168.1.11, which is an ip that cox does have for the purpose
of pulling a cvs checkout of the lg tree, access to the sql server, nfs
mount for data dir and php cookies... etc)

mercury interfaces:
eth0 addr:63.197.220.106 Bcast:63.197.220.111 Mask:255.255.255.248
eth0:0 addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
eth0:1 addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
eth0:2 addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0

mercury httpd.conf snippit:
LoadModule backhand_module /usr/lib/apache/1.3/mod_backhand.so
AddModule mod_backhand.c
UnixSocketDir /var/run/libapache-mod-backhand
MulticastStats 192.168.2.1 192.168.2.255:4445,5
AcceptStats 192.168.2.0/24
<Location "/backhand-status">
SetHandler backhand-handler
</location>

mercury log snippet:

[14:10:49] [notice] mod_backhand -- UnixSocketDir set to /var/run/libapache-mod-backhand
[14:10:49] [notice] mod_backhand -- Broadcast 192.168.2.255:4445 added
[14:10:49] [notice] mod_backhand -- Multicast accept 192.168.2.0/24
[14:10:49] [notice] backhand_init(7910) spawning moderator (PID
7911)
[14:10:50] [notice] waiting for mod_backhand moderator to start
[14:10:50] [notice] mod_backhand moderator ready to go
[14:10:51] [notice] Apache/1.3.22 (Unix) Debian/GNU balanced_by_mod_backhand/1.2.0 configured -- resuming normal operations
[14:10:51] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec)
[14:10:51] [notice] Accept mutex: sysvsem (Default: sysvsem)


cox interfaces:
eth0 63.197.220.108 Bcast:63.197.220.111 Mask:255.255.255.248
eth0:0 addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
eth0:1 addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0

cox snippit from httpd.conf:
LoadModule backhand_module /usr/lib/apache/1.3/mod_backhand.so
AddModule mod_backhand.c
UnixSocketDir /var/run/libapache-mod-backhand
MulticastStats 192.168.2.3 192.168.2.255:4445,5
AcceptStats 192.168.2.0/24
<Location "/backhand-status">
Sethandler backhand-handler
</location>

cox log snippit:
[14:09:06] [info] created shared memory segment #12544
[14:09:06] [info] mod_unique_id: using ip addr 192.168.1.11
[14:09:07] [info] created shared memory segment #12673
[14:09:07] [notice] mod_backhand -- UnixSocketDir set to /var/run/libapache-mod-backhand
[14:09:07] [notice] mod_backhand -- Broadcast 192.168.2.255:4445 added
[14:09:07] [notice] mod_backhand -- Multicast accept 192.168.2.0/24
[14:09:07] [notice] backhand_init(2489) spawning moderator (PID
2490)
[14:09:08] [notice] waiting for mod_backhand moderator to start
[14:09:08] [notice] mod_backhand moderator ready to go
[14:09:08] [info] mod_unique_id: using ip addr 192.168.1.11
[14:09:08] [info] created shared memory segment #12675
[14:09:08] [notice] Apache/1.3.19 (Unix) Debian/GNU balanced_by_mod_backhand/1.2.0 mod_gzip/1.3.19.1a PHP/4.0.5 configured -- resuming normal operations
[14:09:08] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec)
[14:09:08] [info] Server built: Mar 26 2001 09:36:17


--
Please consider encrypting emails to this address with gnupg
K:1024D/06357400 FP:AAE4 8C76 58DA 5902 761D 247A 8A55 DA73 0635 7400
James Blackwell - http://linuxguru.net
[mod_backhand-users] 0/0 servers on two machines. [ In reply to ]
I found it. The Debian README.gz specifies a comma between port and ttl.
When I changed it to a colon, they showed right up. :)


So....

MulticastStats 192.168.2.3 192.168.2.255:4445,5

should apparently should be:

MulticastStats 192.168.2.3 192.168.2.255:4445:5


Either that, or in my particular case, two wrongs do make a right? :)

On Sat, Oct 27, 2001 at 02:42:36PM -0700, James Blackwell wrote:
> Hi! I am trying to get backhand working but I don't seem to be doing too
> well at it. I figured the best thing to do would be to first practice with
> a couple machines. However it seems that mercury and cox don't feel like
> clustering together.
>
> Ultimately, my goal is to have a "feeder" server with ips
> 63.197.220.106 and 192.168.2.1 that in feeds to machines on 192.168.2.0/24
>
> Well, maybe it would look better in ascii art... :)
>
> Internet
> (lggw .105)
> |
> ----------------------------------------------63.197.220.104/29
> | |
> (.106) (Other machines)
> mercury
> (.1)
> |
> ------------------------------------------192.168.2.0/24
> | | |
> (.2) (.3) (eventually
> rms cox other machines)
>
>
> However, according to cox's logs, backhand seems to be binding to the
> wrong ip (192.168.1.11, which is an ip that cox does have for the purpose
> of pulling a cvs checkout of the lg tree, access to the sql server, nfs
> mount for data dir and php cookies... etc)
>
> mercury interfaces:
> eth0 addr:63.197.220.106 Bcast:63.197.220.111 Mask:255.255.255.248
> eth0:0 addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
> eth0:1 addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
> eth0:2 addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
>
> mercury httpd.conf snippit:
> LoadModule backhand_module /usr/lib/apache/1.3/mod_backhand.so
> AddModule mod_backhand.c
> UnixSocketDir /var/run/libapache-mod-backhand
> MulticastStats 192.168.2.1 192.168.2.255:4445,5
> AcceptStats 192.168.2.0/24
> <Location "/backhand-status">
> SetHandler backhand-handler
> </location>
>
> mercury log snippet:
>
> [14:10:49] [notice] mod_backhand -- UnixSocketDir set to /var/run/libapache-mod-backhand
> [14:10:49] [notice] mod_backhand -- Broadcast 192.168.2.255:4445 added
> [14:10:49] [notice] mod_backhand -- Multicast accept 192.168.2.0/24
> [14:10:49] [notice] backhand_init(7910) spawning moderator (PID
> 7911)
> [14:10:50] [notice] waiting for mod_backhand moderator to start
> [14:10:50] [notice] mod_backhand moderator ready to go
> [14:10:51] [notice] Apache/1.3.22 (Unix) Debian/GNU balanced_by_mod_backhand/1.2.0 configured -- resuming normal operations
> [14:10:51] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec)
> [14:10:51] [notice] Accept mutex: sysvsem (Default: sysvsem)
>
>
> cox interfaces:
> eth0 63.197.220.108 Bcast:63.197.220.111 Mask:255.255.255.248
> eth0:0 addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
> eth0:1 addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
>
> cox snippit from httpd.conf:
> LoadModule backhand_module /usr/lib/apache/1.3/mod_backhand.so
> AddModule mod_backhand.c
> UnixSocketDir /var/run/libapache-mod-backhand
> MulticastStats 192.168.2.3 192.168.2.255:4445,5
> AcceptStats 192.168.2.0/24
> <Location "/backhand-status">
> Sethandler backhand-handler
> </location>
>
> cox log snippit:
> [14:09:06] [info] created shared memory segment #12544
> [14:09:06] [info] mod_unique_id: using ip addr 192.168.1.11
> [14:09:07] [info] created shared memory segment #12673
> [14:09:07] [notice] mod_backhand -- UnixSocketDir set to /var/run/libapache-mod-backhand
> [14:09:07] [notice] mod_backhand -- Broadcast 192.168.2.255:4445 added
> [14:09:07] [notice] mod_backhand -- Multicast accept 192.168.2.0/24
> [14:09:07] [notice] backhand_init(2489) spawning moderator (PID
> 2490)
> [14:09:08] [notice] waiting for mod_backhand moderator to start
> [14:09:08] [notice] mod_backhand moderator ready to go
> [14:09:08] [info] mod_unique_id: using ip addr 192.168.1.11
> [14:09:08] [info] created shared memory segment #12675
> [14:09:08] [notice] Apache/1.3.19 (Unix) Debian/GNU balanced_by_mod_backhand/1.2.0 mod_gzip/1.3.19.1a PHP/4.0.5 configured -- resuming normal operations
> [14:09:08] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec)
> [14:09:08] [info] Server built: Mar 26 2001 09:36:17
>
>
> --
> Please consider encrypting emails to this address with gnupg
> K:1024D/06357400 FP:AAE4 8C76 58DA 5902 761D 247A 8A55 DA73 0635 7400
> James Blackwell - http://linuxguru.net
>
> _______________________________________________
> backhand-users mailing list
> backhand-users@lists.backhand.org
> http://lists.backhand.org/mailman/listinfo/backhand-users
>

--
Please consider encrypting emails to this address with gnupg
K:1024D/06357400 FP:AAE4 8C76 58DA 5902 761D 247A 8A55 DA73 0635 7400
James Blackwell - http://linuxguru.net
[mod_backhand-users] 0/0 servers on two machines. [ In reply to ]
--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Oct 28, 2001 at 09:46:07AM +0800, James Bromberger wrote:
> On Sat, Oct 27, 2001 at 04:42:22PM -0700, James Blackwell wrote:
> > I found it. The Debian README.gz specifies a comma between port and ttl.
> > When I changed it to a colon, they showed right up. :)=20
>=20
>=20
> Odd. Looking at http://www.backhand.org/mod_backhand/FAQ.shtml#question11=
=20
> shows a comma. Even mod_backhand.c line 1428 shows:


Ok. I tried the following things:

Omitting the seperator and ttl completely: works fine
Using , as a ttl: works fine
Using : as a ttl: works fine


Seems that no matter what I do, the code acts properly.


However, this is absolutely cool! I was able to get backhand to switch
between servers by a couple "cat /dev/zero > /dev/null" here and there...=
=20


> sscanf(word2, "%d.%d.%d.%d:%d,%d", &a, &b, &c, &d, &port, &ttl);
>=20
>=20
> As a further test, try removing the :5 from the end of the MulticastStats=
=20
> line and see if it still works. My guess is that is it skipping the abov=
e=20
> line 201 since it doesn't match, and moving to 209. The difference is tha=
t in=20
> place of setting a ttl, it specifies "sin.sin_family =3D AF_INET".
>=20
> Theo, can you confirm this? The documentation I have in README.Debian.gz =
in=20
> the Debian package is the examples from the backhand.org site.=20
>=20
> =20
> > MulticastStats 192.168.2.3 192.168.2.255:4445,5
> > should apparently should be:
> > MulticastStats 192.168.2.3 192.168.2.255:4445:5
> >=20
> > Either that, or in my particular case, two wrongs do make a right? :)
> <snip>
>=20
>=20
> James
> Debian Package Maintainer: libapache-mod-backhand
> =20
> --=20
> James Bromberger <james_AT_rcpt.to> www.james.rcpt.to
> Australian Debian Conference: http://www.linux.org.au/conf/debiancon.html
> Remainder moved to http://www.james.rcpt.to/james/sig.html



--=20
Please consider encrypting emails to this address with gnupg
K:1024D/06357400 FP:AAE4 8C76 58DA 5902 761D 247A 8A55 DA73 0635 7400
James Blackwell - http://linuxguru.net

--CE+1k2dSO48ffgeK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjvbbOoACgkQilXacwY1dAB2mgCgw/qLCDHUEYvcUyHkbBCFeLEg
ECgAn3YTXxNIHkXBLkeGzVfiUW1Gp34p
=8XU8
-----END PGP SIGNATURE-----

--CE+1k2dSO48ffgeK--
[mod_backhand-users] 0/0 servers on two machines. [ In reply to ]
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 27, 2001 at 04:42:22PM -0700, James Blackwell wrote:
> I found it. The Debian README.gz specifies a comma between port and ttl.
> When I changed it to a colon, they showed right up. :)=20


Odd. Looking at http://www.backhand.org/mod_backhand/FAQ.shtml#question11=
=20
shows a comma. Even mod_backhand.c line 1428 shows:

{=20
"MulticastStats", /* directive name */
setupbroadcasting, /* config action routine */
NULL, /* argument to include in call */
RSRC_CONF, /* where available */
TAKE12, /* arguments */
"Backhand directive - where to (broad|multi)cast fromip toip:toport,t=
tl"
/* directive description */
},

And line 201 says:

sscanf(word2, "%d.%d.%d.%d:%d,%d", &a, &b, &c, &d, &port, &ttl);


As a further test, try removing the :5 from the end of the MulticastStats=
=20
line and see if it still works. My guess is that is it skipping the above=
=20
line 201 since it doesn't match, and moving to 209. The difference is that =
in=20
place of setting a ttl, it specifies "sin.sin_family =3D AF_INET".

Theo, can you confirm this? The documentation I have in README.Debian.gz in=
=20
the Debian package is the examples from the backhand.org site.=20

=20
> MulticastStats 192.168.2.3 192.168.2.255:4445,5
> should apparently should be:
> MulticastStats 192.168.2.3 192.168.2.255:4445:5
>=20
> Either that, or in my particular case, two wrongs do make a right? :)
<snip>


James
Debian Package Maintainer: libapache-mod-backhand
=20
--=20
James Bromberger <james_AT_rcpt.to> www.james.rcpt.to
Australian Debian Conference: http://www.linux.org.au/conf/debiancon.html
Remainder moved to http://www.james.rcpt.to/james/sig.html

--2fHTh5uZTiUOsy+g
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE722NepfJwKAkXqeQRAnxfAJ45vJJ7S/Kdt2AUsh/34D0Lq9ooUgCffdUI
5m9HGYnH1+J0vH0ppzzkJuY=
=m2HB
-----END PGP SIGNATURE-----

--2fHTh5uZTiUOsy+g--
[mod_backhand-users] 0/0 servers on two machines. [ In reply to ]
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> Ok. I tried the following things:
>=20
> Omitting the seperator and ttl completely: works fine
> Using , as a ttl: works fine
> Using : as a ttl: works fine
>=20
>=20
> Seems that no matter what I do, the code acts properly.

Dime to dollar you restarted the server gracefully (HUP) and that was
what fixed everything. For some reason (SO load order is the current
idea) you have to HUP apache after you start it for it to broadcast
the number of servers correctly. Not real sure why, but I have to do
it on every box (FreeBSD, Linux, and Solaris). -sc

--2fHTh5uZTiUOsy+g
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean@chittenden.org>

iEYEARECAAYFAjvcXXUACgkQn09c7x7d+q22JACbBKmr5zTqxkFFF/D0L1FoHQMe
J0oAnRkGn6s1SlA+z2uqAqjb/QD0DaTs
=Kq91
-----END PGP SIGNATURE-----

--2fHTh5uZTiUOsy+g--