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?
Best Answer
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