Home » Other » General » utl_http ora 24247 network access denied (Oracle 11g Windows xp)
utl_http ora 24247 network access denied [message #495860] Tue, 22 February 2011 20:38 Go to next message
rickh100
Messages: 4
Registered: April 2005
Location: Staten Island
Junior Member
Can anyone give me some deeper insight into this problem.
I have searched the forums and have been unable to find a soultion besides the usual, which is to:

Create the acl
Add the privilege for the user
Assign the acl to a network
Grant execute on utl_http to the user

It may also be worth mentioning that I originally assigned the host with lower=80 upper=9000. That produced the same results:
The only time I can get it to run correctly is when I grant the user DBA privileges. There seems to be something else going on here. I have a feeling thant since i'm still getting "access denied", that perhaps I'm not calling what I think I'm calling.

My actions and results are listed below:
I would much appreciate any insight from the forum community.
Thank you,
Rick




begin
dbms_network_acl_admin.create_acl (
acl => 'utl_http.xml',
description => 'HTTP Access',
principal => 'myuser',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null
);
commit;
dbms_network_acl_admin.add_privilege (
acl => 'utl_http.xml',
principal => 'myuser',
is_grant => TRUE,
privilege => 'resolve',
start_date => null,
end_date => null
);
commit;
dbms_network_acl_admin.assign_acl (
acl => 'utl_http.xml',
host => '199.101.28.18',
lower_port => null,
upper_port => null
);
commit;
end;

grant execute on utp_http to myuser;


SQL> l
1* select * from user_network_acl_privileges;


HOST
---------------------------------------------------
LOWER_PORT UPPER_PORT PRIVILE STATUS
---------- ---------- ------- -------
199.101.28.18
connect GRANTED

199.101.28.18
resolve GRANTED


1* select * from dba_network_acls
SQL> /

HOST
-----------------------------------------
LOWER_PORT UPPER_PORT
---------- ----------
ACL
-----------------------------------------
ACLID
--------------------------------
199.101.28.18

/sys/acls/utl_http.xml
F190DC6F15C744669734AEB6C0129F3A

SELECT acl,
host,
DECODE(
DBMS_NETWORK_ACL_ADMIN.check_privilege_aclid('F190DC6F15C744669734AEB6C0129F3A','MYUSER', 1, 'GRANTED', 0, 'DENIED', NULL) privilege
FROM dba_network_acls

ACL
------------------------
HOST
------------------------
PRIVILE
-------
/sys/acls/utl_http.xml
199.101.28.18
GRANTED


Results:
Sorry had to break up the link because I'm a new member.
Suouldl be http of course.
SQL> /
select UTL_HTTP.REQUEST
('htttp://webapps.nyc.gov:8084
/CICS/f704/f403001I?BBL=5-
984-0004-') from dual;
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1

Re: utl_http ora 24247 network access denied [message #495903 is a reply to message #495860] Wed, 23 February 2011 03:59 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Give it this, and it will work:

exec dbms_network_acl_admin.assign_acl ( acl => 'utl_http.xml', host => 'webapps.nyc.gov',lower_port => null, upper_port => null);

and by the way, your script didn't work for me, until I created "myuser" in lower case. There is also a typo here,

grant execute on utp_http to myuser;

That sort of thing discourages assistance!
Re: utl_http ora 24247 network access denied [message #496026] Wed, 23 February 2011 17:50 Go to previous message
rickh100
Messages: 4
Registered: April 2005
Location: Staten Island
Junior Member
I see my error now.
Sorry about the typo.
Thanks for your quick response.
Previous Topic: Need Oracle 8i
Next Topic: Practice Oracle
Goto Forum:
  


Current Time: Fri Mar 29 06:54:37 CDT 2024