TNS-12543: TNS:destination host unreachable

[oracle@lab03 admin]$ tnsping CDB12S06
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 15-JAN-2020 09:52:39
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lab02.intra.sito.it)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = CDB12S06.world)))
TNS-12543: TNS:destination host unreachable

oppure
/home/oracle> sqlplus sys/<password>@MY_TNS_ALIAS as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 4 08:16:53 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12543: TNS:destination host unreachable


Ho individuato alcuni problemi:
- configurazione generale del tnsnames.ora
- controllare che l'hostname nel file /etc/hosts del server indicato nella stringa del tnsnames.ora coincida con il nome indicato in HOST.
- controllare se il servizio di rete è attivo (su Centos 7)
# systemctl restart network
- verificare se il database è up
- controllare il Firewalla livello di host quindi il servizio firewalld oppure a livello di rete e quindi rivolgersi ai sistemisti di rete.

Nel mio caso avevo il firewall abilitato.
Ho risolto effettuando il flush delle regole del firewall e disabilitando il servizio firewall.
Su Centos7 questo deve esserci se abilitato il servizio firewald
#iptables -L

ACCEPT     tcp  --  anywhere             anywhere            state ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp multiport dports 5901:5903,6001:6003<====Need entry here for listener port 1521.

Se voglio effettuare il flush del firewall
#iptables -F
Se voglio invese stoppare il servizio di firewall a livelli di host.
# systemctl stop firewalld
# systemctl disable firewalld

Verifica:

[oracle@lab03 admin]$ tnsping CDB12S06
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 15-JAN-2020 09:58:03
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lab02.intra.sito.it)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = CDB12S06.world)))
OK (10 msec)

Post popolari in questo blog

Create e Drop Pluggable Database

ORA-12154: TNS: il listener non è attualmente a conoscenza del servizio richiesto nel descrittore di connessione