Monday 16 July 2018

TNS-12543: TNS:destination host unreachable in CentOS


[oracle@jcraju admin]$ tnsping proddbp 9
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 13-JUL-2018 08:25:46
Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = jcraju.prod.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = proddb)))
TNS-12543: TNS:destination host unreachable

Solution:
As a root user stop iptables service
--> service iptables save
--> service iptables stop
--> chkconfig iptables off

check tnsping if it's not working
check selinux status and change it to disabled
#cat /etc/selinux/config
SELINUX=disabled

#reboot server
Check firewall status and stop it
--> systemctl status firewalld
--> systemctl stop firewalld


[oracle@jcraju ~]$ tnsping proddbp 4
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 16-JUL-2018 06:54:08

Copyright (c) 1997, 2016, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = jcraju.prod.com)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = proddb)))
OK (10 msec)
OK (0 msec)
OK (10 msec)
OK (0 msec)

No comments:

Post a Comment