HTTP_UNAUTHORIZED , Problem #18463

issue Pedroxam opened this issue on March 29, 2020
  1. Pedroxam commented at 11:10 AM on March 29, 2020: none

    Unfortunately I'm using Linux, and bitcoin.conf is not maked auto ! so i make a file in the "/root/.bitcoin" path with this content:

    prune=600
    maxconnections=12
    maxuploadtarget=20
    rpcuser=user
    rpcpassword=user
    daemon=1
    keypool=10000
    

    So tell me why i cant connect to rpc json and i get following error : HTTP_UNAUTHORIZED

    when i remove rpc user and rpc password, then in "terminal" everything is work, but when i set credential, i get following error: Authorization failed: Incorrect rpcuser or rpcpassword

    so this code not work: bitocin-cli -rpcuser user -rpcpassword user getnewaddress or bitocin-cli -rpcuser=user -rpcpassword=user getnewaddress

    my user is: "user" and password is "user". but why not work ?

    why bitcoin have bug ?

    this is very simple things. why this not work ?

    php code not work:

    $bitcoin = new Bitcoin('user','user', '127.0.0.1', '8332');
    
    $info = $bitcoin->getBalance();
    
    var_dump($info); // FALSE
    var_dump($bitcoin); //HTTP_UNAUTHORIZED
    

    nodejs code not work:

    var bitcoin = require('bitcoin');
    
    var client = new bitcoin.Client({
        host: '127.0.0.1',
        port: '8332',
        user: 'user',
        oass: 'user',
        ssl: false,
        sslStrict: false
    });
    
    client.getWalletInfo(function (err, result) {
            if (err) {
                res.send(err.message); // 401 status
            }
            else {
                res.send(result);
            }
        });
    

    just worked in terminal without creditnal.

    how can fix this.

  2. Pedroxam added the label Bug on Mar 29, 2020
  3. Pedroxam commented at 11:51 AM on March 29, 2020: none

    After restart bitcoind, now is worked ! thanks.

  4. fanquake closed this on Mar 29, 2020

  5. Pedroxam commented at 12:08 PM on March 29, 2020: none

    now problem after problem in the next steps. in the twenty first century, provide the tools in a way that does not require for enter commands. The Linux system has really ruined everything.

  6. DrahtBot locked this on Feb 15, 2022
Contributors
Labels

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: 2026-05-03 15:14 UTC

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