我在 ACl 下有用户名,并且 acl 已分配给主机。但我在尝试联系时收到错误 http_req
ACL 已分配给主机
SELECT * FROM dba_network_acls;
1 *.mer.com /sys/acls/fine_grain_access_http.xml 968743177C0D29D9E040A8C02F1C05F0
用户已通过 connect 和 resolve prov 添加到 ACL
SELECT * FROM dba_network_acl_privileges where principal=’SCOTT’
ACL ACLID PRINCIPAL PRIVILEGE IS_GRANT INVERT
1 /sys/acls/fine_grain_access_http.xml 968743177C0D29D9E040A8C02F1C05F0 PRASHANT-MISHRA connect true false
2 /sys/acls/fine_grain_access_http.xml 968743177C0D29D9E040A8C02F1C05F0 PRASHANT-MISHRA resolve true false
下面是我要执行的代码部分
DECLARE
req UTL_HTTP.req;
resp UTL_HTTP.resp;
v_URL VARCHAR2(2000);
VALUE VARCHAR2(32767);
Rpt_id NUMBER:=38660;
part1 VARCHAR2(200);
part2 VARCHAR2(100);
part3 VARCHAR2(100);
username VARCHAR2(100):='PRASHANT-MISHRA';
pass VARCHAR2(100):='Summer@2015';
BEGIN
part1:='http://jira.mer.com/sr/jira.issueviews:searchrequest-xml/';
part2:='/SearchRequest-38660tempMax=3000&';
part3:='field=key';
v_URL:=part1||part2||Rpt_id||part3;
req := UTL_HTTP.begin_request(v_URL,'GET','HTTP/1.1');
UTL_HTTP.set_authentication(req, username, pass);
UTL_HTTP.set_header (req,'Content-Type','application/xml; charset=utf-8');
/*UTL_HTTP.set_header(req, ‘User-Agent’, ‘Mozilla/4.0′);*/
resp := UTL_HTTP.get_response(req);
LOOP
UTL_HTTP.read_line(resp, value, TRUE);
DBMS_OUTPUT.PUT_LINE(value);
END LOOP;
UTL_HTTP.end_response(resp);
END;
错误:
ORA-29273:HTTP 请求失败
ORA-06512:在“SYS.UTL_HTTP”,第 1130 行
ORA-24247:网络访问被访问控制列表 (ACL) 拒绝
ORA-06512:在第 19 行