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

event_listener Web socket error #311

Closed
ancazamfir opened this issue Jun 9, 2020 · 7 comments
Closed

event_listener Web socket error #311

ancazamfir opened this issue Jun 9, 2020 · 7 comments
Assignees
Labels
bug Something isn't working rpc
Milestone

Comments

@ancazamfir
Copy link
Contributor

ancazamfir commented Jun 9, 2020

IBC relayer event monitor, subscribed to Block and Tx events on gaia node, sees this error every ~27sec. It is issued from

[/Users/ancaz/rust/tendermint-rs/tendermint/src/rpc/event_listener.rs:96] "We did not receive a valid JSONRPC wrapped ResultEvent!" = "We did not receive a valid JSONRPC wrapped ResultEvent!"
Jun 09 12:48:20.007 DEBUG relayer::event_monitor: Web socket error: Error (code: 0): received neither event nor generic string message (code: -1)`
@liamsi
Copy link
Member

liamsi commented Jun 9, 2020

This is unexpected. Which tendermint version does this use?

I've added some debug output in #312 to see the msg we receive.

It is likely some websocket control message (server-client send these to verify if the connection is still alive and the subscription could be dropped). In that case this can be ignored for now. We need to implement a more realistic and robust version of the event subscription.

Related discussion: #312 (comment)

liamsi added a commit that referenced this issue Jun 9, 2020
liamsi added a commit that referenced this issue Jun 9, 2020
* quickfix: pub all fields

* add debug output for #311
@liamsi liamsi added bug Something isn't working rpc labels Jun 9, 2020
@thanethomson thanethomson self-assigned this Jul 10, 2020
thanethomson added a commit that referenced this issue Jul 17, 2020
Closes #311.

Adds responding to WebSockets ping messages during the attempt to fetch
the next event from the event stream.

I debated whether or not to wrap the fetching of the next message in a
finite or an infinite loop, but wrapping it in a finite loop would just
push that same responsibility further up the stack. Using this approach
allows us to do away with the optionality of a `ResultEvent` and
simplifies the method signature.

Also, I added in a `close` method for the listener to allow one to
gracefully close the connection (avoids those ugly `websocket: close
1006 (abnormal closure): unexpected EOF` messages in the Tendermint
logs).

Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson added this to the v0.16.0 milestone Aug 5, 2020
@thanethomson thanethomson modified the milestones: v0.16.0, v0.17.0 Aug 28, 2020
@ebuchman
Copy link
Member

Now that #516 is merged when we update ibc to use latest tendermint we should check that this is fixed. I expect it should be.

@romac
Copy link
Member

romac commented Sep 23, 2020

Now that #516 is merged when we update ibc to use latest tendermint we should check that this is fixed. I expect it should be.

I am currently doing this as part of informalsystems/hermes#90 and informalsystems/hermes#243

@ebuchman
Copy link
Member

Note that the new websocket is only on master, its not in v0.16. Not sure if you're gunning for master all at once or doing an intermediary through v0.16

@romac
Copy link
Member

romac commented Sep 23, 2020

I have to get some changes into tendermint-rs as part of this work, so I guess I am going to go for master directly.

@romac
Copy link
Member

romac commented Oct 13, 2020

@ancazamfir Is this still an issue?

@ancazamfir
Copy link
Contributor Author

Looks like it's fixed, I don't see this anymore. Thanks!

@romac romac closed this as completed Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants