Tuesday, September 20, 2022

Apex Loading Failed - 503 Service Unavailable or 404 Page not Found

Problem

When try to access Apex via URL 'https:/localhost/ords/pdb1' , following error occurred. 

404 Not found error with detail - The request could not be mapped to any database

The following errors may be seen in the web server related logs

ORA-01017: invalid username/password; logon denied (Associate with the HTTP-403 error.)

Cause

Either one of DB user APEX_PUBLIC_USER, APEX_LISTENER, APEX_REST_PUBLIC_USER, ORDS_PUBLIC_USER expired due to No non-expiry profile exist for the db user accounts

Cause

1. Connect to the container database follow the steps

SQL> ALTER SESSION SET container = CDB$ROOT;
SQL> select account_status from dba_users where username='ORDS_PUBLIC_USER';
SQL> Alter user ords_public_user identified by 'xxxx';
SQL> Alter user ords_public_user account unlock;

2. Connect to pluggable database and perform following steps

SQL> ALTER SESSION SET container = PDB1;
SQL> Alter user APEX_PUBLIC_USER identified by xxxx;
SQL> Alter user APEX_REST_PUBLIC_USER identified by xxxx;
SQL> Alter user APEX_LISTENER identified by xxxx;
SQL> ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
SQL> ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK;
SQL> ALTER USER APEX_LISTENER ACCOUNT UNLOCK;

3. Create profile and assign to users from Pluggable database

SQL> ALTER SESSION SET container = PDB1;
SQL> Create profile apex_public_profile limit password_life_time unlimited;
SQL> alter user apex_public_user profile apex_public_profile;
SQL> alter user apex_rest_public_user profile apex_public_profile;
SQL> alter user apex_listener profile apex_public_profile;
SQL> alter user ords_public_user profile apex_public_profile;

4. Restart ORDS

[root@wcsprd ~]# /etc/init.d/ords restart 
OR
[root@wcsprd ~]# /u01/app/oracle/product/ords/ords stop
[root@wcsprd ~]# /u01/app/oracle/product/ords/ords start
Reference

APEX Unavailable After the Expiration of the APEX_PUBLIC_USER Password - 503 Service Unavailable or 404 Page not Found (Doc ID 2058706.1)

No comments:

Post a Comment