Bug #4958
closedjava.io.IOException: Pipe closed when registering file with some special characters to LFC
0%
Description
Whenever I try to store a file with characters like " " (space), "%" or "{" (I guess not only these) on LFC, I get the error "java.io.IOException: Pipe closed". The problem, however, does not appear with characters like "'", "(", "+", "=", "&" and some others.
What is even more disturbing, the files for which the IOException was thrown get uploaded to SRM - with space replaced by "%20", "%" by "%25" and so on (other characters I mentioned as not causing the problem are not escaped). Therefore, when I retry to upload them I get an error that they already exist.
The behaviour of the registration is inconsistent and I found no information as to which characters are invalid for the LFC layer. Also the reported error gives no information as to the actual cause of the problem.
When using the standard LFC command-line tools, all the characters I mentioned are accepted without any problem.
Here is the code I use for registering the file:
//copying local file to remote SE localEntry = NSFactory.createNSEntry(session, source, Flags.NONE.getValue()); localEntry.copy(srmTarget, Flags.NONE.getValue()); //creating and registering a new LFC entry lfcFile = LogicalFileFactory.createLogicalFile(session, lfcTarget, Flags.CREATE.or(Flags.EXCL)); lfcFile.addLocation(srmTarget);
source, srmTarget, lfcTarget were created with URLFactory.createURL(fullURL);
I attach the full stack trace (pl.cyfronet.insilicolab.server.scripting.integration.lfc.Lfc.storeFile(Lfc.java:154) points to line: localEntry.copy(srmTarget, Flags.NONE.getValue());).
Files