What can cause the "ERROR_INPUT_STREAM_OPEN" error while using the Symantec Scan Engine Java SDK?
The ERROR_INPUT_STREAM_OPEN error is typically thrown when the Java API encounters a problem while opening the input stream. The issue is normally caused by the Java API timing out the connection to Protection Engine After the file scan has been requested. The default time out in the Java API is Inherited from Java and is 2 seconds.
This error can commonly be resolve by adding or adjusting times out values on the "createScanEngine" on the java connector. A good starting point on this is to set the read write timeout to 20000 and the fail retry time out to 30000. These values are in milliseconds.
Here is an excerpt from Java API help for Protection Engine 7.5 that shows the syntax that resolves the issue.
public static ScanEngine createScanEngine(java.util.List<ScanEngine.ScanEngineInfo> scanEngInfo, int readWriteTime, int failRetryTime) throws ScanException
scanEngInfo- list of scan engine info objects.
readWriteTime- socket read timeout in milliseconds
failRetryTime- time in milliseconds used by load balancing algorithm to decide the amount of time for which a failed Symantec Protection Engine in the list should be ignored for connection
If the above values don't fix the issue, consider increasing as per the below values:
change the below line in JAVAAPICheck.java (Line no. 690)
This is also valid for the DotNet/C# method PrepareForScan:
public void PrepareForScan(
The default example given is 20 seconds for readWriteTimeout, so that should be increased