ACL [message #633587] |
Sun, 22 February 2015 09:25 |
morad_dba
Messages: 93 Registered: June 2008
|
Member |
|
|
Dear all,
I am getting the following errors
DECLARE
l_url VARCHAR2(50) := '[url]http://192.168.201.233:80[/url]';
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
BEGIN
-- Make a HTTP request and get the response.
l_http_request := UTL_HTTP.begin_request(l_url);
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.end_response(l_http_response);
END;
/
DECLARE
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-12541: TNS:no listener
ORA-06512: at line 7
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-FEB-2015 21:19:12
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.201.233)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 22-FEB-2015 20:32:26
Uptime 0 days 0 hr. 46 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/snode/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.201.233)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ec" has 1 instance(s).
Instance "ec", status READY, has 1 handler(s) for this service...
Service "ecXDB" has 1 instance(s).
Instance "ec", status READY, has 1 handler(s) for this service...
Service "sprod_DGMGRL" has 1 instance(s).
Instance "sprod", status UNKNOWN, has 1 handler(s) for this service...
Service "test" has 1 instance(s).
Instance "test", status READY, has 1 handler(s) for this service...
Service "testXDB" has 1 instance(s).
Instance "test", status READY, has 1 handler(s) for this service...
The command completed successfully
pls help me..
" I am practising the ACL following this
http://oracle-base.com/articles/11g/fine-grained-access-to-network-services-11gr1.php
Regards,
Morad.
|
|
|
Re: ACL [message #633589 is a reply to message #633587] |
Sun, 22 February 2015 09:42 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
There is nothing wrong with that code. See, it works for me:
orclz>
orclz> DECLARE
2 l_url VARCHAR2(50) := 'http://www.oracle.com';
3 l_http_request UTL_HTTP.req;
4 l_http_response UTL_HTTP.resp;
5 BEGIN
6 -- Make a HTTP request and get the response.
7 l_http_request := UTL_HTTP.begin_request(l_url);
8 l_http_response := UTL_HTTP.get_response(l_http_request);
9 UTL_HTTP.end_response(l_http_response);
10 END;
11 /
PL/SQL procedure successfully completed.
orclz> so you must have messed up something else. Better go through it all again. Tim's articles are usually pretty good.
And before you post anything here again, please read How to use [code] tags and make your code easier to read and enclos your copy/paste within [code] tags as instructed.
|
|
|
Re: ACL [message #633590 is a reply to message #633589] |
Sun, 22 February 2015 09:45 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
works OK for me
1 DECLARE
2 l_url VARCHAR2(50) := 'http://localhost:80';
3 l_http_request utl_http.req;
4 l_http_response utl_http.resp;
5 BEGIN
6 -- Make a HTTP request and get the response.
7 l_http_request := utl_http.Begin_request(l_url);
8 l_http_response := utl_http.Get_response(l_http_request);
9 utl_http.End_response(l_http_response);
10* END;
SQL> /
PL/SQL procedure successfully completed.
SQL>
I am puzzled & perplexed by error below
>ORA-12541: TNS:no listener
since Oracle listener should NOT be involved with servicing normal web browser (port 80) packet exchanges.
[Updated on: Sun, 22 February 2015 09:51] Report message to a moderator
|
|
|
|
|