cronos
cronos copied to clipboard
Deployed node websocket cannot connect
[v0.6.5]
` [json-rpc]
Enable defines if the gRPC server should be enabled.
enable = true
Address defines the EVM RPC HTTP server address to bind to.
address = "0.0.0.0:8545"
Address defines the EVM WebSocket server address to bind to.
ws-address = "0.0.0.0:8546"
API defines a list of JSON-RPC namespaces that should be enabled
Example: "eth,txpool,personal,net,debug,web3"
api = "eth,txpool,personal,net,debug,web3"`
used ws://127.0.0.1:8546 ws://ip:8546
None of them can be connected Am I missing any configuration?
ws://127.0.0.1:8546 should work, any error messages? does the http one works?
Websocket is not allowed HTTP success
How can I check the recent running log when I start the service??
How can I check the recent running log when I start the service??
Can you see the log show up at the terminal? you can redirect it to a file.
Apr 23 16:03:43 cronosd[75288]: 4:03PM INF indexed block height=2463477 module=txindex server=node Apr 23 16:03:47 cronosd[75288]: 4:03PM INF Starting JSON WebSocket server address=0.0.0.0:8546 Apr 23 16:03:47 cronosd[75288]: 4:03PM INF New websocket connection module=rpc-server protocol=websocket remote=127.0.0.1:33472 server=node Apr 23 16:03:47 cronosd[75288]: 4:03PM INF Starting wsConnection service impl=wsConnection module=rpc-server protocol=websocket remote={"IP":"127.0.0.1","Port":33472,"Zone":""} server=node
Same error here. Beside the log from @qinxg I'm also getting these error messages:
May 01 23:03:59 ns3157954 cronosd[3264]: 11:03PM ERR Failed to read request err="websocket: close 1006 (abnormal closure): unexpected EOF" module=rpc-server protocol=websocket remote={"IP":"127.0.0.1","Port":54912,"Zone":""} server=node
May 01 23:03:59 ns3157954 cronosd[3264]: 11:03PM INF Stopping wsConnection service impl={"Logger":{}} module=rpc-server protocol=websocket remote={"IP":"127.0.0.1","Port":54912,"Zone":""} server=node
May 01 23:03:59 ns3157954 cronosd[3264]: 11:03PM ERR error while stopping connection error="already stopped" module=rpc-server protocol=websocket server=node
Tested by using $ geth attach ws://$WS_HOST:8546
$ eth version
Geth
Version: 1.10.17-stable
Git Commit: 25c9b49fdb74931137431c24cf28d3c65f9420d2
Git Commit Date: 20220329
Architecture: amd64
Go Version: go1.18
Operating System: linux
GOPATH=
GOROOT=go
you need https://www.mortysnode.nl/secure-your-strong-node-with-a-reverse-proxy/
wss will be work :)
you need https://www.mortysnode.nl/secure-your-strong-node-with-a-reverse-proxy/
wss will be work :)
I don't think it's wss problem.