Total Pageviews

Saturday 22 November 2014

RAC listener Commands

[grid@RAC1 ~]$ ps -ef|grep LISTENER

grid      4008     1  0 00:36 ?        00:00:00 /u01/app/11.2.0.3/grid_11203/bin/tnslsnr LISTENER -inherit
grid      4179     1  0 00:39 ?        00:00:00 /u01/app/11.2.0.3/grid_11203/bin/tnslsnr LISTENER_SCAN1 -inherit


oracle Local listener:

lsnrcl status check run in grid home :  check the user who is running listerner from ps -ef output:

[grid@RAC1 ~]$ lsnrctl status LISTENER_SCAN1
[grid@RAC1 ~]$ lsnrctl status LISTENER

[grid@RAC1 admin]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac2


[grid@RAC1 admin]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac2
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac2

[oracle@RAC1 ~]$ show parameter listener
------------------------------------------
local_listener     string (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.81)(PORT=1521))))
remote_listener     string RAC-SCAN.localdomain:1521

GRID_HOME:
cd $ORACLE_HOME/network/admin/
cd /u01/app/11.2.0.3/grid_11203/network/admin

cat $GRID_HOME/network/admin/listener.oracle
---------------------------------------------

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent

Listener Log File         /u01/app/grid/diag/tnslsnr/RAC1/listener/alert/log.xml


cat $GRID_HOME/network/admin/endpoints_listener.ora
----------------------------------------------------
LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.71)(PORT=1521)(IP=FIRST)))) # line added by Agent

Listener Log File: $GRID_HOME/log/diag/tnslsnr/RAC1/listener_scan1/alert/log.xml


[grid@RAC1 admin]$ srvctl config scan
SCAN name: RAC-SCAN.localdomain, Network: 1/192.168.56.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /RAC-SCAN.localdomain/192.168.56.91
SCAN VIP name: scan2, IP: /RAC-SCAN.localdomain/192.168.56.92
SCAN VIP name: scan3, IP: /RAC-SCAN.localdomain/192.168.56.93

[grid@RAC1 admin]$ srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521

[grid@RAC1 admin]$ crsctl status resource -w 'TYPE = ora.scan_vip.type' -t
NAME           TARGET      STATE        SERVER                   STATE_DETAILS    
-------------------------------------------------------------------------------
ora.scan1.vip    1        ONLINE        ONLINE                    rac1                                      
ora.scan2.vip    1 `       ONLINE       ONLINE    rac2
ora.scan3.vip    1        ONLINE        ONLINE                    rac2


NODE RAC2:

[grid@RAC2 ~]$ ps -ef|grep LISTENER

[grid@RAC2 admin]$ crsctl status resource -w 'TYPE = ora.scan_vip.type' -t
NAME           TARGET      STATE        SERVER                   STATE_DETAILS    
-------------------------------------------------------------------------------
ora.scan1.vip    1        ONLINE        ONLINE                    rac1                                      
ora.scan2.vip    1 `       ONLINE       ONLINE    rac2
ora.scan3.vip    1        ONLINE        ONLINE                    rac2

[grid@RAC2 ~]$ ps -ef|grep LISTENER

grid      3948     1  0 00:35 ?        00:00:00 /u01/app/11.2.0.3/grid_11203/bin/tnslsnr LISTENER_SCAN3 -inherit
grid      3950     1  0 00:35 ?        00:00:00 /u01/app/11.2.0.3/grid_11203/bin/tnslsnr LISTENER_SCAN2 -inherit
grid      4016     1  0 00:35 ?        00:00:00 /u01/app/11.2.0.3/grid_11203/bin/tnslsnr LISTENER -inherit

Compare Scan on both nodes:
----------------------------
[grid@RAC1 admin]$ cluvfy comp scan  

Issue #3: Service not registered with SCAN listener after SCAN listener failover:

After SCAN VIP and SCAN listener failover, instance does not register with the SCAN listener. It might happen for only 1 of the scan listener. Client connection
gets intermittent ORA-12514 TNS:listener does not currently know of service requested in connect descriptor.

Cause:
1. Unpublished Bug 12659561 after scan listener failover, database instance might not register to the scan listener (refer Note 12659561.8), fixed in 11.2.0.3.2,
merge patch 13354057 for 11.2.0.2 available for certain platform.
2. Unpublished Bug 13066936 Instance does not register services when scan fails over (refer Note 13066936.8)

Solution:

1) For both above bugs, the workaround is to unregister and register remote listener on the database instance which does not
register to a SCAN listener with following steps.
show parameter remote_listener
alter system set remote_listener='';
alter system register;
alter system set remote_listener='<scan>:<port>';
alter system register;
2) Other points to check if service is not registered with SCAN listener:
a. remote_listener and local_listener is defined correctly
b. EZCONNECT is defined in sqlnet.ora, eg: NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
c. SCAN name is defined in /etc/hosts or DNS and whether there is any mismatch if it is defined in both places
d. nslookup <scan> should display SCAN VIP in round-robin fashion
e. do not set SECURE_REGITER_<listener> in listener.ora if the class of secure transports (COST) is not configured.



11G R2: Oracle Cluster SCAN Listeners: Use easy connect naming method
=========================================================

Just recently I came across another unclear error message while troubleshooting an Oracle Instance registration with SCAN Listener. This post is one of the posts which may save quite a bit of time for people who will hit the same issue.

The errors message I got configuring a database just moved to run under 11GR2 Oracle Cluster control is as following:

1
2
3
4
5
6
7
8
9
10
SQL> alter system set remote_listener='scan.usolygrid-prod.cinram.com:1521';
alter system set remote_listener='scan.your.domain.com:1521'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00119: invalid specification for system parameter REMOTE_LISTENER
ORA-00132: syntax error or unresolved network name
'scan.your.domain.com:1521'

SQL>
I was quite sure that the syntax I used was 100% correct as other instances running on the same host used the same remote_listener parameter value.

It appears that someone adjusted the following string in sqlnet.ora file on the server:

1
2
3
4
from
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
to
NAMES.DIRECTORY_PATH= (TNSNAMES)
The change makes sense to me as it always good to have strict control on where tns names are sourced from on the servers side.

However it appears that Oracle use an easy connect naming method to register Oracle Instances in SCAN Listeners by default. Therefore EZCONNECT keyword should be present in sqlnet.ora file. Strictly speaking you can use other tns names as the resolution method for the remote_listener parameter but by default it uses the easy connect naming method and you may face the error message shown above if you omit the EZCONNECT keyword.

Top 5 Issues That Cause Troubles with Scan VIP and Listeners (Doc ID 1373350.1)
--------------------------------------------------------------------------------

1 comment:

  1. Jadwal Pertandingan Ayam SV388 7 Maret 2019 - Minggu, Ujung Pandang 10 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete