I’d like to add WebSocket URL as:
http://0.0.0.0:8900
So I typed solana config
get to get the location of config.yaml
file. Then changed the WebSocket URL as followed above, however, after restarting the node and the server http://0.0.0.0:8900
is not listed on netstat -tulpn
. Do I have to do anything else or my node is unable to recognize the comfig.yaml file? Or do I have to pass additional parameter while starting the node? Any help appreciated thanks in advance.
Result of solana config get:
Config File: /home/centos/.config/solana/cli/config.yml
RPC URL: http://api.devnet.solana.com
WebSocket URL: http://0.0.0.0:8900
Keypair Path: /home/centos/solana/validator-keypair.json
Commitment: confirmed
It changes the WebSocket URL after I modify the config.yaml file but doesn’t listed in netstat.
2
Answers
solana config get
only shows the client configuration, and not the node / validator configuration.If you’re using either
solana-validator
orsolana-test-validator
, you can set the rpc-port at the command line, and the websocket port will be right after:and somewhere else, you can see:
So the websocket port is
10002
.To have the client connect to this validator, you can do:
This is how I started the node:
I did pass the port as 8899, so by default WS port should be 8900 right? I also changed the config.yml file to make it 0.0.0.0 in order to connect outside of the node. It’s visible in netstat ports but I can connect to 8900 only locally.