I've been trying to get the keybase client running on my Mac. Spec:
System Version: OS X 10.10.5 (14F1021)
Kernel Version: Darwin 14.5.0
I get the following issue after brew install keybase
$ keybase login
There are no Keybase services installed. You may need to re-install.
â–¶ ERROR dial unix /Users/username/Library/Caches/Keybase/keybased.sock: connect: no such file or directory
Then then I try to run the "install" subcommand (I don't know if this is the correct approach), I get the following:
$ keybase install
â–¶ INFO Checking /usr/local/bin/keybase (/usr/local/opt/keybase/bin/keybase)
â–¶ INFO Checking service
â–¶ INFO Service: Not Installed (Action: Install)
â–¶ INFO Installing Keybase service
â–¶ INFO Checking KBFS
â–¶ INFO KBFS: Not Installed (Action: Install)
â–¶ INFO Installing KBFS
â–¶ ERROR Error installing KBFS: exit status 1
â–¶ INFO Installer for cli: OK
â–¶ INFO Installer for service: OK
â–¶ INFO Installer for kbfs: INSTALL_ERROR exit status 1
If I run keybase -standalone login it _works as expected_.
Suggestions on debugging this?
Update:
after running keybase ctl start it started working again. This wasn't in the documentation or suggested by the login subcommand. Maybe this should be clarified?
Can you run a keybase -d install?
(I think the install into launchd failed; we have a PR for fixing this here: https://github.com/keybase/client/pull/1536)
Thanks for the response. Below is the output. Also, if I run it twice it will state Service: Not Installed (Action: Install) both times.
$ keybase -d install
15:31:16.343186 â–¶ [DEBU keybase ui.go:432] 001 Setting GPG_TTY to /dev/ttys005
15:31:16.343230 â–¶ [DEBU keybase globals.go:186] 002 Keybase CLI 1.0.6-0
15:31:16.343242 â–¶ [DEBU keybase globals.go:186] 003 - Built with go1.5.2
15:31:16.343248 â–¶ [DEBU keybase globals.go:186] 004 - Visit https://keybase.io for more details
15:31:16.343257 â–¶ [DEBU keybase main.go:100] 005 + configureProcesses
15:31:16.343269 â–¶ [DEBU keybase main.go:178] 006 + configureLogging
15:31:16.343276 â–¶ [DEBU keybase main.go:187] 007 Disabling log forwarding
15:31:16.343282 â–¶ [DEBU keybase main.go:180] 008 - configureLogging
15:31:16.343288 â–¶ [DEBU keybase main.go:102] 009 - configureProcesses -> <nil>
15:31:16.343297 â–¶ [DEBU keybase install_osx.go:372] 00a Installing components: [cli service kbfs]
15:31:16.343312 â–¶ [DEBU keybase install_osx.go:375] 00b Checking command line
15:31:17.045254 â–¶ [INFO keybase install_osx.go:414] 00c Checking /usr/local/bin/keybase (/usr/local/opt/keybase/bin/keybase)
15:31:17.300067 â–¶ [DEBU keybase install_osx.go:466] 00d Using binPath: /usr/local/opt/keybase/bin/keybase
15:31:17.300130 â–¶ [INFO keybase install_osx.go:467] 00e Checking service
15:31:17.312822 â–¶ [INFO keybase install_osx.go:469] 00f Service: Not Installed (Action: Install)
15:31:17.312863 â–¶ [INFO keybase install_osx.go:471] 010 Installing Keybase service
15:31:17.331102 â–¶ [DEBU keybase util.go:195] 011 + Writing to /Users/username/Library/LaunchAgents/homebrew.mxcl.keybase.plist
15:31:17.332043 â–¶ [DEBU keybase util.go:197] 012 | Temporary file generated: /Users/username/Library/LaunchAgents/homebrew.mxcl.keybase.plist.BXDEWKF7CY2D6SN2BWVBD55YR77HPUL5
15:31:17.336256 â–¶ [DEBU keybase util.go:216] 013 - Wrote to /Users/username/Library/LaunchAgents/homebrew.mxcl.keybase.plist -> ok
15:31:17.616510 â–¶ [INFO keybase install_osx.go:488] 014 Checking KBFS
15:31:17.848104 â–¶ [INFO keybase install_osx.go:490] 015 KBFS: Not Installed (Action: Install)
15:31:17.848170 â–¶ [INFO keybase install_osx.go:492] 016 Installing KBFS
15:31:18.086009 â–¶ [ERRO keybase standard.go:182] 017 Error installing KBFS: exit status 1
15:31:18.086099 â–¶ [INFO keybase cmd_install_osx.go:104] 018 Installer for cli: OK
15:31:18.086126 â–¶ [INFO keybase cmd_install_osx.go:104] 019 Installer for service: OK
15:31:18.086141 â–¶ [INFO keybase cmd_install_osx.go:104] 01a Installer for kbfs: INSTALL_ERROR exit status 1
15:31:18.086189 â–¶ [DEBU keybase globals.go:231] 01b Calling shutdown first time through
15:31:18.086220 â–¶ [DEBU keybase login_state.go:878] 01c + Account "LoginState - Shutdown"
15:31:18.086277 â–¶ [DEBU keybase login_state.go:880] 01d - Account "LoginState - Shutdown"
15:31:18.086313 â–¶ [DEBU keybase globals.go:271] 01e exiting shutdown code=0; err=<nil>
Thanks for the update, my theory is wrong then. It seems like launchd is failing to start the keybase service.
If you open up the Console app, do any interesting log lines show up when you search for keybsase? Many thanks helping us to debug.
@gabriel, any ideas here?
The following showed up in the Console after running keybase -d install, seems like my Mac user has some kind of restrictions in place. It's a network directory connected Mac so my profile is managed by Active Directory policies. I am however a "full local admin" and access to things like sudo etc. But looks like there is some kind of restriction around launchd then.
Personally I can manage manually starting the service on boot. So maybe there should just be error handling of some kind put in place to highlight this issue?
12/16/15 4:04:53.998 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20511, action = unbootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
12/16/15 4:04:54.006 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20512, action = unbootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
12/16/15 4:04:54.020 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20513, action = unbootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
12/16/15 4:04:54.028 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20514, action = service bootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
12/16/15 4:04:54.555 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20533, action = unbootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
12/16/15 4:04:54.563 PM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.domain.system) Caller not allowed to perform action: launchctl.20534, action = unbootstrap, code = 1: Operation not permitted, uid = 1590688993, euid = 1590688993, gid = 1602597546, egid = 1602597546, asid = 100005
I think those error messages might be unrelated OSX things?
Can you post a recent chunk of ~/Library/Logs/homebrew.mxcl.keybase.log.
Also what is the output of keybase launchd list?
Thanks for your help debugging :)
Sorry! I totally forgot about this one. Just tried to get keybase running on another Mac and ended up in the same situation.
I've gone through the same steps again.
$ keybase launchd list
homebrew.mxcl.keybase: Not Running [Keybase]
No KBFS services.
$ keybase -d install
06:21:21.905513 â–¶ [DEBU keybase ui.go:451] 001 Setting GPG_TTY to /dev/ttys003
06:21:21.905599 â–¶ [DEBU keybase globals.go:205] 002 Keybase CLI 1.0.9-0
06:21:21.905625 â–¶ [DEBU keybase globals.go:205] 003 - Built with go1.5.3
06:21:21.905642 â–¶ [DEBU keybase globals.go:205] 004 - Visit https://keybase.io for more details
06:21:21.905691 â–¶ [DEBU keybase main.go:120] 005 + configureProcesses
06:21:21.905723 â–¶ [DEBU keybase main.go:207] 006 + configureLogging
06:21:21.905745 â–¶ [DEBU keybase main.go:216] 007 Disabling log forwarding
06:21:21.905763 â–¶ [DEBU keybase main.go:209] 008 - configureLogging
06:21:21.905779 â–¶ [DEBU keybase main.go:122] 009 - configureProcesses -> <nil>
06:21:21.905941 â–¶ [DEBU keybase install_osx.go:479] 00a + AutoInstall for launchd
06:21:21.906029 â–¶ [DEBU keybase install_osx.go:492] 00b | already installed at /Users/eric/Library/LaunchAgents/homebrew.mxcl.keybase.plist
06:21:21.906058 â–¶ [DEBU keybase install_osx.go:481] 00c - AutoInstall -> false, <nil>
06:21:22.007651 â–¶ [DEBU keybase globals.go:250] 00d Calling shutdown first time through
06:21:22.007895 â–¶ [DEBU keybase login_state.go:897] 00e + Account "LoginState - Shutdown"
06:21:22.008106 â–¶ [DEBU keybase login_state.go:899] 00f - Account "LoginState - Shutdown"
06:21:22.008236 â–¶ [DEBU keybase globals.go:290] 010 exiting shutdown code=0; err=<nil>
The file ~/Library/Logs/homebrew.mxcl.keybase.log doesn't exist.
$ keybase launchd start homebrew.mxcl.keybase
â–¶ INFO Starting homebrew.mxcl.keybase
$ keybase status
We found a Keybase service (homebrew.mxcl.keybase) but it's not running.
You might try starting it: keybase launchd start homebrew.mxcl.keybase
â–¶ ERROR dial unix /Users/eric/Library/Caches/Keybase/keybased.sock: connect: no such file or directory
Tried to launch it using launchctl, no success.
$ launchctl load /Users/eric/Library/LaunchAgents/homebrew.mxcl.keybase.plist
/Users/eric/Library/LaunchAgents/homebrew.mxcl.keybase.plist: Operation not permitted
$ sudo launchctl load /Users/eric/Library/LaunchAgents/homebrew.mxcl.keybase.plist
/Users/eric/Library/LaunchAgents/homebrew.mxcl.keybase.plist: Path had bad ownership/permissions
The service is failing to start, after running:
keybase launchd start homebrew.mxcl.keybase
Are there any error messages via tail -f /var/log/system.log ?
I installed from homebrew on el capitan:
System Version: OS X 10.11.3 (15D21)
Kernel Version: Darwin 15.3.0
I'm getting similar error message/output from keybase -d install, Console shows this line:
2/5/16 10:04:54.785 AM com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.user.domain.501.100008.Aqua) Could not read path: path = /Users/jeremy/Library/LaunchAgents/keybase.kbfs.plist, error = 2: No such file or directory
I do have other launch agents, so it's not the linked PR above.
NOTE: I just commented on https://github.com/keybase/keybase-issues/issues/1883
For me the cause of this error was running inside of a tmux session. Once I detached from tmux and ran the launchd commands outside of a session everything started to work as expected.
@pbnjay I think that was left over from an old version of the installer (kbfs isn't available from brew yet).. if you run launchctl remove keybase.kbfs it should remove that error message...
What is your output of ls -al ~/Library/LaunchAgents/*keybase*?
If installed from brew you should only have ~/LaunchAgents/homebrew.mxcl.keybase.plist
Any other keybase services you should remove.
Also if you run launchctl list | grep keybase it should only output: homebrew.mxcl.keybase.
Once it's clear you only have this service installed you can try to reload it by doing:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.keybase.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.keybase.plist
@zoogeny thanks a lot! Running outside tmux solved my issue! It seem to be related to the standard tmux-on-mac issue with decoupling of the user namespace.
Configuring tmux like the following link or using the wrapper as a prefix will also make it work inside tmux:
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
Glad it got figured out... I'll try to investigate why it's not working in tmux. If there is some incompatibility, in the least it should output a nicer error message
Similar issues here.
On Yosemite Version 10.10.5 ```➜ ~ keybase ctl start
â–¶ ERROR No service (plist) installed with label: keybase.service
➜ ~ keybase -d install
2016-06-16T13:47:11.415323 â–¶ [DEBU keybase globals.go:238] 001 Created LinkCache, max size: 65536, clean dur: 1m0s
2016-06-16T13:47:11.417711 â–¶ [DEBU keybase ui.go:512] 002 Setting GPG_TTY to /dev/ttys000
2016-06-16T13:47:11.417907 â–¶ [DEBU keybase globals.go:219] 003 Keybase CLI 1.0.15
2016-06-16T13:47:11.418069 â–¶ [DEBU keybase globals.go:219] 004 - Built with go1.6
2016-06-16T13:47:11.418076 â–¶ [DEBU keybase globals.go:219] 005 - Visit https://keybase.io for more details
2016-06-16T13:47:11.418084 â–¶ [DEBU keybase main.go:133] 006 + configureProcesses
2016-06-16T13:47:11.418096 â–¶ [DEBU keybase main.go:229] 007 + configureLogging
2016-06-16T13:47:11.418105 â–¶ [DEBU keybase main.go:238] 008 Disabling log forwarding
2016-06-16T13:47:11.418120 â–¶ [DEBU keybase main.go:231] 009 - configureLogging
2016-06-16T13:47:11.418127 â–¶ [DEBU keybase main.go:135] 00a - configureProcesses ->
2016-06-16T13:47:11.418305 â–¶ [DEBU keybase install_osx.go:522] 00b + AutoInstall for launchd
2016-06-16T13:47:11.418552 â–¶ [DEBU keybase install_osx.go:535] 00c Using binPath: /usr/local/Cellar/keybase/1.0.15/bin/keybase
2016-06-16T13:47:11.418674 â–¶ [DEBU keybase install_osx.go:524] 00d - AutoInstall -> false,
2016-06-16T13:47:11.521923 â–¶ [DEBU keybase globals.go:266] 00e Calling shutdown first time through
2016-06-16T13:47:11.521988 â–¶ [DEBU keybase login_state.go:953] 00f + Account "LoginState - Shutdown"
2016-06-16T13:47:11.523836 â–¶ [DEBU keybase login_state.go:955] 010 - Account "LoginState - Shutdown"
2016-06-16T13:47:11.523873 â–¶ [DEBU keybase globals.go:312] 011 exiting shutdown code=0; err=
➜ ~ keybase login
â–¶ ERROR dial unix /Users/shaytac/Library/Caches/Keybase/keybased.sock: connect: no such file or directory
@serkanh can you keybase log send? Maybe your service failed to start up. Thanks
Looks like a brew install trying to use a non-brew launchd label.. might be a bug in ctl start
In the meantime, you should update keybase to 1.0.16... brew update && brew upgrade keybase.
This turned out to be caused by LastPass for me, which had installed its own launchd plist file in my user's ~/Library/LaunchAgents directory and for some reason left the directory owned by root.
For me, running sudo chown yourusername:staff -R /Users/benhutchins/Library/LaunchAgents fixed it.
Yeah bad permissions on LaunchAgents causes services not to start.
This here is also the LaunchAgents permission issue: https://github.com/keybase/client/issues/5206
Most helpful comment
NOTE: I just commented on https://github.com/keybase/keybase-issues/issues/1883
For me the cause of this error was running inside of a tmux session. Once I detached from tmux and ran the launchd commands outside of a session everything started to work as expected.