At times it may be required to setup the cluster with all non-default values thus requiring to rename the default listener names. This post uses the 11gR2 RAC installation with role separation (with COST setup) and already has the listener and scan listener default ports changed.
Changing the scan listener name (read end of the post for known issue)
1. Current scan listener configuration is as follows
cat /opt/app/11.2.0/grid/network/admin/listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # 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=ON # line added by Agent WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /opt/app/11.2.0/grid/network/admin/cost) ) ) SECURE_REGISTER_LISTENER = (IPC,TCP) SECURE_REGISTER_LISTENER_SCAN1 = (IPC,TCPS) <---- part of COST2. New scan listener cannot be added while there are scan listeners already configured.
srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:9120/TCPS:1523 srvctl add scan_listener -l myscanlistener PRCS-1028 : Single Client Access Name listeners already exist3. To add a new scan listener remove the default scan listener first. When the new scan listener name is specified it's give only with the prefix of the scan listener name. There's no need to include the "SCAN", this will be added by the clusteware.
srvctl stop scan_listener srvctl remove scan_listener Remove scan listener? (y/[n]) y srvctl add scan_listener -l myscanlistener -p TCP:9120/TCPS:1523 srvctl config scan_listener SCAN Listener MYSCANLISTENER_SCAN1 exists. Port: TCP:9120/TCPS:1523Listener.ora file won't be modified at this stage. Entries related to new scan listener name will be added when the scan listener is started. The old scan listener entries will still be there on the listener.ora and must be manually removed. Listener.ora files across all nodes will be updated when the scan listener is started. The COST related scan listener entries must be manually changed
cat /opt/app/11.2.0/grid/network/admin/listener.ora # before scan listener start LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # 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=ON # line added by Agent WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /opt/app/11.2.0/grid/network/admin/cost) ) ) SECURE_REGISTER_LISTENER = (IPC,TCP) SECURE_REGISTER_LISTENER_SCAN1 = (IPC,TCPS) srvctl start scan_listener srvctl config scan_listener SCAN Listener MYSCANLISTENER_SCAN1 exists. Port: TCP:9120/TCPS:1523 srvctl status scan_listener SCAN Listener MYSCANLISTENER_SCAN1 is enabled SCAN listener MYSCANLISTENER_SCAN1 is running on node rhel6m1 cat /opt/app/11.2.0/grid/network/admin/listener.ora # after scan listener start MYSCANLISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MYSCANLISTENER_SCAN1)))) # line added by Agent LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # 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=ON # line added by Agent WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /opt/app/11.2.0/grid/network/admin/cost) ) ) SECURE_REGISTER_LISTENER = (IPC,TCP) SECURE_REGISTER_MYSCANLISTENER_SCAN1 = (IPC,TCPS) <--- must be changed manually ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MYSCANLISTENER_SCAN1=ON # line added by Agent4. Check the scan listener status
lsnrctl status MYSCANLISTENER_SCAN1 LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-JAN-2013 10:35:24 Copyright (c) 1991, 2011, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=MYSCANLISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias MYSCANLISTENER_SCAN1 Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 24-JAN-2013 10:34:57 Uptime 0 days 0 hr. 0 min. 27 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/app/11.2.0/grid/network/admin/listener.ora Listener Log File /opt/app/11.2.0/grid/log/diag/tnslsnr/rhel6m1/myscanlistener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=MYSCANLISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=192.168.0.91)(PORT=1523))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.91)(PORT=9120))) Services Summary... Service "std11g2" has 1 instance(s). Instance "std11g21", status READY, has 1 handler(s) for this service... Service "std11g2XDB" has 1 instance(s). Instance "std11g21", status READY, has 1 handler(s) for this service... The command completed successfully
Changing the listener name
1. To add the new listener name on the same port as the current default listener name -s option must be used. This will skip the port check if not an error will be thrown.
srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): rhel6m2,rhel6m1 srvctl add listener -l mylistener -p 9120 # without -s results in an error PRCN-2061 : Failed to add listener ora.MYLISTENER.lsnr PRCN-2065 : Port(s) 9120 are not available on the nodes given PRCN-2067 : Port 9120 is not available across node(s) "rhel6m1-vip,rhel6m2-vip" srvctl add listener -l mylistener -s -p 9120 srvctl config listener Name: MYLISTENER Network: 1, Owner: grid Home: <CRS home> End points: TCP:9120Before removing the default listener modify the asm configuration with the new listener. If not asm configuration will continue to use the old listener name and will report PRCA-1032: ASM Listener LISTENER Does Not Exist when srvctl config asm is run. It's important that this is done before the default listener is dropped if not the default listener need to be added and then new listener name is specified for the asm configuration. More on this is available on 1428284.1
srvctl modify asm -l MYLISTENER srvctl config asm ASM home: /opt/app/11.2.0/grid ASM listener: MYLISTENER2. Stop the default listener and remove it from the configuration.
srvctl stop listener -l listener srvctl remove listener -l listener3. The new listener name related entries are not added to the listener.ora file until the listener is restarted and update will be done across all nodes of the cluster. Similar to scan listener the old entries will still remain the listener.ora file and must be manually removed. At the same time also edit the COST related listener entry.
cat /opt/app/11.2.0/grid/network/admin/listener.ora # before listener start MYSCANLISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MYSCANLISTENER_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 WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /opt/app/11.2.0/grid/network/admin/cost) ) ) SECURE_REGISTER_LISTENER = (IPC,TCP) SECURE_REGISTER_MYSCANLISTENER_SCAN1 = (IPC,TCPS) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MYSCANLISTENER_SCAN1=ON # line added by Agent srvctl start listener -l mylistener cat /opt/app/11.2.0/grid/network/admin/listener.ora # after listener start MYLISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MYLISTENER)))) # line added by Agent MYSCANLISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MYSCANLISTENER_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 WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /opt/app/11.2.0/grid/network/admin/cost) ) ) SECURE_REGISTER_MYLISTENER = (IPC,TCP) <-- must be changed manually SECURE_REGISTER_MYSCANLISTENER_SCAN1 = (IPC,TCPS) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MYSCANLISTENER_SCAN1=ON # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MYLISTENER=ON # line added by Agent4. Listener status
lsnrctl status mylistener LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-JAN-2013 11:57:18 Copyright (c) 1991, 2011, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=MYLISTENER))) STATUS of the LISTENER ------------------------ Alias MYLISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 24-JAN-2013 11:51:49 Uptime 0 days 0 hr. 5 min. 29 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/app/11.2.0/grid/network/admin/listener.ora Listener Log File /opt/app/11.2.0/grid/log/diag/tnslsnr/rhel6m2/mylistener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=MYLISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.86)(PORT=9120))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.90)(PORT=9120))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM2", status READY, has 1 handler(s) for this service... Service "std11g2" has 1 instance(s). Instance "std11g22", status READY, has 1 handler(s) for this service... Service "std11g2XDB" has 1 instance(s). Instance "std11g22", status READY, has 1 handler(s) for this service... The command completed successfullyThis concludes the changing of listener and scan listener names.
Known Issues
There were no known application related issues after this listener name change. Application was able to connect (JDBC) using the scan ip. However running cluvfy comp healthcheck resulted in following error
ERROR: PRVG-0222 : Error establishing connection to database "std11g2". Verification will be skipped for this database. PRCQ-1000 : An error occurred while establishing connection to database with user name "cvusys" and connect descriptor: (DESCRIPTION = (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST = rhel6m-scan)(PORT = null)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = std11g2))) IO Error: The Network Adapter could not establish the connectionIt could be seen that it's trying to use the scan-ip but the port value is null. When the scan listener name is reverted back to the default value (LISTENER_SCAN1) then the cluvfy comp healthcheck continue without any errors. It cluvfy comp healthcheck depends on the default scan listener name. SR was raised regarding this. However Oracle couldn't confirm or deny that there are components depending on the scan listener name to be of the default format. Final reply for this SR was "I think you are the first person did this change. Since you have followed the steps to change the SCAN Listener using srvctl then it is fine." With a phone call Oracle confirmed the steps are indeed correct and there are no documents available (yet) detailing how to change scan listener name. For the time being the RAC setup work fine and had no adverse effect other than the cluvfy issue.
Related Post
Changing Listener and SCAN Listener Port in 11gR2 RAC
Useful metalink notes
PRCA-1032: ASM Listener LISTENER Does Not Exist On 11.2 SIHA/OHAS Configuration. [ID 1428284.1]