I'm trying to get Oracle Database 11g Express set up on my server so that it is accessible from the outside. I can talk to the DB locally using SQLPlus, so the database is definitely running. I think my issue is with the listener.

Here's what I'm getting:

$ lsnrctl start

LSNRCTL for Linux: Version - Production on 27-AUG-2012 16:14:38

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

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

TNS-12537: TNS:connection closed
 TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed
   Linux Error: 29: Illegal seek

I've tried two solutions I found online, and neither seemed to work. The first, from dba-oracle.com, suggests changing tcp.validcode_checking=yes to tcp.validnode_checking=no in sqlnet.ora. There was no such line, so I added it, and no luck. My sqlnet.ora is otherwise unchanged from when I installed. Note that this referred to version 10.2.

The second suggested adding localhost.localdomain localhost to /etc/hosts, which I did, again with no change. No processes are listening on port 1521 (netstat -aopn | grep 1521 returns nothing).

Any suggestions would be most welcome.


It seems I misunderstood what I was looking at. The sqlnet.ora file is in the samples directory, so it's not actually being read by the listener. Instead it is using the listener.ora file, which looks like this:

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

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


The tnsnames.ora file looks like this:

XE =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

      (SID = PLSExtProc)

These are again the files that came with the application. Is there something I need to change here?

migrated from stackoverflow.com Aug 28 '12 at 19:18

This question came from our site for professional and enthusiast programmers.

  • Start with a basic tnsnmaes.ora file and remove your sqlnet.ora file (make a backup before deleting it). – steve Aug 28 '12 at 5:15
  • 1
    What Linux distribution (edit your post with lsb_release -a output)? Are you running lsnrctl start as the oracle user? Can you edit your question with your full /etc/hosts file and the output of ifconfig -a? If you move your current tnsnames.ora and listener.ora files to a temporary directory and try starting the listener again with lsnrctl start, the listener should still start - if it doesn't we know it's an installation problem & not an Oracle config problem – Philᵀᴹ Aug 28 '12 at 20:54

I was having the exact same problem, searched a lot and tried about everything suggested (like setting /etc/hosts correctly).

In my case (OEL6, 11gR2 XE) it was solved with the following:

export LD_BIND_NOW=1

  • I got this error trying to set the trace level to 16 (support). This solution was the only way I could turn on tracing at the level required by support. – Leigh Riffel Sep 9 '14 at 19:53

This thread is pretty old, but I also hit upon the same issue. This can be resolved by adding below line in /etc/hosts. localhost.localdomain localhost

I had removed this line accidently, therefore, I was getting the error while starting the listener after the installation of the DB. Also, the listener was not created automatically and I had to add the listener.


This issue has been reported to be a tnsnames.ora file issue. Split the files into different ora files and try with each of them. Clean up the file and retype it either using simple Text editor or tools like Toad or SQL Developer.

  • I edited my question with tnsnames.ora contents and a better idea of what's going on. Thanks for your help! – andronikus Aug 28 '12 at 15:50

I had the same issue and nothing of the above helped. In my case it was just an invalid domain (= no domain). Once I changed from localhost to localhost.localdomain (in /etc/hostname and sysconfig) everything worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.