GPG agent unable to start

So I recently had to do a system restore and unfortunately the latest restore point was before I had installed Thunderbird and Enigmail. I should point out here that everything was working perfectly fine before.

After the system restore, I install the latest versions of Thunderbird (52.5.0) and Enigmail ( I set it up using the Install GnuPG option. But then I am unable to create a Revocation Certificate (hence unable to complete setup wizard).

Puzzled, I uninstall GnuPG and install the latest version of Gpg4win (3.0.2). Now when I try to create a key pair via Enigmail, it gets stuck at 5%, hogs all system resources, and doesn’t even give me an error message stating that Key Generation Failed.

I used the gpg command prompt window with gpg --gen-key but it results in the error given in the log file I have attached.

I’m extremely confused as to what went wrong. I’ve uninstalled and reinstalled Enigmail and GnuPG multiple times now all with the same effects.

I have attached the log for gpg key maker.

gpg.txt (141 Bytes)

Hey Simon,

have you installed Kleopatra with your Gpg4win installation to manage your keys? If so, please check if all your keys are listed here. If not, please open up your console, and Check with gpg -k if all your private keys are still in place. I know that Enigmail has some weird bugs with the “First Start”-Dialogue. Have you checked Enigmail, if it has found GnuPG correctly? Sometimes it doesn’t and you have to specify it by hand in your Enigmail Options (Maybe in the Advanced options, don’t know for sure though). You may can also check if the Agent is running correctly, by open up the detailed view in your Task Manager and look for the Key Daemon of GnuPG.

Enigmail just calls GnuPG, so you shouldn’t have to reinstall Thunderbird or Enigmail several times. If GnuPG runs correctly on your system and Enigmail could identify it, there shouldn’t be any issues.

Best Wishes,

I have installed GPA and not Kleopatra. Booting up GPA, it tells me that it can’t find any Private Key. And gpg -k results in no output implying there are no keys.

There doesn’t seem to be any GPG Agent related Service running in the background.

I’ve also tried manually running the Agent and Connect Agent .exes and I get this error - gpg-connect-agent: can’t connect to the agent: IPC connect call failed.

It is most likely a fault of GPG such that it can’t run the user agent (I’ve tried running it with Admin Privileges as well to no avail).

Dear Simon,

the agent should be started as necessary. So in your situation, it somehow does not start.
My guess is that there is a permission problem somewhere or the system
believes that an agent is running somewhere already.

You could try to add debugging options on the command line to get more information about what is failing. Try:

gpg-connect-agent -vvv


gpg-agent -vvv --daemon

if that does not give you an idea, try
gpg-agent -vvv --debug-all --daemon
(careful when sharing logs from debug-all, they may contain sensitive information).

Best Regards,

I’m sorry for the extremely late reply. Holiday season haha

Hmm none of the debugging gave me any insight other than the gpg agent is unable to start.

Is this perhaps a Firewall issue?

I have attached the errors that I received in the txt file below


gpg errors.txt (947 Bytes)

Hi Simon,

the file you’ve attached showed that there seems to be an invalid option
in the second line of your gpg-agent.conf.

Can you show us this line of the following file?


Hello Bernard,

The file only has three lines. Here’s the image -


Hi Simon,
can you try without this gpg-agent.conf and see if everything starts up fine?

If this is better, can you try without the second line?

Setting max-cache-ttl looks okayish to me, but the error message was clear.
Did you enable some other profile or gpgconf.conf setting?


Hmm so it works without the .conf file and the second line as well.

I created two test keys and they work.

Hahaha thank you for this :smiley:


You are welcome! :slight_smile:

Do you remember how you’ve got these settings?

My best guess is the System Restore messed up some of these files… Otherwise I have no idea how and why did this occur.