Solve ORDS was unable to make a connection to the database
Many Oracle APEX developers & users encountered ORDS 503 Service Unavailable problems like:
- ORDS was unable to make a connection to the database. This can occur if the database is unavailable, the maximum number of sessions has been reached or the pool is not correctly configured. The connection pool named: |apex|| had the following error(s): ORA-28000: The account is locked.
- ORDS was unable to make a connection to the database. This can occur if the database is unavailable, the maximum number of sessions has been reached or the pool is not correctly configured. The connection pool named: |apex|| had the following error(s): ORA-28001: the password has expired
- The username or password for the connection pool named: |apex||, are invalid, expired, or the account is locked.
- The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings has been correctly configured.
The Problem:
Those errors were raised because of the Password management-related profile. Since APEX public accounts are assigned to the DEFAULT profile and the PASSWORD_LIFE_TIME Parameter for the DEFAULT Profile is: 180 days means APEX accounts reached the limit and Passwords expired/ account locked.
The Solution:
to solve the problem, changed the passwords of APEX Accounts and unlock those accounts:
alter user APEX_PUBLIC_USER identified by password account unlock;
alter user APEX_LISTENER identified by password account unlock;
alter user APEX_REST_PUBLIC_USER identified by password account unlock;
alter user ORDS_PUBLIC_USER identified by password account unlock;
NOTE:
Be sure that the new passwords for APEX accounts are the same passwords you set at the time of installing ORDS, otherwise you will get an error:
The username or password for the connection pool named |apex||, are invalid, expired, or the account is locked.
By the way, if you didn't file or remember those passwords, you must do validating ORDS by:
C:\Program Files\Java\jdkx.x.x
\bin>java -jar C:\ords\ords.war validate
where C:\Program Files\Java\jdkx.x.x
\bin is your JAVA locationand C:\ords\ords.war is your ORDS location.
But after 180 days the problem will raise again. So, to make sure this will not happen again, create a new profile with unlimited PASSWORD_LIFE_TIME and assign APEX accounts to the new profile:
create profile apex_profile
limit PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED;
alter user apex_public_user profile apex_profile ;
alter user apex_rest_public_user profile apex_profile ;
alter user apex_listener profile apex_profile ;
alter user ords_public_user profile apex_profile ;
This will ensure ORDS connection to the database related to the Password management problems will not raise again.
Great Eng. Abdulkareem, Many Thanks.
ReplyDelete