Failed to connect: No such file

Brand new Synology NAS specifically to use with a backup tool, hopefully Duplicati. From a terminal window, I can log into the device over ssh using my credentials, create and delete files/folders, etc with no problem.

However, if I create a new backup with Duplicati and specify the appropriate credentials along with a path on the server (which I pasted from pwd in a shell to ensure no types) and “Test connection”, Duplicati successfully connects, then it tells me the folder /var/services/home/myusername does not exist (which of course it does) and offers to create it for me. Unsurprisingly that fails with an error “Failed to connect: No such file”

Anyone have any ideas? Using very latest version available

Congrats on your new Synology NAS! I actually tried buying one - TWICE and both times there were issues with the transaction, so I took it as a sign and bought something else.

So - while jealous of you, I’m not that familiar with Synology devices- but here are a few things that come to mind…

  1. Dumb question, but are you using the same login for both Duplicati and the shell test?

  2. Is your “Path on server” taking into account that most likely once you connect you are starting in (and probably limited to) your “home” folder (such as “/var/services/home/myusername”) in which case a “Path on server” setting of “/duplicati” would end up storing files in “/var/services/home/myusername/duplicati”?

  3. Are you using the “Storage Type” of SFTP (SSH)? (It’s easy to get confused between FTP, SFTP, and FTPS - aka “FTP (Alternative)”)

  4. Could there maybe be a Synology setting that needs to be flipped to enable SFTP for a connection?

I’ve actually had a synology for years — it has been flawless, that’s why I got another one for backup. With my older Synology, Duplicati seemed to work fine.

So the answers to 1,3 and 4 are yes (though not a dumb question), yes and yes (I enabled that connection)

However, you might be on to something regarding (2) I changed the path to simply be “/backups” and now I first get the message, “The folder /backups does not exist Create it now?” and when I say OK, I get a message "Failed to connect: Permission denied"
However, there’s nothing obvious wrong with permissions - in fact just for grins I chmod’d the entire path to 777 just to check that.

Baffling!

Thanks for the responses… And congrats on progressing to a new error message! :smiley:

Just for testing purposes, if you manually create the backups folder does the connection test work?

I had tried that. I still get the error that the folder doesn’t exist. Seems to me that the ssh connection is not actually getting to the right home folder

Well, this is pretty hackey, but if you have few enough /home/ folders can you make backups in each one and see if the destination test works?

If so, we have a connection issue but if not it may be a permissions or settings issue.

Alternatively, you could make a small (single file) test backup to the same account but with a folder of “/”, run it, and (if it works) see were the files showed up.

If you choose the test backup method let me know how it works BEFORE you delete the test job.

I only had two home folders (admin and my own) but placing backups in each made no difference.

Thanks for doing the check. Unfortunately I don’t any more ideas at the moment - hopefully somebody else who has gotten Duplicati working with their Synology NAS can move us forward from here…

Oh - it might help if you include the Synology model you’re working on, too.

It’s a DS1817+ with 8 bays running DSM 6.1.3

I have an older machine, a 509+ which is running DSM 4. Duplicati is able to connect to that one with no problem. (I did testing there before making the decision to get a dedicated machine for backup)

Just a hunch, is it possible that the user does not have permission to list the folder contents?

If so, that would probably explain it.
You can see here that the testing is actually just listing files from the folder to see if it can:

Or perhaps that you need an extra leading slash for the path (double slash is strange, I know: //folder/test ).

If you mean “me” as “the user”, then I can certainly log into the NAS from a terminal window using the same credentials and create files, list them and so forth. So the question is why can’t Duplicati do it?

At this point, unfortunately I’m going to have to give up on Duplicati and find something else. Crashplan disappears for me in a month so I’m running out of time to get an alternative backup solution running

I don’t use Synology as a destination, but I do use Synology as a destination to sync my pc with my NAS (via syncthing). With that application, I also had some issues with authorizations, that I managed to work out, don’t know how.

Could you try to specifiy the alternate path:

/volume1/homes/username

That is a link to the

/var/services/home/username

Just a guess… Duplicati is too good to give up…

That was actually the first thing I tried after installing Duplicati - I realized they were symbolic links. However, when I do that, I just get a message that the folder /volume1/homes/username (obviously replaced with my username) doesn’t exist.
Clearly Duplicati can’t see the file system but how do I fix it?

are you connecting with an admin user?

I’ve tried with both my personal userid (which is in the admin group) and the root userid (admin)

By the way, if there is any way to get some support, perhaps a remote desktop sharing session, I’m happy to pay a fee. Is there someone to contact for such things? I would love to use Duplicati but running out of time to get backup system running before Crashplan expires.

Tried it myself here. I am getting the same error here (beta release).

Duplicati.Library.Interface.FolderMissingException: Unable to set folder to /var/services/homes/XXXX/dup_test/, error message: No such file ---> Renci.SshNet.Common.SftpPathNotFoundException: No such file at Renci.SshNet.Sftp.SftpSession.RequestOpenDir(String path, Boolean nullOnError) at Renci.SshNet.Sftp.SftpSession.ChangeDirectory(String path) at Duplicati.Library.Backend.SSHv2.ChangeDirectory(String path) --- End of inner exception stack trace --- at Duplicati.Library.Main.BackendManager.List() at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile) at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile) at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile) at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter) at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result) at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method) at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter) at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)

Maybe try to install the webdav server from synology and use webdav access? Untill someone figured out what goes wrong here…

Yeah, that’s an option — the thing is, I want to use this stuff remotely and I really only wanted to allow SSH connections (on a non-standard port!)

But I’m glad to know I’m not the only one running into this problem. Who reports such bugs?

I guess you could log it to github.

Webdav tunneled over ssh? I run on non standard ssh port as well. Did you try on standard ssh port?maybe issue is there?

Did you check with other clients (winscp etc) if you can reach it over sftp? To rule out synology itself.

I"m still using the standard ports — once I had it up and running I will change to non standard port.

And yes, I can reach the Synology over SSH from a terminal window on any other computer in my network (Mac, Linux and even (oh god!) winscp on Windows. Once there I can create files and folders, list them, etc without any issue.

Also, I installed webdav on the synology, enabled both http and https ports but when I try to test from duplicati I get an error “Failed to connect: The remote server returned an error: (405) Method Not Allowed”

However, WebDav is clearly working fine because I can open my home folder from a Mac (same Mac that’s running Duplicati by the way) using webdav credentials and port with no problem.

It seems to me that Duplicati is just not ready for prime time. These are really basic issues (just connecting) and so it just shouldn’t be this hard, particularly since I can connect to the same services from other apps with no issue

I agree, it really shouldn’t.

The WebDAV “(405) Method Not Allowed” error might be the same one mentioned here:

That being said, it sounds like you’ve tried a lot of different methods (thanks!) but just keep running into issues. I know other Synology users are using Duplicati without such issues (at least not that they’re reporting) so I’m stuck assuming your environment or implementation is set up in a way that Duplicati doesn’t handle well.

It would be great if you had the time to help us iron out exactly what the issue is, but without us being able to guarantee results within a particular time frame I certainly understand about the time pressure of dealing with CrashPlan’s announcement.

If you end up finding another tool that works for you please let us know what it is (and what didn’t work for you) in case other Synology users trying out Duplicati run into issues like yours. We’d much rather have people backing up with another tool than not backing up at all!

And keep us in mind once your new tool is in place - Duplicati is actively being developed so at some point we’ll hopefully figure out what’s been causing you so many issues and get it resolved. :slight_smile: