Forum Stats

  • 3,826,341 Users
  • 2,260,630 Discussions
  • 7,896,908 Comments

Discussions

ORA-29273: HTTP request failed

Damola Azeez
Damola Azeez Member Posts: 9 Red Ribbon
edited Sep 11, 2021 11:53PM in SQL & PL/SQL

I have an oracle database running on a Linux server. The server initially had just one interface (eth0). So i added a new interface and configured the linux server as a proxy client. After configuration, i can reach all desired network when i do a curl.


But when i try running

"select apex_web_service.make_rest_request(p_url => 'http://10.10.10.24:8012', p_http_method => 'GET') from dual;"

I get the error


ERROR:

ORA-29273: HTTP request failed

ORA-06512: at "SYS.UTL_HTTP", line 1130

ORA-12543: TNS:destination host unreachable

ORA-06512: at "APEX_180200.WWV_FLOW_WEB_SERVICES", line 1017

ORA-06512: at "APEX_180200.WWV_FLOW_WEB_SERVICES", line 1523

ORA-06512: at "APEX_180200.WWV_FLOW_WEBSERVICES_API", line 369

ORA-06512: at line 1


But a curl http://10.10.10.24:8012 is successful.

I disabled the proxy configuration and tried the connection from the database just to be sure it isnt a proxy issue and i still cant get the database to connect to the url.


I have ACL setup on the database


SQL> SELECT host, lower_port, upper_port, privilege, status

FROM  user_network_acl_privileges; 2 


HOST

--------------------------------------------------------------------------------

LOWER_PORT UPPER_PORT PRIVILE STATUS

---------- ---------- ------- -------

*

           connect GRANTED


*

           resolve GRANTED


10.10.10.24

     8012   8012 connect GRANTED


What could be the issue? Any assistance would be highly appreciated

Tagged:

Answers

  • Hakam Mostafa
    Hakam Mostafa Member Posts: 1 Red Ribbon

    execute the following

    note change your apex user (APEX_210200)




    #######ora-29273 http request failed oracle apex reporting

    https://docs.oracle.com/database/apex-5.1/HTMIG/enabling-network-services-in-Oracle-db11g-or-later.htm#HTMIG29163



    DECLARE

     ACL_PATH VARCHAR2(4000);

    BEGIN

     -- Look for the ACL currently assigned to '*' and give APEX_050100

     -- the "connect" privilege if APEX_210200 does not have the privilege yet.

     

     SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS

      WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

     

     IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_210200',

       'connect') IS NULL THEN

       DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,

       'APEX_210200', TRUE, 'connect');

     END IF;

     

    EXCEPTION

     -- When no ACL has been assigned to '*'.

     WHEN NO_DATA_FOUND THEN

     DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',

      'ACL that lets power users to connect to everywhere',

      'APEX_210200', TRUE, 'connect');

     DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');

    END;

     


    ################# 2


    BEGIN

      DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(

        host => '*',

        ace => xs$ace_type(privilege_list => xs$name_list('connect'),

                  principal_name => 'APEX_210200',

                  principal_type => xs_acl.ptype_db));

    END;