keybase / bot-sshca

A chat bot that can manage your team's SSH accounts
BSD 3-Clause "New" or "Revised" License
222 stars 30 forks source link

Socket Connection Refused - (CONN KeybaseDaemonRPC 16b78b02) Connection: error dialing transport: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused #103

Closed sporkwitch closed 4 years ago

sporkwitch commented 4 years ago

Following all instructions from the docs for initial setup, i see the following when running make generate at the end, before it provides the instructions for the machines to connect to. make serve starts it and it runs through the same crash loop endlessly. Running whoami in the container it says it's root, and other searches I've done indicate this is an issue, but as far as I can tell from the scripts, it should be correctly dropping down to the keybase user. End result is the bot won't start up and connect.


2020-08-05T19:34:45.513277Z ▶ [DEBU keybase socket.go:68] 070 + GetSocket
2020-08-05T19:34:45.513286Z ▶ [DEBU keybase context.go:220] 071 - GetSocket -> ok
2020-08-05T19:34:45.513302Z ▶ [DEBU keybase socket.go:78] 072 | empty socket wrapper; need a new one
2020-08-05T19:34:45.513311Z ▶ [DEBU keybase socket_nix.go:103] 073 + SocketInfo#dialSocket(unix:/home/keybase/.config/keybase/keybased.sock)
2020-08-05T19:34:45.513319Z ▶ [DEBU keybase socket_nix.go:132] 074 | net.Dial(unix:/home/keybase/.config/keybase/keybased.sock)
2020-08-05T19:34:45.513348Z ▶ [DEBU keybase socket_nix.go:133] 075 - SocketInfo#dialSocket(unix:/home/keybase/.config/keybase/keybased.sock) -> ERROR: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused
2020-08-05T19:34:45.513362Z ▶ [DEBU keybase socket.go:93] 076 | DialSocket -> ERROR: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused
2020-08-05T19:34:45.513371Z ▶ [WARN kbfs connection.go:612] 077 (CONN KeybaseDaemonRPC 16b78b02) Connection: error dialing transport: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused
2020-08-05T19:34:45.513380Z ▶ [WARN kbfs keybase_daemon_rpc.go:360] 078 KeybaseDaemonRPC: connection error: "dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused"; retrying in 2s```
sporkwitch commented 4 years ago

After some further digging, I noticed that the documentation appears outdated. I figured out how to properly generate a bot account via my main account, cleaned everything out, updated env.list with the new username and paperkey, followed instructions as normal. The error output is similar, but ultimate failure is slightly different. The loop isn't quite as clearly defined, though it has most of the same stuff. It does state that auth succeeds in a couple places, then it crashes. Short section in-line, the full log attached:

2020-08-06T00:04:23.456418Z ▶ [WARN kbfs keybase_daemon_rpc.go:400] 033 Background keep alive hit an error: context deadline exceeded 2020-08-06T00:04:23.456442Z ▶ [DEBU keybase socket.go:68] 034 + GetSocket 2020-08-06T00:04:23.456448Z ▶ [DEBU keybase context.go:220] 035 - GetSocket -> ok 2020-08-06T00:04:23.456453Z ▶ [DEBU keybase socket.go:78] 036 | empty socket wrapper; need a new one 2020-08-06T00:04:23.456460Z ▶ [DEBU keybase socket_nix.go:103] 037 + SocketInfo#dialSocket(unix:/home/keybase/.config/keybase/keybased.sock) 2020-08-06T00:04:23.456485Z ▶ [DEBU keybase socket_nix.go:132] 038 | net.Dial(unix:/home/keybase/.config/keybase/keybased.sock) 2020-08-06T00:04:23.456506Z ▶ [DEBU keybase socket_nix.go:133] 039 - SocketInfo#dialSocket(unix:/home/keybase/.config/keybase/keybased.sock) -> ERROR: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused 2020-08-06T00:04:23.456522Z ▶ [DEBU keybase socket.go:93] 03a | DialSocket -> ERROR: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused 2020-08-06T00:04:23.456530Z ▶ [WARN kbfs connection.go:612] 03b (CONN Chat 3a3e966f) Connection: error dialing transport: dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused 2020-08-06T00:04:23.456539Z ▶ [WARN kbfs chat_rpc.go:94] 03c Chat: connection error: "dial unix /home/keybase/.config/keybase/keybased.sock: connect: connection refused"; retrying in 2s 2020-08-06T00:04:24.391694Z ▶ [INFO keybase fork_server.go:74] 001 Starting background server with pid=25 2020-08-06T00:04:24.456531Z ▶ [WARN kbfs keybase_daemon_rpc.go:400] 03d Background keep alive hit an error: context deadline exceeded Starting CA bot... 2020/08/06 00:04:25 CA chatbot crashed: failed to start CA bot due to error while writing client config: received error response from keybase api: FTL Missing seed at generation: 0 logs.zip

sporkwitch commented 4 years ago

Unable to resolve issue in container, but eventually got it (mostly) working by building and running manually outside of the container. I suspect at least part of the problem is FUSE-related, as that was one of the last additions I made to the host system before it started working.