Skip to Main Content

Apex 21.2 BUG: apex_web_service.make_request HTTPS end-of-input reached only on first call

massi_cicDec 10 2021 — edited Dec 10 2021

Hi all,
We are using the APEX 21.2 API APEX_WEB_SERVICE.make_request to call a webservice in HTTPS: but running it the first time, after 70 seconds Oracle returns an error of end-of-input reached.
After this error, calling the same procedure we get the correct response from webservice immediately, every subsequent time.
If we don't run the procedure on the machine for 40 mins more or less, the same error comes up again, even though after the procedure apex_web_service.make_request we call APEX_CUSTOM_AUTH.LOGOUT
No matter the certificate we are using, we tried both with a correct and an expired certificate. The behaviour is the same as described.

We tried:
Using another tool like Postman to make the same POST call: we have the correct reply from webservice every time.
Calling the same webservice in Httpd with apex_web_service.make_request, it works correctly evert time.
Using another machine with Apex 20.2 installed, the procedure apex_web_service.make_request works correctly every time, even if the first time takes 50 seconds to get the response (using HTTPS).
Looks like the problem exists in apex 21.2.
Oracle side - error stack:

ORA-29273: HTTP request failed
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 1663
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 782
ORA-29259: end-of-input reached
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1148
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 756
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 1546
ORA-06512: at "APEX_210200.WWV_FLOW_WEB_SERVICES", line 1685
ORA-06512: at "APEX_210200.WWV_FLOW_WEBSERVICES_API", line 396
ORA-06512: at "APEX_210200.WWV_FLOW_WEBSERVICES_API", line 441

Server side conditions:
Apache httpd 2.2.15 running on Linux Redhat 6.5
Behind this there is a proxy then the application frontend with Tomcat
We are using TLS 1.2, opened to all SSL versions.
Server side error trace:

[Mon Dec 06 15:36:58 2021] [debug] ssl_engine_kernel.c(1884): OpenSSL: Loop: SSLv3 write server done A
[Mon Dec 06 15:36:58 2021] [debug] ssl_engine_kernel.c(1884): OpenSSL: Loop: SSLv3 flush data

[Mon Dec 06 15:37:58 2021] [debug] ssl_engine_io.c(1941): OpenSSL: I/O error, 5 bytes expected to read on BIO#7f39f65f0400 [mem: 7f39f6b01063]
[Mon Dec 06 15:37:58 2021] [debug] ssl_engine_kernel.c(1913): OpenSSL: Exit: error in SSLv3 read client certificate A

Any help will be appreciated.

Post Details
Added on Dec 10 2021