Link to home
Start Free TrialLog in
Avatar of aravindgopaluni
aravindgopaluni

asked on

Linux: TNS Listener not starting

Hi,

Installed Oracle XE in RH 5.6 x64 using 'oracle-xe-11.2.0-1.0.x86_64.rpm.zip'.

After installation, I was able to connect to db using local sqlplus.
However, when tried to establish a connection from a remote host, connection failed.
Further looking into the oracle installed server, I found that LISTENER is not running and 1521 port is not listening.

Tried to start the listener using 'lsnrctl start' command, below is the output:

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 12-JUL-2012 20:09:30

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

Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/gopar01-VM47438/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gopar01-VM47438.ca.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                12-JUL-2012 20:09:31
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/gopar01-VM47438/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gopar01-VM47438.ca.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


However, listener is not running. Please find below the listener.ora file:

# listener.ora Network Configuration File:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = gopar01-VM47438)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)


Appreciate your help in this regard. I want to start the listener service and use oracle from a remote server.

Regards,
Aravind G
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

The status shows the listener is actually running.  The XE database isn't registered with it.

Log in locally to the XE database with sqlplus and do:
alter system register;

Then do the:  lsnrctl status  and see if XE is being listened for.
Avatar of aravindgopaluni

ASKER

Hi,

Thanks for your inputs. However, I am seeing the below error with lsnctl status after executing 'alter system register' in SQLPLUS.

-------------------------------------------
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 12-JUL-2012 20:49:26

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
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=gopar01-VM47438)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
----------------------------------

Please advise.

Regards,
Aravind G
Ok, now the listener isn't started.

What happens with a lsnrctl start?

The the register of XE.
Hi,

Lsnectl start gives the same message as in my first post :(
Hi,

Could you move listener.ora file:

As oracle user:

lsnrctl stop
mv /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora.old
lsnrctl start

Open in new window


Since V10.1, no listener.ora is required to start the listener; if you are willing to accept standard default values (like port=1521).

Best regards.

Vincent.
Hi Vincent,

Thanks for your inputs. I renamed the listener.ora file and started listener, still getting the same error

bash$lsnrctl stop

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

bash$mv listener.ora listener.ora.old
bash$lsnrctl start
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Log messages written to /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/gopar01-VM47438/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gopar01-VM47438.ca.com)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                13-JUL-2012 08:48:56
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/gopar01-VM47438/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gopar01-VM47438.ca.com)(PORT=1521)))
The listener supports no services
The command completed successfully

bash$ lsnrctl status

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

Open in new window


Regards,
Aravind G
Hi, can you post content of /etc/hosts ? and $ORACLE_HOME/network/admin/sqlnet.ora if exist ?


Best regards.

Vincent.
Vincent,

I cant locate the file '$ORACLE_HOME/network/admin/sqlnet.ora' in my server.
However, below is how my /etc/hosts file look like...

#127.0.0.1      <hostname>.<domain>.com  <hostname> localhost.localdomain   localhost
#::1    <hostname>.<domain>.com  <hostname> localhost6.localdomain6 localhost6
<IP>               <hostname>.<domain>.com  <hostname>

-Aravind G
ASKER CERTIFIED SOLUTION
Avatar of vincenteam
vincenteam
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Vincent,

Thank you, it worked. I uncommented the line in /etc/hosts file and reinstalled OracleXE.

After this reinstall, listener started successfully.

Appreciate your help

Regard,
Aravind G