This means that your node is not listening for HTTP traffic on localhost port 9650. There are a few reasons this might happen.
First, make sure that your node is actually running. If you’re running the node in a terminal, you have to be running the node in a separate tab/window from the one you’re using to make the API calls. If you do
CTRL + C to kill your node and then make an API call, it will fail because the node is not running.
If you’re running a node on another machine, replace
127.0.0.1 in the API call with the machine’s IP address.
If you started your node with command-line argument
--http-port=9700 then replace
9650 in the API call with
9700 (or whatever port you specified.)
Starting node fails with:
parsing parameters returned with error couldn't create db at ...
There is already a node running on your machine.