Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

muxrpc CallError: Error - no such command: gossip.connect #58

Closed
cryptix opened this issue Jun 23, 2020 · 4 comments
Closed

muxrpc CallError: Error - no such command: gossip.connect #58

cryptix opened this issue Jun 23, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@cryptix
Copy link
Member

cryptix commented Jun 23, 2020

sbotcli connect "net:scuttle.space:8008:~shs:skBzPazHliOXCWLwloGvHYki0wPLOUeJpvW10U7MOJ4="
level=error run-failure="connect: async call failed.: error reading response from request source: muxrpc: error reading from packet source: muxrpc CallError: Error - no such command: gossip.connect"

This can happen because of a fallback to work around a missing feature in go-muxrpc, namely individual handler authorization based on the keypair of the session. That’s why there are two muxers in the sbot package (public and master), like with ssb-server you only get elevated access to master if you have the same keypair as the running server.

Therefore, you can't have special privileged gossip.connect if you have other handlers on gossip.* already, like ping. That’s why I introduced ctrl.* for privileged calls.

Blobs is a better example: you have blobs.add and blobs.rm but also blobs.has and blobs.get. You don't want add and rm exposed to the public usually.

To make this less obnoxious to deal with sbotcli connect $msAddr tries gossip if ctrl fails.

If you want to be sure AND you know what you need use sbotcli call ctrl.connect $msAddr for a Go server and sbotcli call gossipconnect $msAddr against a JS ssb-server.

@cryptix cryptix added the bug Something isn't working label Jun 23, 2020
@irisdelaluna
Copy link
Contributor

README says:

sbotcli connect "net:some.ho.st:8008~shs:SomeActuallyValidPubKey="

In some failed examples I was convinced that it should be @SomeActuallyValidPubKey, beginning with @...

We should either clarify this in the README, or better yet drop @ and =.* while parsing the message.

@cryptix
Copy link
Member Author

cryptix commented Jun 23, 2020

There might have been a time where it took the @ syntax but it isn’t anymore. Thanks for pointing that out.

Ps: the = is part of the base64 padding. Because it always encodes 32bytes it has to but I wouldn’t strip it)

@irisdelaluna
Copy link
Contributor

@cryptix you're right, I meant \..*. thanks!

@cryptix
Copy link
Member Author

cryptix commented Feb 4, 2021

I changed the code in sbotcli to print the error before it falls back to the 2nd muxrpc command.

https://github.com/cryptoscope/ssb/blob/f8b517c21b5d9b8fb05f923f29e59dda9a1730e5/cmd/sbotcli/main.go#L343

I hope this fixes this issue.

@cryptix cryptix closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants