0
votes

I have installed Oracle database Express Edition 11g Release 2 for Linux x64 on my Linux Mint 17.3 system. The install process was successful. I am able to connect to database using sqlplus, create new user, execute commands etc. While configuring the database during install time, I used default ports i.e. 8080 and 1521. But I am unable to connect to APEX url i.e. localhost:8080/apex/f?p=4950 from my system. I have been trying to look for solutions for past few hours and could not find anywhere.

The output of lsnrctl command is as below:

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 06-MAR-2016 10:11:05

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                06-MAR-2016 08:58:41
Uptime                    0 days 1 hr. 12 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/iamharish15-HP-15-Notebook-PC/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=iamharish15-HP-15-Notebook-PC)(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

I did not modify any of the tnsnames.ora or listener.ora. Here are what those files reads like: listener.ora

# listener.ora Network Configuration File:

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 = iamharish15-HP-15-Notebook-PC)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

tnsnames.ora

# tnsnames.ora Network Configuration File:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = iamharish15-HP-15-Notebook-PC)(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)
    )
  )

And when I start SQL command line and login using connect to XE as below:

SQL> connect username/password@XE
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

But normally from the terminal, if I connect using sqlplus username/password I connect successfully. I think I must get XE and XEXDB services to run but so far I haven't been able to. Any help in this regard will be very helpful. Thanks in advance.

1
Please have a look at: zyxware.com/articles/2008/12/24/…Br. Sayan
I don't think it applies to my case. In my case, no ip has changed and moreover, lsnrctl status returns no error/failure messages. but it's the absence of (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW)) line that I feel has something to do with this XE service not running causing apex web interface to be unavailable. But I am not sure how to fix it and I don't want to mess up everything just to fix apex thing.iamharish15

1 Answers

2
votes

After hours of "googling" and some "binging", I finally could resolve my issue. Here is what I did to resolve my issue:

  1. alter system set local_listener = '(ADDRESS=(PROTOCOL=TCP)(HOST=iamharish15-HP-15-Notebook-PC)(PORT=1521))' scope = both;

The step #1 resolved the XE and XEXDB services not showing issue and after that when I ran lsnrctl status both XE and XEXDB services were showing up and I could login using Command line SQL tool with username/password@XE command. But still the APEX web interface was not available.

  1. Then I updated tnsnames.ora and listener.ora files to have entries for XEXDB and a DESCRIPTION entry with Presentation = HTTP line.

tnsnames.ora

# tnsnames.ora Network Configuration File:

XE =
  (DESCRIPTION =
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = iamharish15-HP-15-Notebook-PC)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

XEXDB =
  (DESCRIPTION =
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 8080))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XEXDB)
    )
  )

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

listener.ora

# listener.ora Network Configuration File:

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 = iamharish15-HP-15-Notebook-PC)(PORT = 1521))
    )
    (DESCRIPTION = 
      (ADDRESS = (PROTOCOL = tcp)(HOST = 127.0.0.1)(PORT = 8080))(Presentation = HTTP)(Session = RAW)
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

After that I reloaded their values using the below command:

/etc/init.d/oracle-xe force-reload

And this resolved the issue and I could connect to APEX web interface and create new workspace, user etc.