1

Hi All,
After running solana-test-validator on arch linux, I tried to test solana balance which is showing following error.
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying toconnect: │ tcp connect error: Connection refused (os error 111)

I tried to check
Systemctl status rpcbind (to check whether rpc server is running or not)
it shows its active
netstat -tuln 8899 (to check 8899 port is listening to or not)
is shows its listening
sudo systemctl stop iptables.service (Tried to disable firewall temporarily)
But still the same error is facing
I tried by changing older versions also but none worked. Currently these are versions I am using
arch-linux 2023
solana-cli 1.14.17
rustc 1.67.1
anchor-cli 0.26.0
Please help if possible, thanks in advance.

1 Answer 1

1

If the balance query is failing, then the test validator is likely not running, or there may be another service on those ports.

As a first step, try to re-run solana-test-validator in a new window, and take note of the reported ports used, ie:

$ solana-test-validator
Ledger location: test-ledger
Log: test-ledger/validator.log
Identity: 4GhjH1h5RivM8jiMoR3fi2Eynmh1eC3zumS9T5dCrUsh
Genesis Hash: 55jCWyciVBu7f2oS2K3AyS7qMiquQe5Lwggzzs1GFRC1
Version: 1.14.16
Shred Version: 55699
Gossip Address: 127.0.0.1:1024
TPU Address: 127.0.0.1:1027
JSON RPC URL: http://127.0.0.1:8899

And then in another window, try to query your default balance:

$ solana --url <JSON RPC URL REPORTED> balance
500000000 SOL

If that works, then likely some other process is listening on those ports -- be sure to delete them and then run your test validator so it's sure to use those ports. Or you can override the RPC ports used on your test validator using the --rpc-port argument.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.