logger.log(Level.WARNING,"PUT of "+pfn.pfn+" failed with "+exitStatus.getStdOut());
if(logger.isLoggable(Level.WARNING))
logger.log(Level.WARNING,"PUT of "+pfn.pfn+" failed with "+exitStatus.getStdOut());
if(sMessage!=null)
sMessage=xrdcpPath+" exited with "+exitStatus.getExtProcExitStatus()+": "+sMessage;
if(sMessage!=null){
if(exitStatus.getExtProcExitStatus()<0)
sMessage=xrdcpPath+" timed out and was killed after "+maxTime+"s: "+sMessage;
else
sMessage=xrdcpPath+" exited with "+exitStatus.getExtProcExitStatus()+": "+sMessage;
}
else
sMessage="Exit code was "+exitStatus.getExtProcExitStatus()+" for command : "+command.toString();
if(exitStatus.getExtProcExitStatus()<0)
sMessage="The following command had timed out and was killed after "+maxTime+"s: "+command.toString();
else
sMessage="Exit code was "+exitStatus.getExtProcExitStatus()+" for command : "+command.toString();
thrownewTargetException(sMessage);
}
...
...
@@ -887,8 +902,11 @@ public class Xrootd extends Protocol {
thrownewIOException("Interrupted while waiting for the following command to finish : "+command.toString(),ie);
}
if(exitStatus.getExtProcExitStatus()!=0)
thrownewIOException("Command exited with exit code: "+exitStatus.getExtProcExitStatus()+", full command and output is below:\n"+command+"\n"+exitStatus.getStdOut());
if(exitStatus.getExtProcExitStatus()<0)
thrownewIOException("Prepare command has timed out and was killed after 15s:\n"+command+"\n"+exitStatus.getStdOut());
if(exitStatus.getExtProcExitStatus()>0)
thrownewIOException("Prepare command exited with exit code: "+exitStatus.getExtProcExitStatus()+", full command and output is below:\n"+command+"\n"+exitStatus.getStdOut());
}
/**
...
...
@@ -974,9 +992,11 @@ public class Xrootd extends Protocol {
finalintsleep=statRetryTimes[statRetryCounter];
if(exitStatus.getExtProcExitStatus()!=0){
if(sleep==0||!retryWithDelay)
thrownewIOException("Exit code was "+exitStatus.getExtProcExitStatus()+", retry #"+(statRetryCounter+1)+", output was "+cleanupXrdOutput(exitStatus.getStdOut())
+", "+"for command : "+command.toString());
if(sleep==0||!retryWithDelay){
finalStringmessage=exitStatus.getExtProcExitStatus()>0?"Exit code was "+exitStatus.getExtProcExitStatus():"Command has timed out and was killed after 15s";
thrownewIOException(
message+", retry #"+(statRetryCounter+1)+", output was "+cleanupXrdOutput(exitStatus.getStdOut())+", "+"for command : "+command.toString());
}
Thread.sleep(sleep*1000);
continue;
...
...
@@ -1158,10 +1178,17 @@ public class Xrootd extends Protocol {
logger.log(Level.WARNING,"TRANSFER failed with "+exitStatus.getStdOut());
if(sMessage!=null)
sMessage="xrdcp (TPC=="+iTPC+") exited with "+exitStatus.getExtProcExitStatus()+": "+sMessage;
if(sMessage!=null){
if(exitStatus.getExtProcExitStatus()<0)
sMessage="xrdcp (TPC=="+iTPC+") timed out and was killed after "+seconds+"s, error message was: "+sMessage;
else
sMessage="xrdcp (TPC=="+iTPC+") exited with exit code "+exitStatus.getExtProcExitStatus()+": "+sMessage;
}
else
sMessage="Exit code was "+exitStatus.getExtProcExitStatus()+" for command : "+command.toString();
if(exitStatus.getExtProcExitStatus()<0)
sMessage="The following command has timed out and was killed after "+seconds+"s: "+command.toString();
else
sMessage="Exit code was "+exitStatus.getExtProcExitStatus()+" for command : "+command.toString();
if(exitStatus.getExtProcExitStatus()==5&&exitStatus.getStdOut().indexOf("source or destination has 0 size")>=0){
logger.log(Level.WARNING,"Retrying xrdstat, maybe the file shows up with the correct size in a few seconds");
...
...
@@ -1439,13 +1466,4 @@ public class Xrootd extends Protocol {