reverse proxy with multiple backs and multiple fronts

11 views
Skip to first unread message

neil epstein

unread,
Jan 21, 2009, 3:25:45 PM1/21/09
to perlbal
hey,

i'm looking to get perlbal going for a movabletype install. We're
currently using mod_proxy on the 2 web boxes to pass things at
sitename.com/mt to the app2 and app3 ((10.17.18.1xx/mt) boxes to
process comments , recommends and search - but after recent down time
we're told mod_proxy is too costly, and it was suggested to user
perlbal instead.

I've got perlbal installed on the two web boxes with IO::AIO too, when
I go to start it I get these errors:

root@web2 perlbal]# /usr/bin/perlbal --config=/etc/httpd/conf/perlbal/
perlbal.conf
Constant subroutine S_IFIFO redefined at /usr/lib64/perl5/5.8.5/x86_64-
linux-thread-multi/XSLoader.pm line 197.
ERROR: Can't start service 'pub1' on 209.81.72.178:80: Error creating
listening socket: IO::Socket::INET: Cannot assign requested address
Error starting up.

Here is my perbal.conf:

LOAD vhosts

CREATE POOL poolserver1
POOL poolserver1 ADD 10.17.18.181:80

CREATE POOL poolserver2
POOL poolserver2 ADD 10.17.18.183:80

CREATE SERVICE server1
SET role = reverse_proxy
SET pool = poolserver1
SET persist_client = on
ENABLE server1

CREATE SERVICE server2
SET role = reverse_proxy
SET pool = poolserver2
SET persist_client = on
ENABLE server2

CREATE SERVICE pub1
SET listen = 209.xx.xx.178:80
SET role = selector
SET plugins = vhosts
SET persist_client = on

VHOST siteist.com = server1
VHOST siteest.com = server2
ENABLE pub1

CREATE SERVICE pub2
SET listen = 209.xx.xx.182:80
SET role = selector
SET plugins = vhosts
SET persist_client = on

VHOST siteist.com = server1
VHOST siteest.com = server2
ENABLE pub2

Mark Smith

unread,
Jan 21, 2009, 3:54:09 PM1/21/09
to per...@googlegroups.com
> Constant subroutine S_IFIFO redefined at /usr/lib64/perl5/5.8.5/x86_64-
> linux-thread-multi/XSLoader.pm line 197.

Wow, are you really running perl 5.8.5 from 2004? Do you really want
to be running that?

I think there are some pretty heinous bugs in older versions of Perl
that make it rather suboptimal to be running Perlbal under. Consider
trying with an upgrade version of Perl and see if that resolve this
issue?


--
Mark Smith / xb95
smi...@gmail.com

Neil Epstein

unread,
Jan 22, 2009, 9:42:11 AM1/22/09
to per...@googlegroups.com
Hey Mark,

I went ahead and upgraded perl on the web boxes (not on the app boxes
yet) and one of the errors went away, but still getting the error
about the listening socket and the assign requested address.

[root@-web2 ~]# perl -v

This is perl, v5.8.9 built for x86_64-linux

Copyright 1987-2008, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[root@-web2 ~]# /usr/bin/perlbal --config=/etc/httpd/conf/perlbal/perlbal.conf


ERROR: Can't start service 'pub1' on 209.81.72.178:80: Error creating
listening socket: IO::Socket::INET: Cannot assign requested address
Error starting up.

[root@gothamist-web2 ~]#

Jonty

unread,
Jan 22, 2009, 10:00:42 AM1/22/09
to per...@googlegroups.com
This is because another application is already listening on port 80, probably
your web-server.

--jonty

Jordi Funollet

unread,
Jan 22, 2009, 10:04:43 AM1/22/09
to per...@googlegroups.com
Neil Epstein dixit:

> [root@-web2 ~]# /usr/bin/perlbal
> --config=/etc/httpd/conf/perlbal/perlbal.conf ERROR: Can't start service
> 'pub1' on 209.81.72.178:80: Error creating listening socket:
> IO::Socket::INET: Cannot assign requested address Error starting up.
> [root@gothamist-web2 ~]#

It may seem obvious (sorry) but this looks like the error you get when
something is already listening on this port. Is it free? (fuser -n tcp 80).

And just a question: from your previous mail I assume your host has two IPs.
It this correct?

--
##############################
### Jordi Funollet
### http://www.terraquis.net

Neil Epstein

unread,
Jan 22, 2009, 11:43:22 AM1/22/09
to per...@googlegroups.com
well I do have httpd running on port 80 - i guess i'm confused how it
works. If I have perlbal running on 81 - and we have a hardware
firewall in between web* boxes and the internet world - will it still
work or do we need port 81 opened on the firewall?

we have two web physical boxes. web1 (178) and web2 (182) and I'm
sharing this conf file across an NFS share..

Mark Smith

unread,
Jan 22, 2009, 12:07:29 PM1/22/09
to per...@googlegroups.com
> well I do have httpd running on port 80 - i guess i'm confused how it
> works. If I have perlbal running on 81 - and we have a hardware
> firewall in between web* boxes and the internet world - will it still
> work or do we need port 81 opened on the firewall?
>
> we have two web physical boxes. web1 (178) and web2 (182) and I'm
> sharing this conf file across an NFS share..

General usage pattern is:

Perlbal on port 80
Apache/lighttpd/mongrel/whatever on some other port (say 8000)

Then you tell Perlbal to use the backends at x.y.z.a:8000 and
x.y.z.b:8000. Your hardware load balancer only talks to Perlbal,
never talks directly to the backends.

Reply all
Reply to author
Forward
0 new messages