The document describes the steps required for modifying listener port numbers after cluster setup.
How to change SCAN listener port number
- On the first database node only, modify SCAN listener port number in CRS:
# su - grid $ srvctl modify scan_listener -p <new_scan_listener_port> $ srvctl stop scan_listener $ srvctl start scan_listener
- On each database node, update the following entry in
/etc/flashgrid-scan.cfg(as root):
From: scan_port: 1521
To: scan_port: <new_scan_listener_port>
- On each database node, restart FlashGrid SCAN Proxy service, and make sure that it is running successfully:
# systemctl restart flashgrid-scan-proxy.service # systemctl status flashgrid-scan-proxy.service
How to change local listener port number
- On each database node, modify port for
NodeFQDNentry in/etc/flashgrid-nodefqdn.ora(as oracle):
DONOTDELETE,NODEFQDN = (ADDRESS = (PROTOCOL = TCP)(Host = <database node hostname>)(Port = <new_local_listener_port>))Note: if /etc/flashgrid-nodefqdn.ora does not exist, create it and modify tnsnames.ora using the procedure described in Moving NodeFQDN records to a separate file. Then update the NodeFQDN entries following the steps above.
- On the first database node only, modify local listener port number in CRS:
# su - grid $ srvctl modify listener -p <new_local_listener_port> $ srvctl stop listener $ srvctl start listener
- On each database node, update
/etc/sysconfig/iptables(as root):
-
Remove immutable flag from iptables file:
# chattr -i /etc/sysconfig/iptables -
Modify value in
/etc/sysconfig/iptables:From:
--dport 1522To:
--dport <new_local_listener_port> -
Add immutable flag to iptables file:
# chattr +i /etc/sysconfig/iptables
- On each database node, restart iptables:
# systemctl restart iptables.service
- Run the command below as the fg user to set the local_listener parameter for all databases registered with clusterware:
$ flashgrid-set-local-listener-parameter-for-all-dbsOlder FlashGrid Cluster versions before 21.08 do not have the above command. If the above command is not available on your system, then log in to each database and run the following command:
SQL> ALTER SYSTEM SET LOCAL_LISTENER="NodeFQDN" scope=both sid='*';IMPORTANT! Do not replace the "NodeFQDN" parameter with a hostname. Please execute the command exactly as it is written.