UTL_HTTP.REQUEST Fails with ORA-24247 Even if the Called HTTP Server is Associated to the ACL (Doc ID 972052.1)

Last updated on FEBRUARY 08, 2017

Applies to:

PL/SQL - Version 11.1.0.6 to 11.2.0.1 [Release 11.1 to 11.2]
Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.1 [Release 11.1 to 11.2]
Information in this document applies to any platform.
Checked for Relevance on 12-Sep-2014
Checked as Top Hit on 09-NOV-2011


Symptoms

Running the UTL_HTTP.REQUEST function to call an HTTP Server specifying also a proxy address, raises the errors

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1577
ORA-24247: network access denied by access control list (ACL)

The HTTP Server has been associated to an existing ACL before to run the function, and the user running the call has been granted to use the ACL through the connect privilege.

Example:

connect SYS AS SYSDBA

begin
DBMS_NETWORK_ACL_ADMIN.DROP_ACL('www.xml');
end;
/

BEGIN
--CREATE THE ACL AND ASSIGN THE CONNECT PRIVILEGE TO SCOTT TO RUN THE UTL_HTTP PACKAGE
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'www.xml',
description => 'WWW ACL',
principal => 'SCOTT',
is_grant => true,
privilege => 'connect'
);

-- Assign the HTTP host to the ACL
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'www.xml',
host => 'www.oracle.com',
lower_port => 80);

END;
/
COMMIT;

set pages 10000
set linesize 132
col host format a30
col acl format a30
--Verify 'www.oracle.com' is in the HOST list
select * from dba_network_acls;

connect SCOTT/TIGER

exec utl_http.set_proxy('www-proxy.us.oracle.com',80);
select utl_http.request('http://www.oracle.com') from dual;

ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1577
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms