Wednesday, March 29, 2023

503 - The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked

503 - The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked

This article will help you in two ways, 
1) Update the ords_public_user password
2) Resolve 503 error - The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked. Changing weblogic port after deploying ORDS on Oracle WebLogic Server

Initially, we installed and configured weblogic with default port i.e. 7001. ORDS was deployed on weblogic. After that we wanted to change the weblogic port from 7001 to 8080 to run the APEX. After changing port ORDS stop working and throwing below error, 

<Mar 17, 2023, 12:27:27,801 PM India Standard Time> <Error> <oracle.dbtools.rest> <BEA-000000> <<54319e0f-61e7-44fc-8213-a6a5965fdc41-00000070> GET 10.132.141.180 /ords/ 503 The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked
ServiceUnavailableException [statusCode=503, logLevel=SEVERE, reasons=[The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked]]
        at oracle.dbtools.http.errors.ServletResponseExceptionMapper.mapError(ServletResponseExceptionMapper.java:45)
        at oracle.dbtools.http.errors.ErrorLogger.log(ErrorLogger.java:27)
        at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:106)
        at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47)
        at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
        Truncated. see log file for complete stacktrace
Caused By: oracle.dbtools.common.jdbc.ConnectionPoolConfigurationException: The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked


I have cross check if my APEX and ORDS users are unlocked or not,

It seems, everything is fine, so why am I getting this error?
I thought if I could reset the password for all the users again that would help, but it didn't help me.

Next thought, when I was reading the error again it saying "The username or password for the connection pool named |default|lo|, are invalid, expired, or the account is locked". It means somewhere it is going wrong.

You know, ORDS config directory also stores the username and password. Here, my ORDS version is 22.4. And in this version you can find the cwallet.sso file under /u01/ords/conf/database/orcl directory. You might have some different directory structure based on your ORDS installation.

Here, I reset the password in ORDS as well with the following command.

Step 1 - Run this command from ords directory 
            > ords --config /u01/ords/conf config secret db.password
Step 2 - Restart the weblogic and hit the URL http://<ip address>:8080/ords again.

It works for me and I am able to get the APEX log-in screen.

You can refer to Jeff Smith's blog for additional resources about the above error for ORDS 22.4 and earlier versions.



Thanks & Regards,
Chandan Tanwani

503 Service Unavailable The connection pool named: |default|lo|, encountered and error: mismatch with the server cert DN:IO Error

503 Service Unavailable
The connection pool named: |default|lo|, encountered and error: mismatch with the server cert DN:IO Error


Hope you have gone through my previous post of ORDS : 404 not found.

Once I resolved above ORDS issue, I was getting error - 503 Service Unavailable
The connection pool named: |default|l0|, encountered and error: mismatch with the server cert DN:IO Error: The Network Adapter could not establish the connection (CONNECTION_ID=N6Ys81zJRmyqf8zuk6YrOg==)

This is really frustrating when you solve one error and immediately get another error and are stuck with no clue why it happened.

Below is the screenshot for the reference.


Also If you see the weblogic log file, you will see the below error.

<Mar 16, 2023, 11:53:01,891 AM India Standard Time> <Error> <oracle.dbtools.rest> <BEA-000000> <<5077f343-f438-4659-a682-f867ee715c88-0000001c> GET 10.132.141.180 /ords/ 503 The connection pool named: |default|lo|, encountered an error: mismatch with the server cert DN: IO Error: The Network Adapter could not establish the connection (CONNECTION_ID=N6Ys81zJRmyqf8zuk6YrOg==)
ServiceUnavailableException [statusCode=503, logLevel=SEVERE, reasons=[The connection pool named: |default|lo|, encountered an error: mismatch with the server cert DN: IO Error: The Network Adapter could not establish the connection (CONNECTION_ID=N6Ys81zJRmyqf8zuk6YrOg==)]]
        at oracle.dbtools.http.errors.ServletResponseExceptionMapper.mapError(ServletResponseExceptionMapper.java:45)
        at oracle.dbtools.http.errors.ErrorLogger.log(ErrorLogger.java:27)
        at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:106)
        at oracle.dbtools.http.filters.HttpFilter.doFilter(H




To resolve the the issue, I have followed below steps,
Step 1 - Check the TNS Entries on DB Server
Step 2 - Check listener is up and running. It serves your PDB database.
Step 3 - Check if TNS Ping working for your PDB

In my case all the above steps were working fine. There was no issue. If you have any issue in the above steps, first rectify the same.

Now, after cross checking all my installation documents and other things, I then found that user APEX_220200 was locked.
You can run the below command in your PDB/CDB and check if any of %APEX% users are locked or what. In my case APEX_220200 was locked.
select username, account_status from dba_users where username like '%APEX%';
Refer below screenshot


Unlock user and reset password with following command
sql> alter user apex_220200 identified by Manager#123 account unlock;


Also check any ORDS user is locked or what by running below query in database. 
select username, account_status from dba_users where username like '%ORDS%';


If the ORDSYS user is locked then no issue. No need to unlock it.


Finally, I was able to get the APEX login page after unlocking apex_220200 user.



Lesson learned, must check all the prerequisites and follow the Oracle documentation steps.



Thanks & Regards,
Chandan Tanwani

Tuesday, March 28, 2023

ORDS - 404 Not Found. The request could not be mapped to any database.

ORDS - 404 Not Found

"The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured."

When I hit the url http://<IP Address>:7001/ords/, I was getting the above error after installing ORDS and deploying it in Weblogic 14.1, and trying to access the APEX login page.

Here my ORDS version was 22.4.
Below is the screenshot for the reference.



The reason behind this error is ORDS war is deployed on Weblogic and it doesn't know where the system property of configured directory location.
to set the system property of configuration URL, we need to specify the same in the JAVA_OPTIONS parameter. Follow the following steps,

Prerequisites - Stop Weblogic server (Managed server if any and Admin Server). Just to share that in my case I was not having managed server.

Step 1 : export JAVA_OPTIONS="-Dconfig.url=/u01/ORDS/conf"
Above path is my ORDS conf file, this given while installing the ORDS.
Step 2 : Start weblogic, Admin Server and Managed Server if any.

Refresh or run again the url http://<IP Address>:7001/ords/

And you will get the login page of APEX. This is it.


Thanks & Regards,
Chandan Tanwani