1

I try to deploy my contract using anchor, but i get this error:

Error: RPC request error: cluster version query failed: error sending request for url (http://127.0.0.1:8899/): error trying to connect: tcp connect error: Connection refused (os error 61) There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.

I am using macOs

1
  • You should run test validator. Use solana-test-validator needed.
    – toygr
    Commented Oct 25 at 8:02

1 Answer 1

2

If you are trying to use the local validator, it seems like it is not running, try these steps:

  • Start the local validator: solana-test-validator, on my side it requires sudo permissions, this might not be needed for you.
  • Deploy: anchor deploy

If you are using anchor test, it tries to start the validator itself, if you do not want that use anchor test --skip-local-validator.

If you want to use devnet, mainnet or testnet use proper RPC URL for them, you can use command: solana config set --url devnet

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.