oracledebuggingoracle-sqldeveloperaclremote-debugging

Error "ORA-24247: network access denied by access control list (ACL)" while debugging with Oracle SQL Developer


I'm trying to debug a procedure using "Oracle SQL Developer" version 23.1.0.097 from a PC with Windows 11. I have established a connection to a remote Oracle Database 18c XE Release 18.0.0.0.0 on linux, using a SSH Tunnel. I can execute succesfully the procedure while no debugging.

But when I try to debug it, it fails with some messages:

Connecting to the database #####.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '11183' )
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database ####.

I searched online for possible solutions, but could not fix it. I granted the following to my user:

BEGIN
  DBMS_NETWORK_ACL_ADMIN.append_host_ace(
    host        => '*',
    lower_port  => 5001,
    upper_port  => 65535,
    ace         => xs$ace_type(privilege_list => xs$name_list('JDWP'), 
                               principal_name => 'MY-USER', /* replace with my real user*/
                               principal_type => xs_acl.ptype_db));
END;

But now the debugger fails with yet another message:

Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '14573' )
ORA-30683: failure establishing connection to debugger
ORA-12541: TNS:no listener
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.

But it makes no sense because I am connected to the database and using a SSH tunnel...


Solution

  • Now finally I am able to remote debug. I post my answer in case it can be useful to others.

    After some research and tests, I couldn't fix my problems with DBMS_DEBUG_JDWP.

    BUT: I managed to remote debug as a wished, by using the old, deprecated but trusty DBMS_DEBUG.

    In Tools > "Preferences > Debuger > Database Debug Drotocol": choose radio button "Use DBMS_DEBUG" instead of the default "Use DBMS_DEBUG_JDWP".