Empty buffer/string for `uploadDataset` fails with ECONNRESET error
traeok opened this issue · 4 comments
Hello,
I am running into an issue when trying to create a new data set member over FTP.
When passing an empty buffer or string for the input
argument, the uploadDataset
function fails with error "ECONNRESET."
We are using v1.x of the package, but I noticed that this issue was mentioned in the active master
branch:
zos-node-accessor/src/zosAccessor.ts
Lines 350 to 352 in 3e32cc8
To reproduce:
- Initialize a connection using zos-node-accessor
- Try calling
uploadDataset
with the given parameters:connection.uploadDataset("", "TEST.PUBLIC.DS")
connection.uploadDataset(Buffer.from(""), "SOME.PUBLIC.DS")
- Notice that both calls will fail with connection error ECONNRESET.
Hi @traeok , we encountered the similar before. Will investigate why FTP refuses empty string or empty buffer recently. Thanks!
Hi @traeok , I can reproduce ECONNRESET
when enabling secure FTP to upload empty string or buffer. The non-secure FTP (non-TLS socket) works well. Do you see the same?
In the case of secure FTP, the TLS socket throws ECONNRESET
when socket.end(input)
is called to close PASV data connection with empty buffer. No sure about whether it works as expected or not.
As a work around, I'm afraid we have to upload something to get data or member created now.
Hi @traeok , I can reproduce
ECONNRESET
when enabling secure FTP to upload empty string or buffer. The non-secure FTP (non-TLS socket) works well. Do you see the same?In the case of secure FTP, the TLS socket throws
ECONNRESET
whensocket.end(input)
is called to close PASV data connection with empty buffer. No sure about whether it works as expected or not.As a work around, I'm afraid we have to upload something to get data or member created now.
Hi @std4lqi, I was able to confirm that I can only reproduce this issue when using Secure FTP. Since the issue is exclusive to Secure FTP, it sounds like an issue with how the FTP server responds to empty requests, so a temporary workaround is fine. Thanks for investigating this!
As we talked above, I close it now. Thanks!