APEX url not working .. Issue with XDB services not getting registered with the listener.
SQL> select dbms_xdb.gethttpport() from dual;
DBMS_XDB.GETHTTPPORT()
----------------------
8020
SQL> show parameter shared_servers;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_shared_servers integer
shared_servers integer 1
SQL> alter system register;
System altered.
SQL> select * from dba_errors;
no rows selected
SQL> select count(*) from dba_objects where owner='XDB' and status='INVALID';
COUNT(*)
----------
0
SQL> select comp_name, status, version from DBA_REGISTRY where comp_name='Oracle XML Database';
COMP_NAME
--------------------------------------------------------------------------------
STATUS VERSION
-------------------------------------------- ------------------------------
Oracle XML Database
VALID 12.2.0.1.0
SQL> exec dbms_xdb.sethttpport(8020);
PL/SQL procedure successfully completed.
SQL> alter system register;
System altered.
SQL> show parameter dispatchers
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=prodapexXDB)
max_dispatchers integer
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_PRODAPEX
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=prodapex)(port=1521))';
System altered.
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=prodapex)(port=1521))
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@prodapex product]$ lsnrctl stop prodapex
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.203)(PORT=1521)))
The command completed successfully
SQL> startup
Total System Global Area 1.0066E+10 bytes
Fixed Size 12169992 bytes
Variable Size 2248150264 bytes
Database Buffers 7784628224 bytes
Redo Buffers 21381120 bytes
Database mounted.
Database opened.
[oracle@prodapex product]$ lsnrctl start prodapex
Starting /u01/app/oracle/product/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/prodapex/prodapex/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.4.203)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.203)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias prodapex
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 01-FEB-2018 21:40:32
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/prodapex/prodapex/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.4.203)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "prodapex" has 1 instance(s).
Instance "prodapex", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
SQL> alter system register;
System altered.
[oracle@prodapex product]$ lsnrctl status prodapex
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.203)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias prodapex
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 01-FEB-2018 21:40:32
Uptime 0 days 0 hr. 1 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/prodapex/prodapex/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.4.203)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=prodapex.example.com)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/prodapex/xdb_wallet))(Presentation=HTTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=prodapex.example.com)(PORT=8020))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "prodapex" has 1 instance(s).
Instance "prodapex", status UNKNOWN, has 1 handler(s) for this service...
Service "prodapex.example.com" has 1 instance(s).
Instance "prodapex", status READY, has 1 handler(s) for this service...
Service "prodapexXDB.flex.com" has 1 instance(s).
Instance "prodapex", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@prodapex product]$
After this steps URL started working fine.
Thanks,