3 IP addresses, 2 apache instances, and trouble

3 IP addresses, 2 apache instances, and trouble

am 10.05.2007 00:58:28 von garey

Hi -

I have two machines that are clustered for high availability.
Services on one machine will fail over to the other by reassigning an
IP address from the NIC on the first machine to the NIC on the other.
On both machines, an instance of apache (1.3.xx) is set up that has
'Port 80', but not Listen or BindAddress in the configuration file.
sections listen to one IP address or another. We
configured apache this way because if 'Listen' is used, apache will
not start if the cluster IP (cluster_IP_one) is on the other machine.

Now, we want to have another service in the cluster, which means
another IP address (cluster_IP_two) moving between the machines. I
would like to have a dedicated apache instance move between the
machines along with the service, listening to cluster_IP_two that
moves with it. But an apache configured to listen to the new
cluster_IP_two address doesn't start, because the existing apache on
the machine is (I suspect) listening on all IPs.

So the problem is, how do I restrict the local instance of apache
so that it doesn't listen to the new cluster_IP_two address without
having to specifically tell it to listen to cluster_IP_one, which will
cause it to fail to start if cluster_IP_one is on the other machine?

Any help would be appreciated;

Garey Mills

Re: 3 IP addresses, 2 apache instances, and trouble

am 10.05.2007 03:30:23 von shimmyshack

On May 9, 11:58 pm, garey wrote:
> Hi -
>
> I have two machines that are clustered for high availability.
> Services on one machine will fail over to the other by reassigning an
> IP address from the NIC on the first machine to the NIC on the other.
> On both machines, an instance of apache (1.3.xx) is set up that has
> 'Port 80', but not Listen or BindAddress in the configuration file.
> sections listen to one IP address or another. We
> configured apache this way because if 'Listen' is used, apache will
> not start if the cluster IP (cluster_IP_one) is on the other machine.
>
> Now, we want to have another service in the cluster, which means
> another IP address (cluster_IP_two) moving between the machines. I
> would like to have a dedicated apache instance move between the
> machines along with the service, listening to cluster_IP_two that
> moves with it. But an apache configured to listen to the new
> cluster_IP_two address doesn't start, because the existing apache on
> the machine is (I suspect) listening on all IPs.
>
> So the problem is, how do I restrict the local instance of apache
> so that it doesn't listen to the new cluster_IP_two address without
> having to specifically tell it to listen to cluster_IP_one, which will
> cause it to fail to start if cluster_IP_one is on the other machine?
>
> Any help would be appreciated;
>
> Garey Mills

it feels like a strange setup, where you wish to bind services to
specific IP addresses but then change them while the services are
running.
The existing apache is listening on port 80, bound to as many IPs as
it can, which will be whatever the NIC is and a couple of others, so
use another port for the new apache, since you just cannot have two
apaches running on the same IP and on the same port, but you dont wish
to tell the apaches to use different IPs because of your particular
setup!!