Misleading error message: "Invalid SSH password"

Bug #411145 reported by quazgar
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

duplicity wrongly states "Invalid SSH password" when trying to write the backup via scp/sftp to a directory that doesn't exist and cannot be created. My example:

# duplicity --include-globbing-filelist /etc/duplicity/include-globs / scp://duplici@someserver//backup
Reading globbing filelist /etc/duplicity/include-globs
Invalid SSH password
Running 'sftp -oServerAliveInterval=15 -oServerAliveCountMax=1 duplici@someserver' failed (attempt #1)

It works as soon as /backup exists (and is writeable).

While not a serious bug per se it cost me half a day to find the error source since I first guessed something with my ssh authorized keys was wrong...

This bug occurs with duplicity 0.5.17 and 0.5.18, interpreted by python-2.6 on (mostly stable) gentoo linux (amd64). The target is a stable debian 5.0.2.

Verbose output:
uplicity -v9 --include-globbing-filelist /etc/duplicity/include-globs / scp://duplici@someserver//backup1
Reading globbing filelist /etc/duplicity/include-globs
Main action: inc
Args: /usr/bin/duplicity -v9 --include-globbing-filelist /etc/duplicity/include-globs / scp://duplici@someserver//backup1
/usr/bin/python 2.6.2 (r262:71600, Jul 31 2009, 19:25:10)
[GCC 4.3.2]
duplicity 0.5.18 (May 20, 2009)
Linux whatnow 2.6.30-gentoo-r4 #1 SMP Sat Aug 8 02:14:31 CEST 2009 x86_64 AMD Athlon(tm) X2 Dual Core Processor BE-2300
Using temporary directory /tmp/duplicity-nWwE75-tempdir
Registering (mkstemp) temporary file /tmp/duplicity-nWwE75-tempdir/mkstemp-hleneu-1
Temp has 10012819456 available, backup will use approx 34078720.
Running 'sftp -oServerAliveInterval=15 -oServerAliveCountMax=1 duplici@someserver' (attempt #1)
State = sftp, Before = 'Connecting to someserver...'
sftp command: 'mkdir /backup1'
State = sftp, Before = 'mkdir /backup1
Couldn't create directory:'
Invalid SSH password
Running 'sftp -oServerAliveInterval=15 -oServerAliveCountMax=1 duplici@someserver' failed (attempt #1)
^CRemoving still remembered temporary file /tmp/duplicity-nWwE75-tempdir/mkstemp-hleneu-1
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 825, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 818, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 758, in main
    globals.archive_dir).set_values()
  File "/usr/lib64/python2.6/site-packages/duplicity/collections.py", line 539, in set_values
    backend_filename_list = self.backend.list()
  File "/usr/lib64/python2.6/site-packages/duplicity/backends/sshbackend.py", line 235, in list
    l = self.run_sftp_command(commandline, commands).split('\n')[1:]
  File "/usr/lib64/python2.6/site-packages/duplicity/backends/sshbackend.py", line 159, in run_sftp_command
    time.sleep(30)
KeyboardInterrupt

Related branches

Changed in duplicity:
status: New → In Progress
importance: Undecided → Medium
Changed in duplicity:
assignee: nobody → Kenneth Loafman (kenneth-loafman)
milestone: none → 0.6.06
Changed in duplicity:
milestone: 0.6.06 → none
Revision history for this message
niknah (hankin0) wrote :

Same error, except I'm getting a "Couldn't get handle:" error too. Folders on both computers exist, I can sftp to the remote computer ok normally. I can back up to local folders with duplicity.

v0.6.08b

State = sftp, Before = 'Connecting to hs...'
sftp command: 'put "/tmp/duplicity-GFzKA8-tempdir/mktemp-4j1Ojn-2" "i5linux/duplicity-full.20100704T110914Z.vol1.difftar.gpg"'
State = sftp, Before = 'put "/tmp/duplicity-GFzKA8-tempdir/mktemp-4j1Ojn-2" "i5linux/duplicity-full.20100704T110914Z.vol1.difftar.gpg"
Uploading /tmp/duplicity-GFzKA8-tempdir/mktemp-4j1Ojn-2 to /home/hankin/i5linux/duplicity-full.20100704T110914Z.vol1.difftar.gpg
Couldn't get handle:'
Invalid SSH password
Running 'sftp -oIdentityFile=xxx -oServerAliveInterval=15 -oServerAliveCountMax=1 hankin@hs' failed (attempt #1)
^CRemoving still remembered temporary file /tmp/duplicity-GFzKA8-tempdir/mktemp-4j1Ojn-2

Changed in duplicity:
assignee: Kenneth Loafman (kenneth-loafman) → nobody
status: In Progress → Confirmed
Changed in duplicity:
milestone: none → 0.6.17
status: Confirmed → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
mmetzger (michel-metzger) wrote :

It seems that I still have this issue with 0.6.17

If the remote directory has r/o access rights for the user, duplicity fails with a "Invalid SSH password" error message.

Log:

[...]
Running 'sftp -oServerAliveInterval=15 -oServerAliveCountMax=2 michel@magwe' (attempt #1)
State = sftp, Before = 'Connected to magwe.'
sftp command: 'put "/tmp/duplicity-he7cM_-tempdir/mktemp-LvndFu-2" "/volume1/NetBackup/test3/.duplicity-full.20111210T001749Z.vol1.difftar.gpg.part"'
State = sftp, Before = 'put "/tmp/duplicity-he7cM_-tempdir/mktemp-LvndFu-2" "/volume1/NetBackup/test3/.duplicity-full.20111210T001749Z.vol1.difftar.gpg.part"
Uploading /tmp/duplicity-he7cM_-tempdir/mktemp-LvndFu-2 to /volume1/NetBackup/test3/.duplicity-full.20111210T001749Z.vol1.difftar.gpg.part
remote open("/volume1/NetBackup/test3/.duplicity-full.20111210T001749Z.vol1.difftar.gpg.part"):'
Invalid SSH password
Running 'sftp -oServerAliveInterval=15 -oServerAliveCountMax=2 michel@magwe' failed (attempt #1)
^CRemoving still remembered temporary file /tmp/duplicity-he7cM_-tempdir/mktemp-LvndFu-2
Removing still remembered temporary file /tmp/duplicity-he7cM_-tempdir/mkstemp-1ifkRy-1
INT intercepted...exiting.

The issue is solved if I change the owner of the remote directory (/volume1/NetBackup/test) to the correct one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.