Home » Server Options » RAC & Failsafe » RAC 11g R2 + listener configuration (Oracle RAC, 11g R2)
RAC 11g R2 + listener configuration [message #474314] Sun, 05 September 2010 06:42 Go to next message
killersan
Messages: 7
Registered: September 2010
Junior Member
First of all i would like to say hello to all, great job on forum, i mean i found here many helpfull posts, but to the topic:

I installed Oracle RAC 11g R2, with database in rac configuration:
1. I got two diferent tnsnames.ora listener.ora files, one set in Oracle product database directory and the second in crs directory, is it a correct ?

2. The default listener.ora file in crs directory has only few lines after installation:
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent

I didn't have tnsnames.ora file there

3. I setted the listener.ora in database home directory as follows:
LISTENER_INST2 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = cougar2-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.128.152)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

LISTENER_INST1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = cougar1-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.128.151)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

and tnsnames.ora
inst.lan =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = cougar)(PORT = 1521))
  (LOAD_BALANCE = YES)
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = inst.lan)
   (FAILOVER_MODE =
   (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)
   )
  )
 )

INST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar2-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar1-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = INST.LAN)
    )
  )

LISTENERS_INST =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar2-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar1-vip)(PORT = 1521))
  )

INST2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar2-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = INST.LAN)
      (INSTANCE_NAME = INST2)
    )
  )

INST1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar1-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = INST.LAN)
      (INSTANCE_NAME = INST1)
    )
  )

where:
INST - instance name
INST.LAN - global database name
inst.lan - service name, configured by enterprise manager
cougar1 - node1
cougar2 - node2
cougar - SCAN name
all hosts defined in DNS, SCAN too.

Now the situation is dificult to describe:
i can connect from any node to any instance i want:
[oracle@cougar2 ~]$ sqlplus sys@inst1 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 5 13:29:42 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
inst1


[oracle@cougar2 ~]$ sqlplus sys@inst2 as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 5 13:30:54 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
inst2


or by global sid inst which balanced my connection randomly to inst1 or inst2:

[oracle@cougar2 ~]$ sqlplus sys@inst as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Sep 5 13:33:17 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
inst2


Now i can connect from non RAC host to any node, for example using SQL Developer - Basic connection type, but only to specific node, so when i insert:
Hostname: cougar1
Port: 1521
SID: inst1
or
Service Name: inst.lan

or
Hostname: cougar2
Port: 1521
SID: inst2
or
Service Name: inst.lan

the problem is when i insert SCAN name:
Hostname: cougar
Port: 1521
SID: inst
or
Service Name: inst.lan

then i mostly have an error "The network adapter could not estabilish the connection".
Mostly, because there are two moments when i got connection success.
When crs services are down, and i'm doing:
crs_start -all
then while starting services, right after this line:
Attempting to start `ora.registry.acfs` on member `cougar1`
and this line:
Attempting to start `ora.registry.acfs` on member `cougar2`

Any ideas would be helpfull.
Maybe i got something in my listener configuration ?

[Updated on: Sun, 05 September 2010 06:43]

Report message to a moderator

Re: RAC 11g R2 + listener configuration [message #474315 is a reply to message #474314] Sun, 05 September 2010 07:53 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I think you may have misunderstood the listener architecture in 11.2. The idea is that you have two layers of listeners: scan listeners that do load balancing, and node listeners that do spawn-and-bequeath. All listeners must run from the clusterware homes. Your instances register with the scan listeners with their remote_listener parameter, and with their node listener with the local_listener parameter. You should never be specifying the node VIP in your tnsnames file, always the scan listener virtual name. You should not use an address list in the tnsnames file, just the one address for the scan listener and rely on your DNS to load balance across them. I did try to describe this in a blog article a few months ago, http://orafaq.com/node/2369
Does this help?
Re: RAC 11g R2 + listener configuration [message #474318 is a reply to message #474315] Sun, 05 September 2010 08:49 Go to previous messageGo to next message
killersan
Messages: 7
Registered: September 2010
Junior Member
Yes, i understand it, but at the end i got problem with connect.
I saw Your blog article, it's clear for me what You wrote in it, but still if i put in sql developer in the hostname my scan name: cougar in my example i got an error, if i put the name one of the node then it's working fine.
So i think that i got problem in comunication nodes listeners - scan
Could You post a listener and tnsnames example configuration for me to clear what is wrong in my configuration ?
BTW You mentioned that i should configure my listeners only in crs home, so should i move my configurations from database home to crs home i mean the lines from tnsnames and listeners ?
Re: RAC 11g R2 + listener configuration [message #474380 is a reply to message #474318] Mon, 06 September 2010 01:19 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
As I said,Quote:
All listeners must run from the clusterware homes.
If I were you, I would rely on the automatic configuration, using DHCP and GNS.
It looks to me as though you are trying to use 10g techniques with 11.2, and you shouldn't do that. For example, crs_start is deprecated. You might want to attend the Oracle Uni "RAC and Grid Foundation Admin" course which covers all the new networking facilities. I'm running it for Oracle in London this week.
Re: RAC 11g R2 + listener configuration [message #474422 is a reply to message #474314] Mon, 06 September 2010 05:37 Go to previous messageGo to next message
killersan
Messages: 7
Registered: September 2010
Junior Member
I was on Oracle 10G RAC Administration Course, now I can go on:
Oracle Database 11g: RAC Administration (5 days)
or
Oracle Database 11g: RAC Administration Release 2 (3 days)
Unfortunetly in Poland first course is unavailable right now.
In Your opinion, which course will cover this listener/network/LB topics better ?

Anyway, is there any chance You could post examples of listener.ora and tnsnames.ora from both layers, because i need to just run it, after that i will have much more time for training.
Re: RAC 11g R2 + listener configuration [message #474590 is a reply to message #474422] Tue, 07 September 2010 07:33 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
There are some file listings here,
http://www.orafaq.com/forum/m/449918/148813/#msg_449918
but they won't help you, because you are trying to fiddle around with things that are automated in 11.2. You should not be trying to edit these files.
Neither of the courses you mention is correct, you need D59999GC10, your local Oracle Uni will be able to advise.
Re: RAC 11g R2 + listener configuration [message #474620 is a reply to message #474590] Tue, 07 September 2010 10:58 Go to previous messageGo to next message
killersan
Messages: 7
Registered: September 2010
Junior Member
I see, so about courses i'll try to contact with Oracle Training / Learning Dept so they put me in the schedule with this course You mentioned. Thx for Your opinion.

About listeners configuration, so i created new database called testtest via dbca - cluster database option ofc.
After db creation i got new lines in my tnsnames.ora but in the database home directory not in crs home directory.

TESTTEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cougar)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testtest.lan)
    )
  )


But still i got same situation i can connect from another non RAC host using any of node hostname: cougar1, cougar2 and service name testtest.lan but can't connect using SCAN name cougar.
I have to admit that in my external dns configuration my SCAN has one IP.
The same situation i got with connection, i got connection success twice while i'm starting crs services.

After those tests i even created the service_name called testtest.lan via enterprise manager, but this doesn't help.

Maybe there are some logs from which i can tell what is wrong in my configuration ?
Re: RAC 11g R2 + listener configuration [message #474623 is a reply to message #474314] Tue, 07 September 2010 11:10 Go to previous messageGo to next message
killersan
Messages: 7
Registered: September 2010
Junior Member
And one more thing, according Your link i think i got some problem with SCAN1 listener:

i got lines in my listener.ora in crs home directory:
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent

but when i'm trying to check those SCAN1 Listener status:

[oracle@cougar1 ~]$ /usr/oracle/app/11.2.0/grid/bin/lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 07-SEP-2010 18:00:19

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

TNS-01101: Could not find service name LISTENER_SCAN1


and:
[oracle@cougar1 ~]$ /usr/oracle/app/11.2.0/grid/bin/lsnrctl status testtest.lan

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 07-SEP-2010 18:01:01

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cougar)(PORT=1521))(LOAD_BALANCE=YES)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=testtest.lan)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                07-SEP-2010 11:05:08
Uptime                    0 days 6 hr. 56 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /usr/oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /usr/oracle/app/11.2.0/grid/log/diag/tnslsnr/cougar1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.128.50)(PORT=1521)))
Services Summary...
Service "inst.lan" has 2 instance(s).
  Instance "inst1", status READY, has 1 handler(s) for this service...
  Instance "inst2", status READY, has 1 handler(s) for this service...
Service "instXDB.lan" has 2 instance(s).
  Instance "inst1", status READY, has 1 handler(s) for this service...
  Instance "inst2", status READY, has 1 handler(s) for this service...
Service "testtest.lan" has 2 instance(s).
  Instance "testtest1", status READY, has 1 handler(s) for this service...
  Instance "testtest2", status READY, has 1 handler(s) for this service...
Service "testtestXDB.lan" has 2 instance(s).
  Instance "testtest1", status READY, has 1 handler(s) for this service...
  Instance "testtest2", status READY, has 1 handler(s) for this service...
The command completed successfully
Re: RAC 11g R2 + listener configuration [message #474624 is a reply to message #474623] Tue, 07 September 2010 11:43 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
For the third time, you have messed things up by trying to manage the environment using techniques that are not appropriate for 11.2. You have created listeners that are not under clusterware control, which will break the environment.
Get rid of all your attempts to interfere with the environment, and rely on the clusterware to manage it. That is what the clusterware is for.
I can't say anything else. Over and out.
Re: RAC 11g R2 + listener configuration [message #474632 is a reply to message #474624] Tue, 07 September 2010 13:26 Go to previous message
killersan
Messages: 7
Registered: September 2010
Junior Member
I know the theory, but in this case dbca shoule create complete working configuration, according to Your words, but it doesn't work, i didn't put those lines for testtest manually, dbca did it in tnsnames.ora file.

Still thx for replies and Your time John.
Previous Topic: enable_global_dynamic_endpoint parameter, endpoints_listener.ora file
Next Topic: Unable to communicate with CRS services
Goto Forum:
  


Current Time: Fri Mar 29 00:49:08 CDT 2024