New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix panic when parsing sftp URIs #592
Conversation
my example works well:
Thanks. |
Yeah, I've opened an issue at pkg/sftp#133, but until that is implemented we'll just test for the string: 451f812#diff-7a06440ed5a9c66f259b47e47bd6f785R62 |
Could you please disable sftp for your NAS again and run restic? Then please report the error message that is returned, thanks! |
Hmm. I disabled stfp and the error detection didn't seem to work on this fix-587 branch.
Also with it enabled I am getting this. Odd because I thought I get this working eventually on Friday...
Note this last one does require the password so it is getting to the right repo. I am going to have to run off and won't be back online for another 8 hours. |
Just looked, that second stacktrace is consistent with what I reported Friday. But we expected the 'sftp disabled' case to generate a message and it didn't. I have been using NFS. |
Interesting. I don't see where the error message is generated. The position I identified is slightly different: |
Oh wow, the stacktrace is caused by a missing error check in my backend code in filename, tmpfile, err := r.tempFile()
debug.Log("sftp.Save", "save %v (%d bytes) to %v", h, len(p), filename)
n, err := tmpfile.Write(p)
if err != nil {
return err
} |
Double-Wow, this check was also missing from the local backend. This gets much better error messages for #93! |
I've extracted the fixes for the local and sftp backend (the missing error check) into #593 so we can merge them immediately. |
local/sftp: Fix broken error handling
Yup. Much better, the bad URLs give
With SFTP disabled I still get a poor message:
The invalid memory address still happens when I actually use the right URL with SFTP enabled. |
Also add a prefix for all errors written to stderr by the client
Can you please retry with current commits? The error message now is:
|
Ah when I use #593 the invalid memory address goes away and was replaced with this:
But SFTP disabled still looks like this:
|
nevermind
with the fix-587 tip. Thanks. |
Great, thanks for the confirmation. For the record: Comment out the #Subsystem sftp internal-sftp |
With the proper error messages I was able to fix the settings on my NAS to get closer to the right answer.
All commands seem to include that file does not exist message. And it seems to leave a stale lock behind. New issue? |
Yes, new issue. IRC? |
Sorry out of time to play at the moment. |
Nevermind, write a debug log and open a new issue later. Oh, and try |
Closes #587