rpc auth fails ‘Error parsing command line arguments: Invalid parameter -rpcpasssword=password #30939

issue kegdeg openend this issue on September 20, 2024
  1. kegdeg commented at 8:20 pm on September 20, 2024: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    After providing rpc credentials using bitcoin-cli, the following error appears:

    ‘Error parsing command line arguments: Invalid parameter -rpcpasssword=password’

    telnet to localhost connects with bitcoind running

    Expected behaviour

    no error

    Steps to reproduce

    This is how the bitcoin.conf looks like:

    # Enable RPC server server=1

    # RPC settings rpcuser=user rpcpassword=password

    # Optional: Set the RPC port (default is 8332) rpcport=8332

    # Optional: Allow connections from specific IP addresses # If you want to allow connections from any IP address, uncomment the next line #rpcallowip=0.0.0.0/0

    # If you want to restrict to a specific IP address or subnet #rpcallowip=

    bitcoin-cli -rpcuser=user -rpcpasssword=‘password’ start

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    27.0

    Operating system and version

    Ubuntu 20.04.6 LTS

    Machine specifications

    No response

  2. pinheadmz commented at 8:53 pm on September 20, 2024: member
    “rpcpasssword” with 3 S’s or 2?
  3. kegdeg commented at 9:18 pm on September 20, 2024: none
    Oh wow, it should be 2 ’s’. Although I also had that error when using another password which I copy/pasted (maybe there was a spacing error cannot check now), just used password for the example. Those commands and bitcoin.conf are the correct ones, right? Will check it back again when I am back in front of the terminal.
  4. kegdeg commented at 0:13 am on September 21, 2024: none

    This is the bitcoin.conf Screenshot from 2024-09-20 18-07-52

    I removed the triple S, now getting the following error from the following command:

    bitcoin-cli -rpcuser=user -rpcpassword -stdinrpcpass start

    RPC password> error: Authorization failed: Incorrect rpcuser or rpcpassword

    (i type password)

  5. pinheadmz commented at 12:49 pm on September 21, 2024: member
    try removing -rpcpassword ?
  6. pinheadmz commented at 12:51 pm on September 21, 2024: member
    also what is start for?
  7. kegdeg commented at 8:24 pm on September 21, 2024: none

    changed it to ./bitcoin-cli -rpcuser=user -stdinrpcpass -netinfo, ’error: Authorization failed: Incorrect rpcuser or rpcpassword

    Also trying: curl –user user:password –data-binary ‘{“jsonrpc”: “1.0”, “id”:“curltest”, “method”: “getblockchaininfo”, “params”: [] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:8332/

    the server shows 2024-09-21T20:21:44Z ThreadRPCServer incorrect password attempt from 127.0.0.1:44938

  8. maflcko commented at 10:00 am on September 22, 2024: member
    What are the exact steps to reproduce. Including the start of the server. Without full and exact steps to reproduce, there is nothing that can be done here.
  9. kegdeg commented at 6:01 pm on September 22, 2024: none

    steps to reproduce

    start bitcoind: bitcoind -datadir=’/path/to/node'

    the bitcoin.conf file is located in ~/.bitcoin/bitcoin.conf

    server=1 rpcuser=user rpcpassword=password rpcport=8332

    I try checking rpc connectivity with

    ‘curl –user ‘user’ –data-binary ‘{“jsonrpc”:“1.0”,“id”:“curltext”,“method”:“getinfo”,“params”:[]}’ -H ‘content-type:text/plain;’ http://127.0.0.1:8332’ (I do type password in the terminal prompt)

    there is no response and the node returns: ‘2024-09-22T18:01:11Z ThreadRPCServer incorrect password attempt from 127.0.0.1:42004’

  10. sipa commented at 6:04 pm on September 22, 2024: member
    If you specify -datadir, Bitcoin Core will use the bitcoin.conf file located there, not the default location one’s in ~/.bitcoin.
  11. kegdeg commented at 9:35 pm on September 22, 2024: none
    yes, that solved it, thanks!
  12. kegdeg closed this on Sep 22, 2024

  13. kegdeg commented at 9:36 pm on September 22, 2024: none
    -datadir specified, must use bitcoin.conf in datadir

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-19 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me