I am getting this error when i am running the command anchor test : Error: Your configured rpc port: 8899 is already in use

And i know i have to kill the local validator from this question but i don't know how to kill the local validator .

1 Answer 1


If you're running anchor test and you have a local validator already running, you can use the following command to skip the validator startup:

anchor test --skip-local-validator

Otherwise you can kill whatever is running on port 8899 with:

$ lsof -i :8899

$ kill -9 <PID>

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.