Thursday, June 09, 2011

Solved: oracle XE web-interface not working

I recently installed Oracle XE on a laptop to play around with. I installed the latest version of Oracle Linux and downloaded the Oracle XE database. After installation all was working fine, including the web-interface you get when you install Oracle XE.

After shutting down the laptop and starting it again the next day for some reason the web interface was not working. Connecting to http://localhost:8080 was resulting in a 404 error page meaning the page could not be found.

After some looking into my listening ports I found that no service was listening on port 8080. Checking the Oracle database listener gave the first clue:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 09-JUN-2011 11:10:25
Uptime 0 days 0 hr. 12 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(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

the status command within lsnrctl stated clearly that PLSExtProc was having some trouble. Issue is that if you configure your machine to make use of DHCP and do not state a hostname and you come to a network where the DHCP server will provide you with a hostname the hostname is not matching with the hostname set during the installation of the Oracle XE database.

Solution to this is to state a hostname and do not let your DHCP server push one towards you. After changing this you have to change the content of listener.ora and tnsnames.ora to make sure the hostname matches with the newly entered hostname. When done do a force-reload (or stop and start) of /etc/init.d/oracle-xe.

When you have done those steps you can request the status again via lsnrctl and you will see something like the below outcome. You can also open a browser and connect to localhost:8080 and you should see the web-interface. a.k.a. Problem solved.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 09-JUN-2011 11:28:44
Uptime 0 days 0 hr. 0 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=johanlinux.capgemini.nl)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>

3 comments:

Sunil Choudhary said...

Hi Johan

Nice article.

How did you get the nice formatting with line number et al.

Is it a feature of Blogspot ??

thanks
Sunil

Johan Louwers said...

I use some java script and css formatting for this.. if you look around on the web you can find al kind of flavors which will e able to do this for you. I guess this one is coming from http://beautifulbeta.blogspot.com/

Paul said...

What's the procedure for these steps?

Solution to this is to state a hostname and do not let your DHCP server push one towards you. After changing this you have to change the content of listener.ora and tnsnames.ora to make sure the hostname matches with the newly entered hostname. When done do a force-reload (or stop and start) of /etc/init.d/oracle-xe.

thanks!