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

Web sockets seems to have moved from /ws to / on latest upgrade #21441

Closed
credfeto opened this issue Aug 12, 2020 · 3 comments
Closed

Web sockets seems to have moved from /ws to / on latest upgrade #21441

credfeto opened this issue Aug 12, 2020 · 3 comments
Assignees

Comments

@credfeto
Copy link

credfeto commented Aug 12, 2020

Hi there,

Please note that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use discord or the Ethereum stack exchange at https://ethereum.stackexchange.com.

System information

Geth version:

Geth
Version: 1.9.19-stable
Git Commit: 3e0641923d78bf1905e596a3a41a54277540bec7
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.14.2
Operating System: linux
GOPATH=
GOROOT=go

OS & Version: Linux
Commit hash : n/a

Expected behaviour

To be able to connect to web sockets still to be ws://host:port/ws

Actual behaviour

Web sockets now appear at:

ws://host:port

Steps to reproduce the behaviour

Upgrade a working geth on previous release version with command line:

geth --port 30304 --http --http.port=8545 --http.addr=0.0.0.0 --http.api=eth,net,web3,debug --http.corsdomain="*" --http.vhosts=examplecom --nodiscover --graphql --graphql.corsdomain="*" --graphql.vhosts=example.com --networkid 1234 --ws --ws.port=8546 --ws.addr=0.0.0.0 --ws.origins="*" -ws.api=eth,net,web3,debug --verbosity 3 --identity test-node

  • note had to change the graphql so its on the same port as http, but didn't see any corresponding requested change for web sockets.

Backtrace

[backtrace]
@karalabe
Copy link
Member

Websockets were always supposed to be on the root. Perhaps previously it didn't care about the path and answered on all of them and now someone fixed it so it only answers on root?

@renaynay
Copy link
Contributor

Yeah I checked it out and previous version allowed any path (not just /ws) which shouldn't be the case. #21105 refactored the way http servers work, so this likely solved the issue.

@renaynay
Copy link
Contributor

Closing this issue as the described behavior was unexpected and has now been fixed.

mergify bot pushed a commit to celo-org/celo-blockchain 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants