1830238 Members
9909 Online
109999 Solutions
New Discussion

virtual hosts

 
SOLVED
Go to solution

virtual hosts

Good morning.
We have a 2 nodes Tru64 cluster and we would configure three virtual hosts, one for the cluster and one for each node.
We added three entries to the DNS and /etc/hosts containing the new IPs and hostnames.

From my client:
>ping gesau004v

Pinging gesau004v.it.mobile.marconi.com [10.31.239.244] with 32 bytes of data:

Request timed out.
Request timed out.

>telnet gesau004v
Connecting To gesau004v...Could not open a connection to host on port 23 : Connect failed

Why did pinging and telnet fail?
I have not registered the virtual hostnames with cluamgr.
Could this be the problem? If yes, should I use this command just for
the cluster virtual hostname, or for all virtual hostnames?

Thanks.
Giuseppe
13 REPLIES 13
Vladimir Fabecic
Honored Contributor

Re: virtual hosts

Hello
What do you mean "We added three entries to the DNS and /etc/hosts containing the new IPs and hostnames."?
DNS and /etc/hosts entries are just for address resolving.
In your case you MUST create those IP aliases using cluamgr.
I can give you instructions if neded.
In vino veritas, in VMS cluster
Al Licause
Trusted Contributor

Re: virtual hosts

Please explain the steps you used on the cluster members to create the aliases. You're on the right track by assuming that you probably didn't complete all of the steps necessary to fully register and configure the cluster aliases.

Normally this would involve two cluamgr commands. The first to declare the alias and the second to restart routing services which make the aliases available to anyone outside of the cluster:

cluamgr -a alias={alias_name},join
cluamgr -r restart

Don't forget to add the first command to /etc/clu_alias.config if you want these aliases to start on reboot. Or both commands to a caa script if they will be started on demand.
Ivan Ferreira
Honored Contributor

Re: virtual hosts

You must use cluamgr to create new cluster aliases (or virtual hosts for you).

Add the entry for the new alias en /etc/hosts:

On each member run:

/usr/sbin/cluamgr -a alias=hostname.example.com,rpri=2,selw=3,selp=1,join,virtual=f


Add the lines in /etc/clu_alias.config

See the cluamgr man page for a description of the parameters.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: virtual hosts

Hi guys.
I am a little bit confused about the commands I should execute

Here is what I have:

Cluster virtual hostname=gesau003v
(it should redirect to node1 or node2 with the same probability);
node1 virtual hostname=gesau004v;
node2 virtual hostname=gesau005v.

What are the exact commands and should I execute the same commands on each node?

Thanks a lot.
Giuseppe









Ivan Ferreira
Honored Contributor
Solution

Re: virtual hosts

On node1 run:

/usr/sbin/cluamgr -a alias=clugesau003v,rpri=2,selw=3,selp=1,join,virtual=f

On node2 run:

/usr/sbin/cluamgr -a alias=clugesau003v,rpri=1,selw=3,selp=1,join,virtual=f

The priority are the same (selp) and you will get 3 connections to one server (selw) then will go to the other server. Node1 will manage the routing for the aliase (rpri)
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vladimir Fabecic
Honored Contributor

Re: virtual hosts

Default cluster alias is just an IP alias taken by node that was booted first. In most cases it is useless.
If you want that alias redirects to node1 or node2 with the same probability, you should use DNS round-robin (which is prefered method for me) or metric+loadbroker.
These limitations are caused by limitations of IP protocol itself.
What will this cluster be used for (Oracle RAC, web server ...)?
In vino veritas, in VMS cluster

Re: virtual hosts

The cluster will be used as an Oracle RAC DB server.

Ivan, why don't I have to execute:

/usr/sbin/cluamgr -a gesau004v ...
/usr/sbin/cluamgr -a gesau005v ... ?

How does the network know that gesau004v is node1?

Thanks.
Giuseppe




Ivan Ferreira
Honored Contributor

Re: virtual hosts

The syste knows the node because you are executing the command on that node, and the alias=clugesau003v is the virtual host that you want to create/join.

For example:

node1 192.168.1.1
node2 192.168.1.2

Alias 192.168.1.3

When you run on node1, you are telling that you want to join to alias 192.168.1.3.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: virtual hosts

Sure.
But the hostname for node1 is not gesau004v:
it is gesau004.
..and hostname for node2 is not gesau005v:
it is gesau005.

gesau004 and gesau004v have different IP.
gesau005 and gesau005v have different IP.

Do you understand what I mean?
Bye Ivan.
Giuseppe



Johan Brusche
Honored Contributor

Re: virtual hosts


On gesau004

ifconfig eeN alias ip-of-gesau004v netmask xxx.yyy.z00

On gesau003

ifconfig eeN alias ip-of-gesau003v netmask xxx.yyy.z00

Put above commands in /etc/inet.local for reuse at next reboot.

Rgds,

____ Johan./

_JB_
Ivan Ferreira
Honored Contributor

Re: virtual hosts

If what you want is to have two IP's on the same machine use Johan's recommendation.

If you want to have 1 IP for the two machines and balance the load, use cluamgr.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: virtual hosts

Thanks a lot.
Have a nice day.

Giuseppe


Re: virtual hosts

Hi.
I ran cluamgr for each virtual host and fixed the problem.

Bye.
Giuseppe