Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dash-cli doesn't respect dash.conf's rpcbind #5459

Open
coolaj86 opened this issue Jun 23, 2023 · 2 comments
Open

dash-cli doesn't respect dash.conf's rpcbind #5459

coolaj86 opened this issue Jun 23, 2023 · 2 comments

Comments

@coolaj86
Copy link

coolaj86 commented Jun 23, 2023

Scenario

dash-cli getaddressbalance '{"addresses": ["Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}'

dash.conf

[main]
rpcuser=alice
rpcpassword=youllgethacked
bind=10.11.5.101:9999
rpcbind=10.11.5.101:9998
rpcallowip=10.11.5.101/24
zmqpubrawtx=tcp://10.11.5.101:28332
zmqpubrawtxlock=tcp://10.11.5.101:28332
error: Could not connect to the server 127.0.0.1:9998

Make sure the dashd server is running and that you are connecting to the correct RPC port.

Yes, the server is running. Yes, it connects as expected when rpcbind=127.0.0.1:9998.

Bugs

Two weird things here:

  1. dash-cli doesn't know how to use the correct address for rpc
  2. dashd doesn't bind to localhost when binding somewhere else
    (I don't think I've had this problem with other network software)
@coolaj86 coolaj86 changed the title dash-cli doesn't respect dash.conf for rpcbind dash-cli doesn't respect dash.conf's rpcbind Jun 23, 2023
@UdjinM6
Copy link

UdjinM6 commented Jun 23, 2023

  1. check dash-cli help
$ dash-cli --help | grep rpcconnect -A1
  -rpcconnect=<ip>
       Send commands to node running on <ip> (default: 127.0.0.1)

try

dash-cli -rpcconnect=10.11.5.101:9998 getaddressbalance '{"addresses": ["Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}'
  1. you need to specify all addresses you want to bind to when you choose not to use the default one
    dash.conf
[main]
rpcuser=alice
rpcpassword=youllgethacked
bind=10.11.5.101:9999
rpcbind=10.11.5.101:9998
rpcbind=127.0.0.1:9998 # <----- this
rpcallowip=10.11.5.101/24
zmqpubrawtx=tcp://10.11.5.101:28332
zmqpubrawtxlock=tcp://10.11.5.101:28332

@coolaj86
Copy link
Author

coolaj86 commented Jun 23, 2023

  1. I call that a bug still. Unless rpcconnect is specified, it should respect the default value that's already set. Bonus: would be nice if the error message told the user about using rpcconnect.

  2. That would be good to have more clear in the docs:

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants