VMware Virtual Appliances Community
VMTN_Admin
Enthusiast
Enthusiast

Hercules Load Balancer Virtual Appliance

http://www.vmware.com/vmtn/appliances/directory/300

A tiny but mighty tcp load balancer

0 Kudos
186 Replies
Sean_Cottrell
Contributor
Contributor

Weird, I changed it back to DHCP, ping worked. Chenaged it back to static, now Ping works.

Thanks for the Help. Now to configure pen....

0 Kudos
ace95
Contributor
Contributor

OK I am new to linux and have never worked with pen before.

Basically what I am looking to do is have distribute http requests.

I want to give the ip address of this load balancer and have it redirected to two web servers on port 80 but I have no idea how to accomplish this.

I have tried the following command

pen -l pen.log -p pen.pid lbhost:80 host1:80 host2:80 as I found in the pen HOWTO

http://siag.nu/pen/howto.shtml

I have also tried using the config file in the forum at the end of page 4 but I just keep getting page cannot be displayed or a file list of the load balancer?

Anyone who has set this up in this way please help!

0 Kudos
brugh
Enthusiast
Enthusiast

looks cool for it's size ;). does it know microsoft's session directory though? the NLB options there are horrible and this appliance would help tremendously.

0 Kudos
enixus
Contributor
Contributor

Thx for this fantastic app!!! if you want to "feel" it work... come by at http://aricars.eu

One question though: has anyone integrated IPTABLES yet? Wouldnt that be a great addition to a Load Balancer?

Thx again!

Michael

0 Kudos
8i5
Contributor
Contributor

Did you ever get load balancing working with citrix? I am trying to do the same but with 2 citrix front end web servers. The problem I get is that only the first connection is redirected to the web server. All subsequent connections from different computers get "page cannot be displayed". If the load balancer is restarted another computer can connect, but no longer the first etc. etc.

Does anyone know what would cause the only one connection to be passed onto the webserver and not a second?

0 Kudos
markboon
Contributor
Contributor

I cannot seem to get this to work to only a single web server.

I am running a webserver in a vmware instance on 192.168.199.128. I can succesfully ping both the webserver and hercules from the client that is running both vmware instances and both vmware instances can succesfully ping each other.

I can also access succesfully the webserver via http://192.168.199.128:9080 from the client machine, but from hercules\pen I cannot get it to work.

I am using the following command:

/bin/pen -C 8888 -X -p /var/run/pen.pid 80 192.168.199.128:9080 -f -d -S 1

and it returns the following error in de pen.log when accessing hercules via http from the client:

2007-09-07 11:08:20: Client 192.168.199.1 has index -1

2007-09-07 11:08:20: lookup_client returns -1

2007-09-07 11:08:20: Trying server 0 at time 1189184900

2007-09-07 11:08:20: match_acl(0, 29862080)

2007-09-07 11:08:20: Server 0 failed, retry in 30 sec: Connection refused

2007-09-07 11:08:20: Couldn't find a server for client

any hints or thoughts where to look?

0 Kudos
briearn
Contributor
Contributor

Hi Sean,

I have a similar (may be the same) problem.

It seems as if there is a BUG in static IP assignment process. You can not set a default gateway while booting.

Check your console messages for something like that:

route: SIOC[ADD|DEL]RT: File exists

and you can check with netstat -rn if the default gw was set.

Cheers,

Arne

0 Kudos
stb74
Contributor
Contributor

I have the appliance running as per Hoppa66 instructions and all seems fine, apart from it not keeping the static IP address on reboot.

I have set this up to run as a load balancer for 2 proxy servers, but all my traffic still wants to go to one server, is there any way that this can be changed and actually force the balance between the two servers.

Cheers

0 Kudos
stevent77
Contributor
Contributor

I have been trying to download this appliance for a couple of days now with no success. There are no seeders for it. Can anyone here email it to me? My email is stevent76@gmail.com. Thanks in advance.

0 Kudos
vmwareeval
Contributor
Contributor

@stevent77: I think he posted a direct link to the app download (as well as ESX versions) about 5 posts down on the first page of this thread, so you don't have to user torrent. Hope that helps.

0 Kudos
yurasuka
Contributor
Contributor

Hi there

Brilliant idea! I do have one question though, does Hercules offer session persistence?

Thanks

y

0 Kudos
RalphieNL
Contributor
Contributor

Hi all,

I got a little problem with displaying the correct X-Forwarded-For header in http requests option. (the -H switch). The LB has a static IP (192.168.100.140) and is in front of 4 apache2 webservers. Even with the -H switch I still see the internal IP address of the LB in the Apache logfiles, instead of the external IP of the client visiting the site.

Anybody got an idea?

Below is my startup, maybe the -H isn't in the correct place?

Kind regards,

Ralphie

PIDFILE=/var/run/pen.pid

PIDFILE2=/var/run/pen2.pid

CONTROLPORT=8888

CONTROLPORT2=8889

CHROOTDIR=/chroot/pen

LBSERVER=www

LBSERVER2=192.168.100.140:443

SERVER1=192.168.100.130

SERVER2=192.168.100.131

SERVER3=192.168.100.132

SERVER4=192.168.100.133

case "$1" in

start)

if ; then

echo -n "Starting pen: "

/bin/pen -C $CONTROLPORT -X -H -l $LOGFILE -p $PIDFILE $LBSERVER $SERVER1 $SERVER2 $SERVER3 $SERVER4

echo "OK"

fi

if ; then

echo -n "Starting pen: "

/bin/pen -C $CONTROLPORT2 -X -H -l $LOGFILE2 -p $PIDFILE2 192.168.100.140:443 $SERVER1 $SERVER2 $SERVER3 $SERVER4

echo "OK"

fi

;;

stop)

kill `cat /var/run/pen.pid`

kill 'cat /var/run/pen2.pid'

;;

*)

echo "usage: $0 { start | stop }" >&2

exit 1

;;

esac

0 Kudos
soudertech
Enthusiast
Enthusiast

Prabhakar,

Can this vm be optimized to run as a vm? We have a small load balancing project that we need up and going by next week - can you offer any fee based help?

Live long and virtualize...!
0 Kudos
soudertech
Enthusiast
Enthusiast

Can this be loaded as a VM?

Live long and virtualize...!
0 Kudos
ltbltbltb
Contributor
Contributor

Hi,

I have a small issue when running this on ESX 3.5.

My setup:

2 Windows servers running IIS (iis001 and iis002)

2 Hercules load balancers.

If I don't enable vrrp the load balancers work with no problems, but the instant I start vrrp the master goes offline.

I can ping the slave IP, but not the master and the vrrp address

on the master I get:

hercules user.warn syslog: VRRP ID 19 on eth0: 10.197.207.55 is down, we are now the master

If I reboot the master I get this in the slave (wich then takes the master role, and goes offline)

hercules user.warn syslog: VRRP ID 19 on eth0: 10.197.207.54 is down, we are now the master

I have tried running the Hercules VMs on VMWare Workstation and they work here.

my PEN start script:

#!/bin/sh

#startup script for pen

LOGFILE1=/var/log/pen1.log

PIDFILE1=/var/run/pen1.pid

CONTROLPORT1=8888

VIRTUAL_ADDR="10.197.207.80"

VIRTUAL_ID=19

CHROOTDIR=/chroot/pen

LBSERVER1=80

SERVER1=10.197.196.98:80

SERVER2=10.197.196.80:80

case "$1" in

start)

echo -n "Starting VRRP: "

vrrpd -i eth0 -v $VIRTUAL_ID $VIRTUAL_ADDR

echo "OK"

if -x /bin/pen; then

echo -n "Starting pen: "

/bin/pen -C $CONTROLPORT1 -X -l $LOGFILE1 -p $PIDFILE1 $LBSERVER1 $SERVER1 $SERVER2

echo "OK"

fi

;;

stop)

kill `cat /var/run/pen1.pid`

killall vrrpd

;;

*)

echo "usage: $0 { start | stop}" >&2

exit 1

;;

esac

Any ideas much appreciated.

0 Kudos
Botux
Contributor
Contributor

Hi,

I have ESX 3.5 too and I can't install Hercules on my ESX 3.5.0

I have installing Workstation (Evalutation) to import Hercules from torrents to ESX but I have an "error internal" to wizard.

And when I trying to "vmkfs-tools -i", I have an "error" because the hard is IDE and not SCSI. but I don't know how to do it !

I have read all the POST but .... can you help me please Smiley Happy

Thanks

JCB

0 Kudos
soudertech
Enthusiast
Enthusiast

I am having the same issue!

William D. Souder

Director, Network Operations

Information Security Officer

Office for Information Technology

Berry College

706.236.5099 (o)

706.676.4205 (m)

706.238.7880 (f)

This message was sent from a BlackBerry wireless device, please excuse any typos and brevity.

Live long and virtualize...!
0 Kudos
hicksj
Virtuoso
Virtuoso

prabhakar,

Thank you for putting this appliance together! Nothing like installing a redundant, load shared infrastructure in under an hour.

Now for some testing. While I can see that taking down one VM (or just dropping pen on the primary vrrp node), things failover to the other hercules node just fine... I'd like a way to check the status of the active vrrpd & pen services. Doesn't seem to be much available from the /bin/pen & /sbin/vrrpd commands. I guess I'll have to go read docs or something Smiley Wink

Cheers!

Edit: I just found penctl, and that helps. I then compiled pen on one of my network management boxes and can use penctl.cgi to remotely monitor pen's status.

0 Kudos
pixiel
Contributor
Contributor

Thanks for this.

Great Virtual Appliance Smiley Happy

0 Kudos
markdjones82
Expert
Expert

I am unable to download from the appliance site. How do we obtain a copy of this?

http://www.twitter.com/markdjones82 | http://nutzandbolts.wordpress.com
0 Kudos