Friday, July 10, 2009

Make Sure! RAC VIP configure, right?

when i implemented Oracle RAC and i used Virtual IP for connecting "but network ;) told me... find packets on both Virtual IP and Public IP"
Example:

service1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = service1)
)
)
why? I connected by virtual IPs;)

while connection from client; so i tested "tcpdump" on client and rac01/rac02 servers, and i found traffics/packets on Public IP and Virtual IP.

As "tcpdump" told me client connected by Virtual IP... But used Public IP to work.
client -> rac01-vip:1521
.
.
client -> rac01:1521.
.
.
What wrong?
So, checked on oracle rac "lsnrctl services":
$ lsnrctl services
.
.
.
Service "service1" has 2 instance(s).
Instance "db1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rac01)(PORT=1521))
Instance "db2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rac02)(PORT=1521))
"DEDICATED" established:8316 refused:0 state:ready
LOCAL SERVER
A mistake configuration about rac vip???
after I read "Oracle RAC — VIP Configuration Mistakes: by Alex Gorbache, i changed configuration:
-> listener.ora

rac01:
LISTENER_rac01 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521)(IP = FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01)(PORT = 1521)(IP = FIRST)))
)
)

rac02:
LISTENER_rac02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521)(IP = FIRST)))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02)(PORT = 1521)(IP = FIRST)))
)
)

-> tnsnames.ora on both nodes

LISTENERS_DB =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521))
)

LISTENERS_rac01 =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521))
)

LISTENERS_rac02 =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521))
)

-> DATABASE


rac01:

SQL> show parameter listener

NAME TYPE VALUE
-----------------------------------------------------------------
local_listener string LISTENERS_rac01
remote_listener string LISTENERS_DB

rac02:
SQL> show parameter listener

NAME TYPE VALUE
-----------------------------------------------------------------
local_listener string LISTENERS_rac02
remote_listener string LISTENERS_DB
(just example)

and then checked:
$ lsnrctl services
.
.
Service "service1" has 2 instance(s).
Instance "db1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rac01-vip)(PORT=1521))
Instance "db2", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=rac02-vip)(PORT=1521))
"DEDICATED" established:8316 refused:0 state:ready
LOCAL SERVER
after that, I tested connection from client by Virtual IPs again, and "tcpdump" dumped traffics/packets.
client -> rac01-vip:1521
.
.
client -> rac01-vip:1521.
.
.
I've not found traffics/packets on Public IP anymore.

2 ความคิดเห็น:

Pavan Kumar said...

Hi buddy,

I hoepe you remember me, Previous I thought to work on RAC about 1 yr and it was got delayed and finally time had come to do it. So i started working from RAC architecture and practicals. Installing RAC on vmware, but getting one Issue.

Could not able to ping from Either of Nodes on vmware

I check the firewalls and Ipaddress config every thing is fine but still some thing.

I thought you were there :-) so post a message to you. I don't your gmail to have online chat with you. I hope you can help me out in this regard.

Second, I request you prescribe good book for RAC, I am going through the documentation, but still.

Reply me back soon

- Pavan Kumar N

Surachart said...

can not ping Nodes on vmware.

did you ping IP or name?

Oracle RAC on VMWARE. I suggest you read on tim hall web.
http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnCentos4UsingVMware.php


Byt the way, Click ... my profile... you'll see my email.