Forum Stats

  • 3,784,355 Users
  • 2,254,928 Discussions
  • 7,880,790 Comments

Discussions

Linux: ORA-12543: TNS:destination host unreachable


If i"m trying to login to my DB via SQLplus I get this error below but if i enter the same credentials when being prompted again, then it does log me in...

sqlplus [email protected]/ECR

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jun 26 12:59:55 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.

ERROR:

ORA-12541: TNS:no listener



Enter user-name: ecr

Enter password:

Last Successful login time: Sat Jun 26 2021 12:59:46 +01:00

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>




I am able to login fine with sqlplus / as sysdba directly:

sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Jun 26 12:57:58 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>


Also here is the lsnrctl status


LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 26-JUN-2021 13:01:32

Copyright (c) 1991, 2016, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=etcentos.otxlab.net)(PORT=1521)))

TNS-12543: TNS:destination host unreachable

 TNS-12560: TNS:protocol adapter error

 TNS-00513: Destination host unreachable

  Linux Error: 113: No route to host

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

------------------------

Alias           LISTENER

Version          TNSLSNR for Linux: Version 12.2.0.1.0 - Production

Start Date        26-JUN-2021 12:51:05

Uptime          0 days 0 hr. 10 min. 28 sec

Trace Level        off

Security         ON: Local OS Authentication

SNMP           OFF

Listener Parameter File  /oracle/product/12.2.0/db_1/network/admin/listener.ora

Listener Log File     /oracle/diag/tnslsnr/etcentos/listener/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=etcentos.otxlab.net)(PORT=1521)))

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "ECR" has 1 instance(s).

 Instance "ECR", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully


So my listener is started and listening, wondering what the problem could be here?

This leads me the my application not being able to connect to databse:

ERR 26.06.21 12:50:19.657 ....... OraDBConnection::CheckErr OraDBConnection.cxx-184 Other OCI_ERROR: 12543, ORA-12543: TNS:destination host unreachable


Note: This was working before fine without me doing anything different. I also have a snapshot where the my application is connected to DB fine but as soon as i restart, this problem pops out.

Answers