• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Dash Node not responding to curl queries

Dev_D

New member
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
 
Hi, Dash Core responds over RPC, not HTTP. You might need an API like Insight instead? What are you trying to achieve here?
 
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]>
 
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:
@UdjinM6 : Could you please suggest what should we do here? Our node stopped responding to below RPC from outside the docker container while it is running absolutely fine when we run it from inside the docker container. Just FYI... we are using same CURL from last 2 years on the same DASH node (upgraded periodically):

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

Our DASH node version is 0.17.0.3.. it seems that above mentioned CURL was responsding properly till version 0.16.x.x but i might be wrong also.

Below is our compose file which we are using to get DASH node up and running:

YAML:
version: '2'

services:

    nodedash:

        image: dashpay/dashd:0.17.0.3

        container_name: dashnode1332

        ports:

            - "1332:9998"

            - "127.0.0.1:9999:9999"

        command: ["-disablewallet","-server=1","-printtoconsole=1","-onlynet=ipv4","-txindex","-dbcache=1024","-rpcthreads=128","-rpcuser=username","-rpcpassword=pwd","-blocksonly=1","-rpcclienttimeout=0","-reindex"]

        volumes:

            - /<directory>/node-dash/data:/root/.dashcore

        mem_limit: 16g
 
Last edited:
I'm completely clueless to help you with your problem... but you shouldn't be running dashcore as root.
 
@GrandMasterDash : Could you suggest what should we change if we should not be running dashcore as root? Can you suggest the changes in compose file?

No, sorry, this really isn't my thing. It's just that I saw your dashcore in root and assumed you was also running it as root. For security reasons you should be running it as a regular user or create it's own unique user.
 
If it is running inside a container, you can use root (but it's just as easy and safer to create a user).

Dash 0.17 includes some security-related backports from Bitcoin that changed the syntax of the configuration file. You might need to add `rpcbind` and/or `rpcallowip` instructions to dash.conf (or the settings you are passing as environment variables) to ensure you are allowing the right connections. Check the output at the top of debug.log (on startup) to see information about the port and IP where dashd is listening and allowing connections. Note that these config options must be in a named section in the dash.conf file if you are running on any network other than mainnet.

 
Just wanted to check if this issue is resolved? i think what i can suggest after reading from above description, you can use -rpcallowip parameter.
 
Back
Top