Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 11.2.0.2.0 - 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 127.0.0.1 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.

Update

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_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 = localhost)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

The tnsnames.ora file looks like this:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

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

share|improve this question
    
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
    
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 –  FreshPhilOfSO Aug 28 '12 at 20:54
add comment

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

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

2 Answers

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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