Operating System - HP-UX
1752600 Members
4139 Online
108788 Solutions
New Discussion юеВ

Re: java error: cannot create pipe

 
andreyP
Occasional Contributor

java error: cannot create pipe

Hello all. I have an oracle script that runs system file copy operation (HP UX 11.31, Oracle 10.2.0.4, hp rx8640) . Everything works fine but about 2 weeks ago it has started to generate the following java exception: "User-Defined Exception cannot create pipe" and after that an oracle error: "ORA-12157: TNS:internal network communication error".

Here is a listing of the script:

create or replace and compile java source named OSCommand as
import
java.io.*;
public class OSCommand{
public static String Run(String
Command){
try{
String Result="";
String[] envParams = null;

Process p = Runtime.getRuntime().exec(Command, envParams, null);
int status = p.waitFor();
LineNumberReader r;
if (status==0 ){
r = new LineNumberReader(new
InputStreamReader(p.getInputStream()));
}else{
r = new LineNumberReader(new
InputStreamReader(p.getErrorStream()));
Result="ERROR1: "+status;
};
String s = r.readLine(); Result+=s;
while (s!=null){
s=r.readLine();
if (s!=null) {Result+="\n"+s;};
};
return Result;
}
catch (Exception e){
System.out.println("ERROR2: (running command) " + Command +
"\n" + e.getMessage());
return(e.getMessage());
}
}
}


CREATE OR REPLACE FUNCTION OSCommand_Run(Command IN STRING)
RETURN VARCHAR2 IS
LANGUAGE JAVA
NAME 'OSCommand.Run(java.lang.String) return int';





begin
...
OSCommand_Run('cp '||p_datafile_name||' '||p_directory_path);
...
end;

I thought that the problem is in kernel tunables but everything looks fine here.

Tunable Current Usage Current Setting
filecache_max 17107095552 17118151065
maxdsiz 52625408 1073741824
maxdsiz_64bit 133611152 4294967296
maxfiles_lim 4095 8192
maxssiz 1683456 134217728
maxssiz_64bit 786432 1073741824
maxtsiz 2101248 100663296
maxtsiz_64bit 213909504 1073741824
maxuprc 70 3780
max_thread_proc 65 1100
msgmni 2 4200
msgtql 0 4200
nflocks 4044 4096
ninode 6928 35648
nkthread 664 7366
nproc 306 4200
npty 0 60
nstrpty 7 60
nstrtel 0 60
nswapdev 1 32
nswapfs 0 32
semmni 26 4200
semmns 463 8400
shmmax 4294967296 4294967296
shmmni 20 512
shmseg 10 300

Maybe somebody knows that the problem is?
Thanks in advance for your answers
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: java error: cannot create pipe

I know nothing, but ...

> maxfiles_lim 4095 8192

That "4095" must be either an amazing
coincidence, or else very suspicious.

Output from "ulimit" (as the user in
question) might be interesting. Or, perhaps
there's some Java-specific open-file limit
set somewhere?
TTr
Honored Contributor

Re: java error: cannot create pipe

How soon after the error did you generate the kernel tunables list?

> nflocks 4044 4096

I think the number of file locks in use is very close to the current setting. Is the filecopy local within your server or is from a remote server?