3

I am currently experimenting on testnet.

  • server a = monero wallet
  • server b = website

I have the monerod client synced. I run the monerod and monero-wallet-rpc on server a. I want to make my commands from server b. monero rpc command

./monero-wallet-rpc  --wallet-file testwallet --password test --rpc-bind-port 28080 --daemon-address 127.0.0.1:28081 --testnet --daemon-login test:test

monerod command

./monerod  --rpc-login test:test --testnet --rpc-bind-ip=127.0.0.1 --log-level=1

It gets stuck at

2018-02-01 22:42:51.060     7f577a44b780        INFO    global  contrib/epee/include/net/http_server_impl_base.h:76      Binding on 127.0.0.1:28080
2018-02-01 22:42:51.060     7f577a44b780        WARN    wallet.rpc      src/wallet/wallet_rpc_server.cpp:2945    Starting wallet rpc server

Any attempts to contact the RPC server from server b results in 401 unauthorized. When I start the monero-wallet-cli it works well.

  • Do you want to access monerod RPC or monero-wallet-cli RPC (or both)? – user36303 Feb 1 '18 at 22:58
  • Just the rpc. The wallet-cli works fine and all commands work – Anekdotin Feb 1 '18 at 23:01
  • The monerod says "synchonized ok" and seems fine with testnet blockchain. I also built it from source using git pull yesterday – Anekdotin Feb 1 '18 at 23:03
  • apparently with running log level=4 on the rpc, it shows the balance, and the 401 when i issue a command – Anekdotin Feb 1 '18 at 23:12
  • 1
    You need to add that as an answer so it can be accepted. – user36303 Feb 7 '18 at 16:53
4

401 HTTP error is defined as UNAUTHORIZED error meaning you don't have the permission to call the RPC API.

At the moment, Monero Wallet RPC requires authentication by default, username is: monero , password is a randomly generated string.

To disable the login: add the --disable-rpc-login flag to the command line.

If you want to specify a username and a password, add the --rpc-login username:password where username is your username and password is your password.

1

It seem like you have started the RPC correctly. Usually the RPC just stops at 'Starting wallet rpc wallet server' You are getting 401 because you might not be using using digest auth. You need to provdide the credentials used with --rpc-login rpc_username:rpc_password like this - curl -u rpc_username:rpc_password --digest -X POST.....

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.