Closed HakanL closed 1 year ago
Sometimes if I retry it works, with nothing changed.
@HakanL, seeing that I'm not familiar with BalenaOS, there are a variety of remote-side causes that could be triggering this. None the less, let's work through this and see what we can do.
Your issue appears to be happening right at this point (SshToo.cs - Lines 487-493). This is where I'm calling Renci.SshNet's SFTP to perform the upload.
Since this is happening "sometimes" triggers the question, is the remote OS dropping the SFTP connection?
Logger.Output("Uploading...");
await Task.Run(() =>
{
tarGzStream.Seek(0, SeekOrigin.Begin);
sftp.UploadFile(tarGzStream, pathBuildTarGz);
});
Logger.Output($"Uploaded '{_tarGzFileName}' [{tarGzSize,13:n0} bytes].");
Which version of the extension are you using? (assuming the latest published) Yes, latest published
Are you able to test/validate connectivity using SFTP via a 3rd-party tool? I haven't tested this, but I'm SSH:d to the device (using putty)
Are you connected to a physical device or virtualized one? It's a physical Raspberry Pi CM4, but it's running docker so I'm attempting to deploy to a guest instance in docker (and that's where I'm also SSH:d into). But it works intermittently.
How would I see if the remote OS drops the SFTP connection?
It may have been an issue with my Raspberry Pi, it's been working fine now for a while, so I'll close this issue.
However it would be good to properly catch and report the error, instead of null-ref :)
None the less, we can get in that checking mechanism. Definitely don't like seeing unexpected errors
Description
Getting this error:
Severity (1-5)
1=Low (annoyance), 5=High (crashes visual studio) 4 - can't use the extension
Steps To Reproduce
Steps to reproduce the behavior: I'm just clicking deploy and it happens during upload
Expected Behavior
The upload should be successful
Output
Linux Distribution:
BalenaOS
Additional Context
Add any other context about the problem here.