Friday, November 6, 2020

TNS-12547: TNS:lost contact

Dear Team, 


Recently we have experienced connectivity issue between application node to DB node on database port which set to 1526.


Though listener is up and running on db node, we couldn't able to connect to apps and says "TNS lost Contact". 


Tried to ping from application node and eventually failed and telnet connection immediately closed.


NONPROD [******* ~]$ telnet kialampnldb01.******.**** 1526


Trying 10.174.129.6...


Connected to kialampnldb01.******.****.


Escape character is '^]'.


Connection closed by foreign host.


NONPROD [******* ~]$ tnsping KAMPK


TNS Ping Utility for Linux: Version 10.1.0.5.0 - Production on 06-NOV-2020 21:26:48


Copyright (c) 1997, 2003, Oracle.  All rights reserved.


Used parameter files:


/u01/app/*******/KAMPK/fs1/inst/apps/KAMPK_kialampnlap01/ora/10.1.2/network/admin/sqlnet_ifile.ora


Used TNSNAMES adapter to resolve the alias


Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=kialampnldb01.******.****)(PORT=1526)) (CONNECT_DATA= (SERVICE_NAME=KAMPK) (INSTANCE_NAME=KAMPK)))


TNS-12547: TNS:lost contact


NONPROD [******* ~]$


===========


Hence, its clearly know, we might have unwanted entries in sqlnet.ora file. Hence we checked on DB node and found below two entries.


tcp.validnode_checking = yes


tcp.invited_nodes=(kialampnldb01.******.****)


We commeneted above in sqlnet.ora and restarted listener then application was able to connect to DB and able to telnet.


To know about tcp parameters in sqlnet.oracle. kindly see below oracle document.


https://docs.oracle.com/en/database/oracle/oracle-database/18/netrf/parameters-for-the-sqlnet-ora-file.html#GUID-5C3AB641-7541-4CE9-BC9E-BA5DD30616A8


5.2.75 TCP.INVITED_NODES