#2 ✓released
Alex (via GPGTools)

gpg-agent: error binding socket

Reported by Alex (via GPGTools) | December 15th, 2010 @ 12:38 AM | in 2.0.18 (closed)

Reported from a user and happened to me several times:

gpg-agent [251] error binding socket to '/Users/xxx/.gnupg/S.gpg-agent' No such file or directory.

Unfortunately I cannot reproduce the error but the above mentioned file was a symbolic link to /tmp/...

Comments and changes to this ticket

  • Mento

    Mento December 15th, 2010 @ 12:44 AM

    Use start-gpg-agent from GPGTools to work around the problem.

  • Alex (via GPGTools)

    Alex (via GPGTools) December 15th, 2010 @ 12:46 AM

    Fixed in the installer. Perfect.

  • Alex (via GPGTools)

    Alex (via GPGTools) December 15th, 2010 @ 12:46 AM

    • State changed from “new” to “resolved”
  • Benjamin Donnachie

    Benjamin Donnachie January 4th, 2011 @ 11:32 PM

    • State changed from “resolved” to “open”

    If start-gpg-agent from GPGtools is symlinking to a socket under /tmp then this is invalid behaviour and should be stopped.

    Instead, use gpg-agent with the --standard-socket option, or just compile with the --use-standard-socket option as per MacGPG2 v2.0.16 and let it create the sockets in the standard location.

  • Benjamin Donnachie

    Benjamin Donnachie January 4th, 2011 @ 11:35 PM

    • Milestone cleared.
    • Importance changed from “Medium” to “High”

    See http://gpgtools.lighthouseapp.com/projects/66001/tickets/5-include-... for further information on standard sockets and (deprecated) start-gpg-agent.

  • Alex (via GPGTools)

    Alex (via GPGTools) January 5th, 2011 @ 08:03 AM

    The current version does not understand the --standard-socket option - so it has be compiled again.

  • Benjamin Donnachie

    Benjamin Donnachie January 5th, 2011 @ 08:16 AM

    Does this now refer to GPGtools?

    Now gpg daemonises on the fly, should gpg-agent and its sockets be
    left alone now?

    Sent from my iPhone

  • Alex (via GPGTools)

    Alex (via GPGTools) January 5th, 2011 @ 08:22 AM

    Yes, it refers to gpgtools (just added this information for Roman/Felix).

  • steve

    steve January 5th, 2011 @ 05:24 PM

    • Assigned user changed from “Mento” to “Benjamin Donnachie”

    If I understood this correctly the problem is caused by start-gpg-agent (from the installer) and then if the gpg-agent is started through MacGPG2 if that is additionally installed and used.

    To solve this Roman suggests the following:

    Benjamin if you don't want to integrate those two or have any objections please talk to Mento (Roman Zechmeister), you have his mail and skype by now.

    Outlook: When this is done, we should integrate GPG2 in the installer and then both options should work flawless for the user - wether he chooses GPG1 or MacGPG2.

  • Alex (via GPGTools)

    Alex (via GPGTools) January 5th, 2011 @ 05:29 PM

    Isn't the socket handling the main issue? If I understand it correctly our gpg-agent version breaks the existing MacGPG2 gpg-agent...

  • Mento

    Mento January 5th, 2011 @ 05:35 PM

    Yes, our version of the gpg-agent doesn't include the patch from MacGPG2.
    But additionally our start-gpg-agent creates ~/.gnupg/S.gpg-agent as a symbolic link, which is incompatible to MacGPG2.

  • Benjamin Donnachie

    Benjamin Donnachie January 5th, 2011 @ 06:38 PM

    Creating a symlink is incorrect behaviour and I cannot understand why
    you would be doing it. Just let gpg-agent create its sockets there in
    the first place.

    Ultimately, leave the gnupg components to MacGPG2 to handle.

    Sent from my iPhone

  • Mento

    Mento January 5th, 2011 @ 06:43 PM

    I agree.

    The symlink was an old solution for a problem with the GPG_AGENT_INFO envvar.
    I hope we can delete start-gpg-agent and use MacGPG2 instead.

  • Benjamin Donnachie

    Benjamin Donnachie January 5th, 2011 @ 06:47 PM

    To reiterate, start-gpg-agent is an obsolete kludge intended for Tiger
    systems only.

    It will be dropped from MacGPG2 together with Tiger and PPC support on
    the new release.

    Sent from my iPhone

  • Mento
  • Benjamin Donnachie

    Benjamin Donnachie January 16th, 2011 @ 12:10 PM

    • State changed from “open” to “resolved”

    I understand that GPGtools has now been modified to leave control of sockets to MacGPG2.

    cacheid patch included in v2.0.17 (Currently RC).

    start-gpg-agent now dropped.

  • SLInterpreter

    SLInterpreter May 2nd, 2011 @ 02:34 PM

    • Importance changed from “High” to “Medium”

    I'm seeing something similar to this after an install of the latest (20110322 dmg) version. When I try to decrypt a file (in a Terminal session) I get the error

    gpg: can't connect to the agent: IPC connect call failed
    gpg: problem with the agent: No agent running
    

    But there appears to be an agent running

    68963   ??  S      0:00.07 /usr/local/MacGPG2/bin/gpg-agent --launchd --write-e
    

    There is an S.gpg.agent in my ~/.gnupg directory.

    This is running on a Snow Leopard Server machine (with all the latest OS X patches applied). I downloaded and installed the GPGTools dmg (omitting the mail stuff --- I don't need that as I only wish to encrypt local files from prying eyes).

    When getting the above error I'm logged in as a non-administrator user. I've copied over the ring files from my other system (a MacBook running an earlier version).

  • Alex (via GPGTools)

    Alex (via GPGTools) May 2nd, 2011 @ 03:03 PM

    • State changed from “resolved” to “hold”

    @Benjamin: any ideas?

  • steve

    steve July 31st, 2011 @ 05:08 PM

    is #59 a duplicate? merge?

  • Alex (via GPGTools)

    Alex (via GPGTools) July 31st, 2011 @ 05:45 PM

    Maybe - let's wait till we've a solution.

  • Michael Williams

    Michael Williams August 2nd, 2011 @ 08:02 PM

    I recently encountered this problem. Evidently something in the ACL permissions on the file is preventing the socket from working properly. I am running Mac OS X 10.6.8.

    Using ls -dle ~/.gnupg, I show that the .gnupg folder has:

     0: user:root inherited allow add_file,add_subdirectory,writeattr,writeextattr,writesecurity,file_inherit,directory_inherit
     1: user:MYUSERNAMEHERE inherited allow add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown,file_inherit,directory_inherit
     2: user:_spotlight inherited allow list,search,file_inherit,directory_inherit
    

    however, when I move the ~/.gnupg folder to the side, and let it create a new one, it works.

    So, to work around the issue, you can move the original folder out of the way and create a new and move the files in, or you can remove the ACLs on the folder by running the following command until the error message shown appears.

    $ chmod -a# 0 .gnupg
    $ chmod -a# 0 .gnupg
    chmod: No ACL present '.gnupg'
    

    In my case, it ran three times, one for each ACL rule in the first snippet.

    Hope this helps!

  • Alex (via GPGTools)

    Alex (via GPGTools) December 28th, 2011 @ 01:26 PM

    • Milestone set to 2.0.18
    • Importance changed from “Medium” to “”
  • Alex (via GPGTools)

    Alex (via GPGTools) January 1st, 2012 @ 01:45 PM

    • Assigned user changed from “Benjamin Donnachie” to “Alex (via GPGTools)”
    • State changed from “hold” to “fixed”

    We're removing ACLs in the latest script now.

  • SLInterpreter

    SLInterpreter January 11th, 2012 @ 04:00 PM

    Whether the ACL change was the cause I can report that the latest build (GPGTools-20111224) has fixed this problem for me.

  • steve

    steve June 18th, 2015 @ 04:40 PM

    • State changed from “fixed” to “released”
    • Importance cleared.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

Pages