Hi everyone,
Hope you all are doing great!
It’s been a while since my last post.
Well, today I’m going to share about an issue you all can get it when using RAC.
This issue happened on September 2024, client was running on 19.24 version.
Long story short, we build a 2-nodes RAC to support a bank/financial application, client was performing the tests, where the application was pointing to the SCAN address, and they ran in the following error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
This means that the DB services were failing to register in the SCAN Listeners.
This sounded weird for us, as all the configuration was looking fine.
We double-checked the entire configuration, and everything appears to be in order.
As per client standards, they don’t have the initialization parameter REMOTE_LISTENER using EZCONNECT-style string. Instead, they use a tnsnames.ora entry.
So, we decided to enable the trace for LREG process and see what was happening:
Note that the command below only works on 18c and higher:
Connected with a privileged user (DBA), perform the following commands to enable LREG registration:
alter system set events=’trace[LREG] disk highest’;
alter system set events=’immediate trace name LREG_STATE level 3′;
alter system register;
After this, you will be able to find a file for LREG process, example:
/u01/app/oracle/diag/rdbms/db_rac/PREPROD2/trace/PREPROD2_lreg_21024.trc
Output truncated to make reading better:
#—————————————-
Remote listeners:
0 - (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scan.client.org)(PORT=1522))) pdb 0 dci 0 flg 0x22
firewall=0, publish_service_acl=0
state=1, err=0
nse[0]=0, nse[1]=0, nte[0]=0, nte[1]=0, nte[2]=0
ncre=0
endp=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scan.client.org)(PORT=1522)))
flg=0x0 nse=12542 pri=0x7ff727ded770
1 - (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scan.client.org)(PORT=1521))) pdb 0 dci 0 flg 0x22
firewall=0, publish_service_acl=0
state=1, err=0
nse[0]=0, nse[1]=0, nte[0]=0, nte[1]=0, nte[2]=0
ncre=0
endp=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scan.client.org)(PORT=1521)))
flg=0x0 nse=12542 pri=0x7ff727ded1c0
#—————————————-
We can see the following string in the trace:
nse=12542
So, error is:
ORA-12542: TNS:address already in use
Weird, uh? How the address (SCAN) can be already in use?
We found a note that explains what is going on:
———–
The error nse=12542 occurred because PMON did not interpret the hostname "scan" into 3 unique ip addresses.
———–
This was the TNS entry client was using:
SCAN_LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = scan.client.org)(PORT = 1521))
)
To avoid this error, we need to change the TNS entry to point to the 3 SCAN VIP’s instead the SCAN host:
IP changed to obfuscate real info:
SCAN_LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.12)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.13)(PORT = 1521))
)
This change must be done in all cluster nodes.
After changing, run the following command in all DB instances served by the SCAN Listeners in the cluster:
alter system register;
Doing this change, client was able to connect to DB without issues.
To disable the LREG tracing:
alter system set events=’trace[LREG] disk disable’;
Notes that are useful:
SCAN Registration Issue: Services Fail to Register to SCAN Listeners (Doc ID 1448717.1)
How to Trace Dynamic Registration from PMON or LREG (12c) (Doc ID 787055.1)
Bug 12946495 : SERVICES FAIL TO REGISTER TO ALL SCAN LISTENERS
Hope it helps!
Peace!
Vinicius
Related posts
Disclaimer
My postings reflect my own views and do not necessarily represent the views of my employer, Accenture.