Unanswered: ORA-28575: unable to open RPC connection to external procedure agent
I am using Gentoo Linux with Oracle9i. I am trynig to execute external procedure. I wrote small lib which has to execute any given command (like ls ps etc), I placed it in /opt/oracle/product/oracle/lib/shell.o
After that I made some steps in sql client:
CREATE OR REPLACE LIBRARY shell_lib is '/opt/oracle/product/oracle/lib/shell.o';
create or replace procedure shellas(cmd IN char) as external name "sh" library shell_lib language C parameters (cmd string);
And when I am trying:
BEGIN shellas('ls'); END;
ERROR at line 1:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "LRADVILA.SHELLAS", line 0
ORA-06512: at line 1
I tryed it from server sql client loged as sysdba, and with simple user from ather pc, and I am geting the same result.
Some variables from server (export):
oracle@herkus $ lsnrctl start
LSNRCTL for Linux: Version 188.8.131.52.0 - Production on 10-MAY-2004 00:42:40
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
TNSLSNR for Linux: Version 184.108.40.206.0 - Production
System parameter file is /opt/oracle/product/oracle/network/admin/listener.ora
Log messages written to /opt/oracle/product/oracle/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)) )
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=herkus.s tml.lan)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)) )
STATUS of the LISTENER
Version TNSLSNR for Linux: Version 220.127.116.11.0 - Production
Start Date 10-MAY-2004 00:42:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Listener Parameter File /opt/oracle/product/oracle/network/admin/listener.ora
Listener Log File /opt/oracle/product/oracle/network/log/listener.log
Listening Endpoints Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "herkus.stml.lan" has 1 instance(s).
Instance "mydb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Server real hostname is herkus.stml.lan (local) it is behind firewall which address is herkus.vtu.lt (global). Client is out side, but whit sqlplus I can work with no problems, because I have forwarded 1521 port.
I have red a lot of explainings about this problem, i all of them is sugested to check TNSNAMES.ORA and LISTENER.ORA also variables. I did it a lot of times but it does not helped
This shell.o of yours is a shared library or an object file ?
Libraries use to be called *.so . If your module was not compiled as shared library than you can not call it from anywhere.
I dont think You are stupid or what but maybe this is one of the problems.
This post is kind of old, but I thought I'll post a comment and instruction how to set up a RPC connection to external procedures. This is done on a Oracle 11g XE database running on Oracle Linux 6.1 and gcc version 4.4.5
- Create a shared module and place it in /u01/app/oracle/product/11.2.0/xe/lib directory
create a c-file that contains the following code: