Kleopatra issue on Windows 7 (64bit)

I have spent some time exploring the forum but cannot find a precise analogue for this problem.

Issue applies to both 2.2.1 and 2.2.2 (haven’t tried earlier releases)

1.Kleopatra will not start.
2. The following error is returned when using gpgEX to decrypt or verify:

Cannot connect to the GnuPG user interface (Kleopatra): IPC connect call failed I've tried various compatibility mode mods but can't get any of those to work either. Any suggestions much appreciated.

Hi Peter,

do you run any port-blocking security software?
Gpg4win uses local TCP ports to communicate with backend components,
in the past there was sometime “personal security” software that blocked
theses connections.

Best Regards,
Bernhard
ps.: Like my response?
I appreciate if you flattr Gpg4win at https://flattr.com/thing/2053326 Thanks!

Hi Berhard

I run Norton Internet Security and Malwarebytes. However, I have tried switching all the protections of both off but the problem persists. Can you recommend any utility I could use to check that the necessary ports are not blocked by something else? - or any other suggestions.

I really would like to get this working properly, mainly for the gpgEX functionality it provides, which is a major convenience for checking hashes and sigs etc without going through a whole series of hoops. I will try to stick with this until we find out what is causing it.

Thanks in anticipation

Peter,

some general hints for further diagnostic are collected here:
http://wiki.gnupg.org/TroubleShooting

If Kleopatra does not start, try enabling its log (see wiki-page above)
also, try to start it on the command line and also look at the system diagnostic logs
(e.g. with Microsoft’s DebugView).

Best Regards,
Bernhard
ps.: Like my work for Gpg4win?
I’d appreciate if you flattr Gpg4win at https://flattr.com/thing/2053326 Thanks!

Thanks Berhard

I’ll post further as and when I make progress. May take a day or two.

I cannot get any output to log files for either Kleopatra or DirMngr.

In the latter case I cannot write to the config file becauseit is always ‘in use by another program’

Here is the output to DebugView:

Hi,

[13976] Critical:kleopatra(13976): KUniqueApplication: Cannot find the D-Bus session server: “Failed to get autolaunch address from launched dbus-daemon”

this is the error Message. Kleopatra uses D-Bus (an interprocess communication service) and can not connect to it. This is a fatal error.

Usually Kleopatra starts it’s own d-bus daemon and uses this.

You can check with the windows Task Manager if there is any dbus-daemon.exe running. If so it would be intersting from where.

If it is not running the start somehow fails. You could search some logs of any “security software” installed if they have anything to say about a blocked / prohibited dbus-daemon.

Could you post the sha1sum of c:\ProgramFiles\GNU\GnuPG\dbus-daemon.exe ? Just to make sure that it has not been corrupted somehow and is the correct version.

SHA-1 of dbus-daemon.exe is

ED5F516875931B8539A6506998B0F85DFD946AA8

It is in C:\ProgramFiles\GNU\GnuPG\Bin

I tried putting a copy in ProgramFiles\GNU\GnuPG

but it had no effect

Oops. meant to add there is no instance of dbus-daemon.exe running

Hi,

Yes sorry it lays in the bin subfolder. My bad.

I have the same sha1sum so your dbus-daemon binary is ok and in the correct version.

Mmh I’m running out of ideas apart from “Some thing is blocking it”

One thing you could try would be to open the command line. Switch to C:\Program Files\Gnu\GNUPG (important otherwise you will get errors that it fails to find libraries) and run “bin\dbus-daemon.exe --session”

In another command line you can then execute qdbus.exe to test the connection.

If it reads like this:

C:\Users\aheinecke>“C:\Program Files\GNU\GnuPG\qdbus.exe”
:1.3
org.freedesktop.DBus

It means it is working. If not maybe you get a helpful error at some point.

Thanks. We’re getting there

The command “bin\dbus-daemon.exe --session” produces the following error

“Failed to start message bus: Failed to bind socket “localhost:18681”: Address already in use”

So how do I find out what is already using that port and what to do about it?

To find out what listens to a port open a command line as Administrator and run:

netstat -a -b

This should show it to you.

I’m curious whats listening there. I guess what to do (I think you can configure dbus to use another port but I would have to check this) about it depends on what is listening there.

Oh dear.

I’ve run the bin\dbus-daemon.exe --session command multiple times now. Each time it returns the same error message except for the port number which is different each time. The number reported appears random with the lowest so far 18621 and the highest 36599.

Neither the Netstat command line prog nor TCPView reports the relevant port numbers as being in use.

Any other ideas?

Only the original idea that some security software is blocking dbus-daemon from opening this port.

Kleopatra and GpgEX are now working and I’m at a loss to understand what has changed system-wise to have caused it.

The only thing I can think of is that I have enabled the windows\system32\drivers\etc\hosts file for localhost in order to properly install the Wamp server apache/mysql/php stack.

Is it possible that was the problem?

Uhm, I guess it could be. It probably opens the port only to accept connections from localhost and If it does not know localhost it might fail.

Definitely something not reported. So at least your adventure may help others in the future. :slight_smile:

I came across the same issue as Peter mentioned about installing WAMPSERVER. Installation updates the hosts file with an entry for localhost.

Removing the entry from hosts file, gnuPG started working again without any issue. Kleopatra was able to work from Explorer windows for Signing & Encrypting, once more.

Really weird though to see this issue for which WAMPSERVER/hosts modification as the resolution.