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

[Hubble] http info api returns error while getting snapshot and contracts #1434

Closed
jgresham opened this issue Sep 27, 2023 · 4 comments
Closed
Assignees
Labels
s-triage Needs to be reviewed, designed and prioritized

Comments

@jgresham
Copy link

jgresham commented Sep 27, 2023

What is the bug?
I use this API to show the hubble version and whether it is syncing in NiceNode. It would be good if users could see the hubble version, syncing status, and other info right after it is started.
Captura de pantalla 2023-09-27 a la(s) 12 10 54 p m

How can it be reproduced? (optional)

  1. Start hubble
  2. call https://www.thehubble.xyz/docs/httpapi/info.html#info curl http://localhost:2281/v1/info
  3. Receive response: curl: (56) Recv failure: Connection reset by peer

Additional context (optional)
Additionally, even when the base /info api starts working, adding dbstats=1 as in the info docs, returns no matches found (ex. curl http://localhost:2281/v1/info?dbstats=1 -> zsh: no matches found: http://localhost:2281/v1/info?dbstats=1)

@github-actions github-actions bot added the s-triage Needs to be reviewed, designed and prioritized label Sep 27, 2023
@sds sds added s-noop Cannot be worked on and removed s-triage Needs to be reviewed, designed and prioritized labels Oct 9, 2023
@sds
Copy link
Member

sds commented Oct 9, 2023

HTTP API support was released relatively recently—it might be worth double checking that you're running Hubble version 1.6.0 or newer, and that you don't have the --http-server-disabled flag specified.

You can try this out below:

⨠ curl "http://nemes.farcaster.xyz:2281/v1/info"              
{"version":"1.6.0","isSyncing":false,"nickname":"nemes","rootHash":"f425e51f5096c73a4b0c6da06c9f8e950f1cf7c1","peerId":"12D3KooWMQrf6unpGJfLBmTGy3eKTo4cGcXktWRbgMnfbZLXqBbn","hubOperatorFid":9152}
⨠ curl "http://nemes.farcaster.xyz:2281/v1/info?dbstats=1"
{"version":"1.6.0","isSyncing":false,"nickname":"nemes","rootHash":"a8756d1f0460abc8db8cb3ed7bab51fa8258cc93","dbStats":{"numMessages":4515680,"numFidEvents":20840,"numFnameEvents":20706},"peerId":"12D3KooWMQrf6unpGJfLBmTGy3eKTo4cGcXktWRbgMnfbZLXqBbn","hubOperatorFid":9152}

Notice that we're wrapping the URL with quotes. The error message in your issue suggests that your shell (zsh) is interpreting the URL incorrectly, which is easily solved by wrapping the URL with quotes. Hope this helps.

@sds sds closed this as completed Oct 9, 2023
@jgresham
Copy link
Author

jgresham commented Oct 9, 2023

@sds the problem is that the API fails while Hubble is getting snapshot and contracts, and syncing storage cache, right after starting

@sds sds reopened this Oct 10, 2023
@sds sds added s-triage Needs to be reviewed, designed and prioritized and removed s-noop Cannot be worked on labels Oct 10, 2023
@sds
Copy link
Member

sds commented Oct 10, 2023

Got it. I'm not sure there's much we can do in this situation, but I'll leave it to the protocol team to triage further. Thanks!

@jgresham
Copy link
Author

This is fixed in(or before) v1.6.4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s-triage Needs to be reviewed, designed and prioritized
Projects
None yet
Development

No branches or pull requests

3 participants