Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, oracle.

Asked: February 07, 2018 - 12:11 pm UTC

Last updated: February 09, 2018 - 1:28 pm UTC

Version: 12c

Viewed 10K+ times! This question is

You Asked

Hi Team,

We are using http request which is working fine now we are planning to move into https for that i have performed below steps On 12c-

Create a wallet -
$ orapki wallet create -wallet /u01/app/oracle/wallet -pwd password@123 -auto_login

Now export the certificate and add into wallet -

$ orapki wallet add -wallet /u01/app/oracle/wallet -trusted_cert -cert /u01/app/oracle/wallet/certificate.cer" -pwd password@123

But when i call the function like -

SELECT DISTANCE_NEW(18.104641,70.298475,17.541326,78.393676) FROM DUAL;

Getting below error -

ORA-29273: HTTP request failed
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 368
ORA-06512: at "SYS.UTL_HTTP", line 1118
ORA-06512: at "TEST.DISTANCE_NEW", line 21
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.
Fix the error and retry the HTTP request.


and Connor said...

Check out this note

"SSL wallet does not work after DB Upgrade To 12c (Doc ID 2229851.1)"

SYMPTOMS
Recently upgrade the database to 12.1.0.2 release.

11g wallet (worked before upgrade) doesn't work after the upgrade.
---
SQL >select utl_http.request(' https://',null,'file:','' ) from dual;

*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 1491
ORA-06512: at line 1


CAUSE
12C only need root and intermediate certificate(s), not any site certificate.


SOLUTION
Create a new wallet in 12C, import only the root and intermediate certs shows on the certificate chain. Or remove the site cert(s) from old wallet. If there are lot of extra certs in old wallet, create a new one and import the correct certs is easier.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

oracle oracle, February 09, 2018 - 12:36 pm UTC

Thanks for reply.

I have tried and it is run successfully on 12c But perform the same on 11g it is showing an error.

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28857: Unknown SSL error
29273. 00000 - "HTTP request failed"
*Cause: The UTL_HTTP package failed to execute the HTTP request.
*Action: Use get_detailed_sqlerrm to check the detailed error message.Fix the error and retry the HTTP request.
Connor McDonald
February 09, 2018 - 1:28 pm UTC

I think you'd to call Support on that one.

But it works in reverse as well - the wallet from 12 won't probably work on 11.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library