Dash Node not responding to curl queries

Dev_D

New Member
Sep 24, 2019
4
0
1
33
Hi I have a dash node which is syncing but not responding to curl queries . I have reindexed it twice now but still does not work. Any help please.

Error :

curl: (56) Recv failure: Connection reset by peer
CURL used - curl --user <username>:<password> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' <server>

i am running the curl inside the VM
 

strophy

Administrator
Dash Core Team
Moderator
Dash Support Group
Feb 13, 2016
765
448
133
Hi, Dash Core responds over RPC, not HTTP. You might need an API like Insight instead? What are you trying to achieve here?
 

Dev_D

New Member
Sep 24, 2019
4
0
1
33
I just wanted to check the Latest blockheight in my own node . and this curl query i have been using now for 2 years directly on the node and that works. also i am trying this using postman to hit my server where my Dash node is but its still the same .Can you please help.

i am using - curl --user <username>:<password> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' <localh:[postortonwhichDashisrunning]>
 

thephez

Member
Dash Core Team
Jan 23, 2016
125
62
78
I just wanted to check the Latest blockheight in my own node . and this curl query i have been using now for 2 years directly on the node and that works. also i am trying this using postman to hit my server where my Dash node is but its still the same .Can you please help.

i am using - curl --user <username>:<password> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' <localh:[postortonwhichDashisrunning]>
Just ran this on my (version 0.17) node and got a successful response. You're running curl on the same machine as Dash Core is running on? Also, do you have server=1 and rest=1 set in your dash.conf file?

curl --user <username>:<password> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://localhost:9998

Response
JSON:
{
    "result":1507667,
    "error":null,
    "id":"curltest"
}
 
Last edited:

vishgpt

New Member
Sep 25, 2019
2
0
1
32
Thanks for the reply. We dont have anything in the dash.conf file in our node. Should we add it?