Oracle 11g XE listener does not start automatically during boot

11-30  Source: Network gathering  Views:1 

Advertisement
Hi,
This happened to me recently I just wanted to share it with you.
For development I was running Standard Edition, at some point I decided to run also XE on the same server for another reasons. Everything was working fine, except that after restart of the server, the XE listener is not starting automatically. Debugging the startup script I found that this happens because of a bug in the code, which assumes that XE listener is running if it finds the word LISTENER within the processes list. I didn't found any obligation in the docs for running XE without any other databases on the same host.
In file /etc/init.d/oracle-xe, at line 556 the code is failing:
1     + status='oracle 2889 1 0 May13 ? 00:00:05 /oracle/ora112se/bin/tnslsnr LISTENER -inherit'
2     + '[' 'oracle 2889 1 0 May13 ? 00:00:05 /oracle/ora112se/bin/tnslsnr LISTENER -inherit' == '' ']'
As you can see I have another listener(the one for SE) running and because of the XE startup script found the keyword LISTENER it’s supposing that the XE LISTENER is already running.
To fix this simply change line 556 from:
1     status=`ps -ef | grep tns | grep oracle`
To:
1     status=`ps -ef | grep tns | grep oracle | grep xe`
Now XE listener is started automatically during boot.
Sve
Blog: http://sve.to
Twitter: sgyurov
I though the same thing, but XE LISTENER is running on localhost and port 1522. On the other hand XE have local_listener explicitly set to the very same connection descriptor. Even XE installation was second on this server.
I've could change that yes, but the startup script doesn't seemed to have this mind.
Regards,
Sve
Related articles