gpg-agent not running when needed by Déjà Dup

Bug #1700645 reported by James Budarz on 2017-06-26
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Déjà Dup
Undecided
Unassigned
deja-dup (Ubuntu)
Undecided
Unassigned
gnupg2 (Ubuntu)
Undecided
Unassigned

Bug Description

Some have reported problems before with repeated demands for encryption passwords, but mine gives a different error. I've deleted all my previous backups and reinstalled duplicity and deja-dup, but I still get the error:

DUPLICITY: . ===== Begin GnuPG log =====
DUPLICITY: . gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
DUPLICITY: . gpg: invalid size of lockfile '/home/username/.gnupg/gnupg_spawn_agent_sentinel.lock'
DUPLICITY: . gpg: cannot read lockfile
DUPLICITY: . gpg: can't connect to the agent: Invalid argument
DUPLICITY: . gpg: problem with the agent: No agent running
DUPLICITY: . ===== End GnuPG log =====
DUPLICITY: .
DUPLICITY: .

DUPLICITY: ERROR 31 GPGError
DUPLICITY: . GPGError: GPG Failed, see log below:
DUPLICITY: . ===== Begin GnuPG log =====
DUPLICITY: . gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
DUPLICITY: . gpg: invalid size of lockfile '/home/username/.gnupg/gnupg_spawn_agent_sentinel.lock'
DUPLICITY: . gpg: cannot read lockfile
DUPLICITY: . gpg: can't connect to the agent: Invalid argument
DUPLICITY: . gpg: problem with the agent: No agent running
DUPLICITY: . ===== End GnuPG log =====
DUPLICITY: .

System details:
Ubuntu 17.04
deja-dup 34.4-0ubuntu1
duplicity 0.7.06-2ubuntu3

Thank you in advance!

Vej (vej) wrote :

Hello James,

this problem might be related to your current installation of GPG.

So could you please give columns "Name" and "Version" from the output of "dpkg --list gpg*"?

Changed in deja-dup:
status: New → Incomplete
James Budarz (jimbudarz) wrote :

||/ Name Version Architecture Description
+++-==============-============-============-=================================
un gpg <none> <none> (no description available)
un gpg-agent <none> <none> (no description available)
un gpgsm <none> <none> (no description available)
ii gpgv 2.1.15-1ubun amd64 GNU privacy guard - signature ver
un gpgv1 <none> <none> (no description available)
un gpgv2 <none> <none> (no description available)

Thanks again.

Vej (vej) on 2017-07-02
Changed in deja-dup:
status: Incomplete → New
Vej (vej) wrote :

Hallo James.

Thanks for that output. There should be a background process running called gpg-agent.

Can you please check that using the command "ps x | grep gpg".

This should give you up to 3 lines of output.

The question is, if there is one including "gpg-agent --homedir /some/path/.gnupg --use-standard-socket --daemon". /some/path should be a path inside of the home directory of your user.

Best

Vej

Changed in deja-dup:
status: New → Incomplete
James Budarz (jimbudarz) wrote :

Hmm, no, my only output there is

24591 pts/1 S+ 0:00 grep --color=auto gpg

Thanks for following up.

James Budarz (jimbudarz) on 2017-07-06
description: updated
James Budarz (jimbudarz) on 2017-07-09
Changed in deja-dup:
status: Incomplete → New
Vej (vej) wrote :

Hello James,

that is interesting. It means, that your gpg-agent is not running.

So lets try to start it from a terminal and see if this gets Deja-Dup to work (please post every output of that command here for analysis – anonymised if needs be) :

     gpg-agent --daemon

If that does not throw an error message, please execute a verbose backup and provide us with the file /tmp/deja-dup.log

    DEJA_DUP_DEBUG=1 deja-dup --backup | tail -n 1000 > /tmp/deja-dup.log

Best Regards

Vej

Changed in deja-dup:
status: New → Incomplete
Vej (vej) on 2017-07-09
Changed in deja-dup (Ubuntu):
status: New → Incomplete
tags: added: zesty
James Budarz (jimbudarz) wrote :

The backup completed successfully once I manually started gpg-agent. I'm not sure if this is meant to be triggered by deja-dup. If so it remains a bug, otherwise I can close it and launch the daemon manually at boot.

Thanks for the help!

Vej (vej) wrote :

Hello James,

this should not be triggered by Déjà Dup, but by a combination of a file /etc/X11/Xsession.d/90gpg-agent together with an entry "use-agent" inside of ~/.gnupg/gpg.conf.

Can you check, if the file /etc/X11/Xsession.d/90gpg-agent does exist at your system and if your ~/.gnupg/gpg.conf does include use-agent please?

I will move this bug report over to the Downstream Triagers of the ubuntu package gnupg-agent, which may ask more questions about this.

Changed in deja-dup:
status: Incomplete → Invalid
Changed in deja-dup (Ubuntu):
status: Incomplete → Invalid
summary: - Encrypted backup repeatedly asks for password on first use
+ gnupg-agent not running when needed by Déjà Dup
summary: - gnupg-agent not running when needed by Déjà Dup
+ gpg-agent not running when needed by Déjà Dup
James Budarz (jimbudarz) wrote :

Thanks for everything, Vej.
To answer your questions, /etc/X11/Xsession.d/90gpg-agent does exist on my system and use-agent is enabled in ~/.gnupg/gpg.conf.

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

Other bug subscribers