Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-28576: lost RPC connection to external procedure agent

394959May 19 2003 — edited May 19 2003
hi everybody,
i have a disgusting problem with executing external c procedures. These procedures are very simple, but some of them raise an oracle ORA-28576: lost RPC connection to external procedure agent error. Here i attached sample code:

PL/SQL code:

CREATE OR REPLACE PACKAGE BUIS.C_TEMP as
procedure testprc
as language c name "testprc" library buis.oraexec;
procedure execute_prog(program in ptype.tstring)
as language c name "runprog0" library buis.oraexec;
procedure execute_prog(program in ptype.tstring, par1 in ptype.tstring);
end;

C code:

#include <stdio.h>
#include <errno.h>
#include <unistd.h>
.....
#include <time.h>
#define LOGFILE "/tmp/oraexec/oraexec.log"

void testprc (void)
{
FILE *log = fopen("/tmp/oraexec/test", "a");
fprintf(log, "testprc call");
fclose(log);
}
void runprog0(char* program)
{
execl(program, program, (char*) 0);
}


the first function testprc runs clearly but the second one runprog0
raises aforesaid error message. but here is very cool thang!! runprog0 function (that raised the exception) perform the execl(program,....) correctly. if i write for example

void runprog0(char* program)
{
execl(program, program, (char*) 0);
chdir("/tmp/");
}

so it performs succesfully execl statment, then raises exception and then do not performs chdir statement.
if i write for example

void runprog0(char* program)
{
chdir("/tmp/");
execl(program, program, (char*) 0);
}

so it performs succesfully chdir statment, then raises exception and then do not performs execl statement.

i am despaired of this problem and don't know where could be the problem. please help me. does anyone know how to set rpc timeout or something similar??

so much thanks for any advice
david
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2003
Added on May 19 2003
1 comment
1,508 views