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.

9 comments:

Unknown 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 Opun 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.

Anonymous said...

Could you please let me know how did you use tcpdump on Oracle client to test this..

-Yasser

Surachart Opun said...

@Yasser
I just dumped packet on Network Interface with 1521 port.

Example :
#tcpdump -ni eth0 port 1521

sandeep said...

***** etc\hosts content ***************
127.0.0.1 localhost
150.1.1.184 devdb1.velox.com devdb1
150.1.1.192 devdb2.velox.com devdb2
150.1.1 185 devdb1-vip.velox.com devdb1-vip
150.1.1.193 devdb2-vip.velox.com
10.0.0.4 devdb1-priv
10.0.0.5 devdb2-priv
***************************************


C:\oracle\product\10.2.0\crs\BIN>crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.devdb1.gsd application ONLINE ONLINE devdb1
ora.devdb1.ons application ONLINE ONLINE devdb1
ora.devdb1.vip application ONLINE ONLINE devdb1
ora.devdb2.gsd application ONLINE ONLINE devdb2
ora.devdb2.ons application ONLINE ONLINE devdb2
ora.devdb2.vip application ONLINE ONLINE devdb2

================error on NODE1==========
C:\oracle\product\10.2.0\crs\BIN>srvctl config nodeapps -n devdb1 -a
VIP exists.: /185/150.1.0.1/255.255.255.0/Public

changed the VIP , but still doesn't reflect VIP details

C:\oracle\product\10.2.0\crs\BIN>srvctl modify nodeapps -n devdb1 -A 150.1.1.185
/255.255.255.0

C:\oracle\product\10.2.0\crs\BIN>srvctl config nodeapps -n devdb1 -a
VIP exists.: /150.1.1.185/150.1.1.185/255.255.255.0

C:\oracle\product\10.2.0\crs\BIN>srvctl config nodeapps -n devdb2 -a
VIP exists.: /devdb2-vip/150.1.1.193/255.255.255.0/Public

C:\oracle\product\10.2.0\crs\BIN>srvctl start nodeapps -n devdb1
CRS-1006: No more members to consider
CRS-0215: Could not start resource 'ora.devdb1.vip'.
CRS-0210: Could not find resource ora.devdb1.LISTENER_DEVDB1.lsnr.

Please suggest

Surachart Opun said...

How are you ?
c:\ srvctl config nodeapps -n devdb1 -a
VIP exists.: /185/150.1.0.1/255.255.255.0/Public
Not sure with "185", that should be Virtual IP or ...devdb1-vip

About your command:

srvctl modify nodeapps -n devdb1 -A 150.1.1.185
/255.255.255.0

Please change to
C:\ srvctl modify nodeapps -n devdb1 -A devdb1-vip/255.255.255.0/Public

However you should check 150.1.1.184 be interface IP on 01
and your result should be
C:\ srvctl config nodeapps -n devdb1 -a
VIP exists.: /devdb1-vip/150.1.1.185/255.255.255.0/Public

sandeep said...

i'm good , thanx. How are you?

thanx for the reply !!
it seems to work now

srvctl modify nodeapps -n devdb1 -A 150.1.1.185/255.255.255.0/Public

But,

I have 2 concerns here

1> Yes you are right ,i'm clueless from where it picks "185" instead of IP address 150.1.1.185

2>when i'm trying to modify the VIP config using

srvctl modify nodeapps -n devdb1 -A 150.1.1.185/255.255.255.0/Public

if i replace devdb-vip in place of 150.1.1.185 it never takes.

I am clueless from where it picked the settings and why not allowing me to change configurations.

sandeep said...

Hi ,
Finally i managed to install my 2 node RAC DB with ASM.
But i see a small problem here

I see that OracleClusterVolumeServices missing

C:\Documents and Settings\dbadmin>net start |findstr Oracle
Oracle Object Service
OracleASMService+ASM2
OracleCRService
OracleCSService
OracleEVMService
OracleOraASM10g_home1TNSListenerLISTENER_DEVDB2
OracleRemExecService
OracleServiceDEVDB2

I am sure when we patch the clusterware in future it will pop up with an error.

Do we need to reinstall Clusterware and re-register the services or is there a way where only
OracleClusterVolumeServices can be installed???

Surachart Opun said...

Thank You for update your status.
However i don't perform with Oracle Cluster on windows.