Mailing List Archive

[mod_backhand-users] Core Dump on Apache 1.3.12 environment
Hi there,

I just compliled mod_backhand with following environment

Apache 1.3.12
backhand-1.0.8
openssl-0.9.5.a
php-3.0.16
mod_ssl-2.6.2-1.3.12

Following is my extract of httpd.conf

NameVirtualHost aaa.bbb.ccc.ddd

<VirtualHost aaa.bbb.ccc.ddd>
ServerAdmin webmaster@domain.com
DocumentRoot /usr/local/apache/htdocs/www
ServerName test.domain.com
ErrorLog logs/error_log
CustomLog logs/access_log common
<Directory /usr/local/www/apache/htdocs/www>
Backhand byAge 20
Backhand byLoad 1
</Directory>
</VirtualHost>

In backhand config,

UnixSocketDir /usr/local/apache/backhand
MulticastStats 10.1.0.255:4445
AcceptStats 10.1.0.0/8

Currently, I have 2 hosts for testing first. One is using 10.1.0.49 and
another is using 10.1.0.50. Both machine have the hosts set to 10.1.0.49 and
10.1.0.50. When I launch the apache, it will start but the child will DIE...

But from the logfile...

[Fri Apr 14 23:07:58 2000] [notice] mod_backhand -- UnixSocketDir set to
/usr/local/apache/backhand
[Fri Apr 14 23:07:58 2000] [notice] mod_backhand -- Broadcast
10.1.0.255:4445 added
[Fri Apr 14 23:07:58 2000] [notice] mod_backhand -- Multicast accept
10.1.0.0/8
[Fri Apr 14 23:07:58 2000] [alert] setuid: trying to ste it to 99[Fri Apr 14
23:07:58 2000] [notice] backhand_init(1119) spawning stats things (PID 1137)

[Fri Apr 14 23:07:58 2000] [notice] Apache/1.3.12 (Unix) PHP/3.0.16
mod_ssl/2.6.2 OpenSSL/0.9.5a balanced_by_mod_backhand/1.0.8 configured --
resuming normal operations
[Fri Apr 14 23:07:58 2000] [notice] child pid 1137 exit signal Segmentation
fault (11)

Anyone can give me some advice?

On the other hand, our web page contains a lot of dynamic page. Is it
possible to specify the document root and then the backhand will handle all
requests?

Regards,
Edward.
[mod_backhand-users] Core Dump on Apache 1.3.12 environment [ In reply to ]
Edward,
I Cced in the backhand-users list becuase I get this question often
and thought it would be beneficial to share.

Edward Tsang wrote:
> I changed the mod_backhand.h. Now the mod_backhand can run without core
> dump. But I still can't access the backhand diagnostics page. It just show
> the logo and nothing.
> But I already use separated path ...
> DocumentRot /usr/local/apache/htdocs
> <Location
> backhand diagnostic here /backhand/...
> </Location>
> <Directory /usr/local/apache/htdocs/ww>
> Enable backhand here...
> </Directory>

Sounds good. If you can see the logo, there aren't any permissions
issues. You should see a table as well.. My guess is that the table is
empty? It has column headers, but no hosts? In that case, it sounds
like you AcceptStats is not set up right. If you have two networks on
each box, this can happen pretty easily. I built out the FAQ a little
bit on this subject.

If you are using Mulicast, then you need to make sure it is sending the
packets out the right interface (or determine which interface they are
leaving and add that network with an AcceptStats directive. Make sure
that You MulticastStats directive is correct as well. Remember, it is
multicast (or broadcast) so you can't just specify A machine's IP.. You
have to use a REAL IP broadcast address (shown by /sbin/ifconfig -a) or
a real IP multicast address (which is a little more complicated to
explain).

> Did mod_backhand support SSL and virtual host in apache?

SSL... Well, it can't proxy things to an SSL only server. But, that
really shouldn't be too much of a problem. That would be a HUGE
overhead anyway.

You want to bind you SSL server to the external network on port 443 like
usual, but you want to ALSO bind the SAME VH (with completely identical
functionality) to port 80 with NO SSL! Now, if you have an internal
network, you can bind it to port 80 only on the internal network. If
you down, either add one (logically with IP aliasing) or be happy
running it publicly or figure out another way to assure your customer
don't accidently use the http instead of https.

Then, mod_backhand can handle the traffic coming into you SSL server and
if necessary it will proxy it to another machine, but on the non-SSL
port. This saves HUGE computational overhead. You would have to manage
two SSL sessions instead of one otherwise! Of course, you need to
specify the correct MulticastStats and AcceptStats to make this work.

Virtual hosts? Hmm... That depends on how you configure them I guess. I
use it with virtual hosts. IT works in <Directory> clauses and since
they work in VHs then so does mod_backhand. Ex:

<VirtualHost 1.2.3.4:80>
ServerName www.exmaple.com
DocumentRoot /var/apache/www.exmaple.com/htdocs
<Directory /var/apache/www.exmaple.com/htdocs>
... yadda yadda yadda ...
Backhand byAge 3
Backhand byLoad 1
</Directory>
</VirtualHost>

<VirtualHost 1.2.3.4:80>
ServerName test.exmaple.com
DocumentRoot /var/apache/test.exmaple.com/htdocs
<Directory /var/apache/test.exmaple.com/htdocs>
... yadda yadda yadda ...
Backhand byAge 3
Backhand byRandom
Backhand byLogWindow
Backhand byLoad 1
</Directory>
</VirtualHost>

The above should work jsut fine.. Of course, you'll notice that the
Directoies are different.

--
Theo Schlossnagle
33131B65/2047/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7