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

Websocket connectivity not working as expected #1683

Closed
jcortejoso opened this issue Sep 13, 2021 · 0 comments · Fixed by #1698
Closed

Websocket connectivity not working as expected #1683

jcortejoso opened this issue Sep 13, 2021 · 0 comments · Fixed by #1698

Comments

@jcortejoso
Copy link
Member

jcortejoso commented Sep 13, 2021

Expected Behavior

Websocket connectivity works and I can connect using celocli or wscat to geth and query the API.

Current Behavior

What is the current behavior?

Current setup and documentation relays on websocket service to be served under /ws path. Based on the issue ethereum/go-ethereum#21441, geth websocket service now listen on / and does not answer requests under any other path, so requests to /ws does not work.

Potential solution

Based on the fix in upstream, we need to either update the documentation, setup, etc. to move the websocket endpoints to /, or having some path rewrite somewhere. We tested a path rewrite rule in GCP HTTP/s LB and this configuration works:
image

Additionally we should consider cherry-picking ethereum/go-ethereum#21646 as this PR fixes websocket connections through Kong.

@mergify mergify bot closed this as completed in #1698 Sep 22, 2021
mergify bot pushed a commit that referenced this issue Sep 22, 2021
…1698)

### Description

Cherry-picking from go-ethereum [this PR](ethereum/go-ethereum#21646).
The fix from the PR is needed for Kong and the GCP LB to be able to redirect the websocket properly.

### Tested

Tested in baklava forno env with and without Kong as proxy:
```
╰─ wscat -c wss://baklava-forno-k8s.celo-testnet.org/ws
Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}
< {"jsonrpc":"2.0","id":1,"result":"0x768513"}
```
```
╰─ geth attach wss://baklava-forno-k8s.celo-testnet.org/ws
Welcome to the Geth JavaScript console!

instance: celo/v1.4.0-unstable/linux-amd64/go1.16.8
at block: 7767331 (Wed Sep 22 2021 10:01:28 GMT+0200 (CEST))
 modules: eth:1.0 net:1.0 rpc:1.0 web3:1.0

To exit, press ctrl-d
>
```

### Related issues

- Fixes #1683 

### Backwards compatibility

[This celo-monorepo PR](celo-org/celo-monorepo#8100) needs to be merged/used to deploy new celo-blockchain versions to Forno due to [this issue](ethereum/go-ethereum#21441) (this endpoint change is already on master).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant