Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle Linux 9 - nginx ssl error when being used as reverse proxy

EJ-EgyedSep 16 2022 — edited Sep 16 2022

I am attempting to use an Oracle Linux 9 instance provisioned through Oracle Cloud with nginx as a reverse proxy to access my instance of APEX (also running through an Autonomous Database on Oracle Cloud).
The problem is that when accessing my application through the reverse proxy, I am getting responses like this for some POST requests:

{
   "code": "ServiceUnavailable",
   "title": "Service Unavailable",
   "message": "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: |ocid1.tenancy.oc1..aaaaaaaah2gqv3fcl5txuwvfi2qw727bge48ho3n72g4whfq4prvhzvp4gga-dbeetp|re| had the following error(s): Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Universal Connection Pool internal error: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLRecoverableException: No more data to read from socket",
   "type": "tag:oracle.com,2020:error/ServiceUnavailable",
   "instance": "tag:oracle.com,2020:ecid/93ce646d9b4312cb991a89065eb6f1ac"
}

The main page of the application loads, but specific elements like Jet charts do not load. Also, the Page Designer when logged in as an APEX Developer does not load properly.
The reverse proxy is set up using nginx 1.20.1 (latest available through default repos) and OpenSSL 3.0.1 (latest available through default repos) and is set up with HTTPS using a certificate from LetsEncrypt. When requests are made to my application, These errors appear in /var/log/nginx/error.log:

2022/09/16 12:35:54 [crit] 56527#56527: *1427 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while reading upstream, client: 100.4.85.31, server: apex.mydomain.com, request: "POST /ords/wwv_flow.ajax?p_context=charts/bar/113139755499672 HTTP/1.1", upstream: "https://130.35.147.61:443/ords/wwv_flow.ajax?p_context=charts/bar/113139755499672", host: "apex.mydomain.com", referrer: "https://apex.mydomain.com/"

The problems do not appear when using the URL provided by Oracle Cloud to access my APEX instance. Anyone have any ideas on how to fix?

Comments
Post Details
Added on Sep 16 2022
0 comments
1,004 views