0

enter image description here

I can't start monero-wallet-rpc. I received an error: ERROR wallet. RPC Src / Wallet / wallet_rpc_server. cpp: 3443 wallet initialization failed: no connection to daemon. Thanks.

  • 1
    Obvious question, but is a daemon running? – dEBRUYNE Nov 23 '18 at 15:10
  • Yes, I'm sure the daemon is running, and I started it with. / monerod -- stage net -- rpc-bind-ip 127.0.0.1 -- rpc-bind-port 18081 -- rpc-login username: password -- confirm-external-bind -- detach,Is there any good solution? Thanks very much! – zhone Nov 24 '18 at 2:03
  • 1
    Are you starting monero-wallet-rpc with the --stagenet flag as well? – dEBRUYNE Nov 24 '18 at 8:02
  • Yes, do you need to configure the bitmonero. conf file? Or did I start the daemon in the wrong way? Thank you for any suggestion. – zhone Nov 26 '18 at 1:55
  • 1
    Why are you using different ports for --rpc-bind-port? Also, I don't see the --stagenet flag for monero-wallet-rpc. – dEBRUYNE Nov 27 '18 at 8:12
1

Firstly, you have to be running monerod for monero-wallet-rpc to work.

Next, if you start monerod with --stagenet, you have to start the wallet with --stagenet also. If you create a wallet for mainnet, it won't open on stagenet, same as for testnet. You cannot mix networks / daemons / wallets.

Next, you only need specify a rpc-bind-ip if you will be connecting remotely to the wallet RPC or daemon RPC. By default they listen on localhost so if you want to allow remote connections, you must specify an IP address they will bind to.

So, with all this understood, a setup with locally accessible only daemon and remotely accessible wallet RPC running from the same host, and both with their RPC's requiring login, you could start like:

monerod --rpc-login daemon-user:daemon-pass --detach

monero-wallet-rpc --rpc-bind-port 18089 --rpc-bind-ip 0.0.0.0 --confirm-external-bind \
  --rpc-login rpc-user:rpc-pass --daemon-login daemon-user:daemon-pass \
  --prompt-for-password --wallet-file my-wallet 

If you add --stagenet to one, add it to the other too.

Here's a variation which will allow both of these RPC servers to be externally accessible and using non-standard ports for demonstration:

monerod --rpc-bind-ip 0.0.0.0 --rpc-bind-port 18088 --confirm-external-bind \
  --rpc-login daemon-user:daemon-pass --detach

monero-wallet-rpc --rpc-bind-ip 0.0.0.0 --rpc-bind-port 18089 --confirm-external-bind \
  --rpc-login rpc-user:rpc-pass --daemon-login daemon-user:daemon-pass \
  --daemon-port 18088 --prompt-for-password --wallet-file my-wallet

Lastly, all these flags are documented:

monerod --help
monero-wallet-rpc --help
  • I'm glad! I have been solved, thank you for your advice, wish you have a nice evening! – zhone Dec 3 '18 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.