Skip to main content
laertl0001
May 20, 2025
Question

java.io.IOException: inputstream is closed - Send file over SFTP

  • May 20, 2025
  • 4 replies
  • 0 views

Hello,

I'm extracting data from the database using the 'Export SQL to Excel' smart service and then using the 'Send file over SFTP' smart service. I'm doing this for 4 different tables but the issue 'java.io.IOException: inputstream is closed' seems to appear only for one of the tables. The issue seems to appear randomly as it usually works correctly. 

I found an article that addresses the issue directly so I followed the advice by adding a timer (first 1 min then 3 min) before the send over SFTP but the issue persists at random occurrences. KB-1113 SFTP smart service transfers a blank file to its destination - Appian Knowledge Base - Support - Appian Community

What could be the problem?

Thanks in advance

4 replies

davidj137213
May 20, 2025

Does the issue occurs always with the same table? is that table the last one inserted?

laertl0001
May 20, 2025

Until now the issue has occurred only with one of the tables. The execution is done through and AND node in the process: 

The error in this case is in the upper flow of the end node, the first one.

I've noticed that the extraction with the error is the one with the most rows compared to the others. In this case 218 DB rows, which isn't that much honestly. 

davidj137213
May 20, 2025

Try running the extraction sequentially instead of in parallel, just for testing purposes.


It seems that one of the branches is closing the socket when it finishes, and the last one — which is also the slowest — is the one that fails.