patternMinor
Oracle client throwing ORA-12541: TNS:no listener
Viewed 0 times
tnslistenerthrowingclientora12541oracle
Problem
when i was trying to connect my remote server as-
it shows me this error-
I have checked my listener, it is running
tnsnames.ora file contain -
listener.ora file contain
sqlnet.ora file contain-
Oracle home path -
Oracle base path -
i have set environment variable
```
[root@roracle bin]# env | sort
}
_=/bin/env
CVS_RSH=ssh
G_BROKEN_FILENAMES=1
HISTCONTROL=ignoredups
HISTSIZE=1000
HOME=/root
HOSTNAME=roracle
sqlplus SYSTEM/oracle@192.168.0.171:1521/kannelit shows me this error-
SQL*Plus: Release 11.2.0.2.0 Production on Fri Nov 15 15:36:52 2013
copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12541: TNS:no listenerI have checked my listener, it is running
[root@roracle bin]# ./lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-NOV-2013 15:42:24
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refusedtnsnames.ora file contain -
KANNEL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = kannel)
)
)listener.ora file contain
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = kannel)
(ORACLE_HOME = /opt/u01/app/product/11.2.0/dbhome_1)
(SID_NAME = kannel)
)
)
LISTENER=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
)sqlnet.ora file contain-
SQLNET.AUTHENTICATION_SERVICES= (ALL)
NAMES.DIRECTORY_PATH= (TNSNAMES,ONAMES,HOSTNAME)Oracle home path -
$ORACLE_HOME=/opt/u01/app/product/11.2.0/dbname_1Oracle base path -
$ORACLE_BASE=/opt/u01/appi have set environment variable
```
[root@roracle bin]# env | sort
}
_=/bin/env
CVS_RSH=ssh
G_BROKEN_FILENAMES=1
HISTCONTROL=ignoredups
HISTSIZE=1000
HOME=/root
HOSTNAME=roracle
Solution
Could it be that you have started the listener process as root? I can see you are trying lsnrctl status as user root, so please make sure that you start the listener process as the oracle user, and then start the database (also as the Oracle user)
Also if you get "Connected to an idle instance", this means that you are connecting to an instance that is not running, or you have set the environment wrong for connecting to the instance you want to connect to.
Make sure you have the Oracle software directory in your path, such as /u01/app/oracle/product/11.0/dbhome_1/bin
and ORACLE_SID set to the database instance name.
Also if you get "Connected to an idle instance", this means that you are connecting to an instance that is not running, or you have set the environment wrong for connecting to the instance you want to connect to.
Make sure you have the Oracle software directory in your path, such as /u01/app/oracle/product/11.0/dbhome_1/bin
and ORACLE_SID set to the database instance name.
Context
StackExchange Database Administrators Q#53380, answer score: 4
Revisions (0)
No revisions yet.