Search code examples
solana

can't start solana validator node,can't connect


I have used SSR, and the viewer can access the node

get_cluster_shred_version failed: 108.160.170.41:8001, connection timed out
.....
[2022-05-07T01:25:37.984950553Z INFO  solana_validator] Contacting 128.242.240.212:8001 to determine the validator's public IP address
....
Unable to determine the validator's public IP address


Solution

  • This error happens when it isn't possible for the software to figure out what its public ip address is for the gossip protocol at this line: https://github.com/solana-labs/solana/blob/8d0134e0fdede539cf8ab89ef0ce794f1d41f9dc/validator/src/main.rs#L2819

    To be explicit, pass --gossip-host and --gossip-port, ie:

    $ solana-validator <all of your previous args> --gossip-host YOUR_IP_HERE --gossip-port 8001
    

    Note that you don't need to have your gossip port at 8001, but it's a convention.