Oracle Case 04 - TNS-12547: TNS:lost contact

Keywords: Oracle Linux Database firewall

Oracle database server DG can not complete data synchronization after restarting from the database. The specific error information is as follows:

I. Misinformation

alter log error reporting

***********************************************************************

Fatal NI connect error 12547, connecting to:

  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.3.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
  Time: 23-APR-2018 10:30:45
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12547

TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 517

TNS-00517: Lost contact
    nt secondary err code: 104
    nt OS err code: 0
Error 12547 received logging on to the standby
FAL[client, USER]: Error 12547 connecting to LOGDB for fetching gap sequence

2. Analysis of the Causes of Errors

According to the error information, we can see that there are some problems in connecting logdb service name through tns. We can monitor whether the logdb service name is started and whether there are firewall restrictions.

3. Processing steps

By checking and monitoring and firewall restrictions, no problem was found. The main library was connected normally by tns service name, and the slave library was reported by tnsping.

[oracle@dg ~]$ tnsping logdb

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 23-APR-2018 11:26:28

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 1xx.xx.xx.xx)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = logdb)))
TNS-12547: TNS:lost contact

The slave library checks through the IPaddr 1521 port of the telnet main library and finds that the connection is directly closed

# telnet  1xx.xx.xx.xx 1521   
Trying 1xx.xx.xx.xx...
Connected to 1xx.xx.xx.xx.
Escape character is '^]'.
Connection closed by foreign host.

It can be concluded that the problem of monitoring is basically determined here. After specific inspection, only sqlnet.ora has made the monitoring restriction.

tcp.validnode_checking=yes
tcp.invited_nodes=(ip1,ip2,ip3,ip4,ip5,ip6)

Add the standby IP to the list of allowable access, then check the connection through tnsping, and then restore the master-standby synchronization manually.

(DG primary and standby synchronous recovery process brief)

Posted by gigamike187 on Tue, 05 Feb 2019 09:24:16 -0800