I recently faced the issue that I could not access EM express for a non CDB .
- I found out the https port no. for EM express using following query:
select dbms_xdb_config.gethttpsport from dual;
GETHTTPSPORT
------------
5500
- Tried to access EM express by entering following URL in the browser:
https://<hostname>:5500/em
- Got the following error message:
Unable to connect
Firefox can’t establish a connection to the server at em12.example.com:5501.
- I checked if my database was registered with default listener
[oracle@em12 bin]$ lsnrctl stat
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=em12.example.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary…
Service “em12rep” has 1 instance(s).
Instance “em12rep”, status READY, has 1 handler(s) for this service…
Service “em12repXDB” has 1 instance(s).
Instance “em12rep”, status READY, has 1 handler(s) for this service…
The command completed successfully
– The output clearly shows that my database orcl is not registered with the default listener running on port 1521.
- I checked the parameter local_listener for my database
SQL> sho parameter local_listener
NAME TYPE VALUE
———————————— ———– ——————————
local_listener string LISTENER_ORCL
– Checked the entry for LISTENER_ORCL in $ORACLE_HOME/network/admin/tnsnames.ora
– It showed a listener named LISTENER_ORCL at port 1522
[oracle@em12 bin]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = em12.example.com)(PORT = 1522))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = em12.example.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
– Created a listener LISTENER_ORCL in $OARCLE_HOME at port 1522 by adding following lines to listener.ora
[oracle@em12 bin]$ vi $ORACLE_HOME/network/admin/listener.ora
LISTENER_ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = em12.example.com)(PORT = 1522))
)
– Started listener LISTENER_ORCL
[oracle@em12 bin]$ lsnrctl stat listener_orcl
– Registered database with LISTENER_ORCL
SQL> alter system register;
– Checked that database has been successfully registered with LISTENER_ORCL
[oracle@em12 bin]$ lsnrctl services listener_orcl
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=em12.example.com)(PORT=1522)))
Services Summary…
Service “orcl” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
Handler(s):
“DEDICATED” established:0 refused:0 state:ready
LOCAL SERVER
Service “orclXDB” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
Handler(s):
“D000″ established:8 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: em12.example.com, pid: 7014>
(ADDRESS=(PROTOCOL=tcp)(HOST=em12.example.com)(PORT=59034))
The command completed successfully
- Tried to access EM express by entering following URL in the browser:
https://<hostname>:5500/em
I could successfully access database login page.
Conclusion:
If you want to access EM-express for a database registered with non-default listener (say LISTENER1),
– Create an entry for listener (LISTENER1) in tnnames.ora
– Set parameter LOCAL_LISTENER to listener (LISTENER1)
I hope this post was helpful.
Your comments and suggstions are always welcome.
References:
http://www.oracle.com/technetwork/database/manageability/emx-intro-1965965.html#A5
http://www.oracle.com/technetwork/database/manageability/emx-cdb-1965987.html
——————————————————————————————-
Related Links:
12c: Access EM Express for CDB / PDB / Non-CDB
Error : NMO not setuid-root (Unix Only)