ORA-12547: TNS:lost contact

Issue:

Unable to connect to database via sqlplus using local authentication on a linux machine.

ukblx247_$ ps -ef | grep pmon
ora_vdis 9955 1 0 Nov 15 ? 130:32 ora_pmon_DIS1P
ora_vcms 11106 1 0 Nov 15 ? 75:15 ora_pmon_CMSP
ora_vcms 28057 1 0 Nov 15 ? 75:18 ora_pmon_CMSPP
ora_vcms 4416 4346 0 07:53:33 pts/7 0:00 grep pmon

cat /var/opt/oracle/oratab

DIS1P:/data/d151/app/oracle/product/10.2.0.5/db_1:N
CMSP:/data/d051/app/oracle/product/10.2.0/db_1:N
CMSPP:/data/d051/app/oracle/product/10.2.0/db_1:N

Getting the following error
ukblx247_$ . oraenv
ORACLE_SID = [DIS1P] ? CMSP
ukblx247_$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 – Production on Thu Apr 28 07:54:10 2016

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

ld.so.1: oracle: fatal: relocation error: file /data/d151/app/oracle/product/10.2.0.5/db_1/lib/libjox10.so: symbol joxjwt_: referenced symbol not found
ERROR:
ORA-12547: TNS:lost contact

 

Checks done:

Verified that the correct ORACLE_HOME , PATH and ORACLE_SID was set.

But still not able to connect.

ACLE_SID
CMSP
ukblx247_$ echo $ORACLE_HOME
/data/d051/app/oracle/product/10.2.0/db_1
ukblx247_$ echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/dt/bin:/bin:/usr/bin:/usr/ucb:/usr/sbin:/usr/openwin/bin:/usr/local/bin:/zoe/bin:/data/d151/app/oracle/product/10.2.0.5/db_1/bin:/data/d151/app/oracle/product/10.2.0/db_1/bin:/usr/ccs/bin:/usr/ucb:/opt/VRTSdbed/bin:/opt/VRTSvcs/bin:/usr/local/bin:/data/d051/app/oracle/product/10.2.0/db_1/bin

 

 

Fix:

listed all environment variables and it showed that the LD_LIBRARY_PATH is pointing to a different home on the server

ukblx247_$ env
_=/usr/bin/env
LC_MONETARY=en_GB.ISO8859-1
LC_TIME=en_GB.ISO8859-1
SSH_TTY=/dev/pts/7
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/dt/bin:/bin:/usr/bin:/usr/ucb:/usr/sbin:/usr/openwin/bin:/usr/local/bin:/zoe/bin:/data/d151/app/oracle/product/10.2.0.5/db_1/bin:/data/d151/app/oracle/product/10.2.0/db_1/bin:/usr/ccs/bin:/usr/ucb:/opt/VRTSdbed/bin:/opt/VRTSvcs/bin:/usr/local/bin:/data/d051/app/oracle/product/10.2.0/db_1/bin
zoe_logs=/zoe/logs
zoe_syslib=/zoe/syslib
ORACLE_BASE=/data/d051/app/oracle
zoe_shutdown=/zoe/shutdown
zoe_root=/zoe
EDITOR=vi
LOGNAME=ora_vcms
zoe_backup=/zoe/backup
zoe_util=/zoe/util
MAIL=/var/mail//ora_vcms
ORACLE_SID=CMSP
EPC_DISABLED=true
zoeini_dbuser=zoe/BZw7xw8h
USER=ora_vcms
LC_MESSAGES=C
LC_CTYPE=en_GB.ISO8859-1
zoe_temp=/zoe/temp
zoe_startup=/zoe/startup
SHELL=/bin/ksh
ORACLE_TERM=vt220
zoe_bin=/zoe/bin
HOME=/export/home/ora_vcms
LC_COLLATE=en_GB.ISO8859-1
LC_NUMERIC=en_GB.ISO8859-1
SSH_CONNECTION=10.54.82.123 50641 10.146.14.68 22
SSH_CLIENT=10.54.82.123 50641 22
LD_LIBRARY_PATH=/data/d151/app/oracle/product/10.2.0.5/db_1/lib:/usr/lib
TERM=xterm
ORACLE_HOME=/data/d051/app/oracle/product/10.2.0/db_1
PWD=/export/home/ora_vcms
TZ=GB
ORAENV_ASK=N

Changed the LD_LIBRARY_PATH to point to the correct home and tried connecting to the database and the issue was fixed.

ukblx247_$ export LD_LIBRARY_PATH=/data/d051/app/oracle/product/10.2.0/db_1/lib:/usr/lib

ukblx247_$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 – Production on Thu Apr 28 08:08:40 2016

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

 

 

 

About DeepaRaja
I'm a oracle DBA since 2008. I wanted to keep a record of the incidents I encounter at work and how I resolve them. Thought of keeping a blog so could be useful for someone else too.

Leave a comment