craigwatson / bitcoind-status

PHP application to display status and information from the Bitcoin node daemon.
https://odin.vikingserv.net
Apache License 2.0
82 stars 77 forks source link

HTTP_UNAUTHORIZED #21

Closed DemonRx closed 8 years ago

DemonRx commented 8 years ago

It's declaring

There has been an error communicating with the Bitcoin Daemon

HTTP_UNAUTHORIZED

Please let me know the solution to this thanks

craigwatson commented 8 years ago

Hi,

That looks like an RPC credentials problem.

Can you verify the credentials in config.php against your bitcoin.conf flle?

Thanks, Craig

DemonRx commented 8 years ago

I'm using an altcoin in this situation > sprouts coin as a test, and if i get that to work right, i want to use it officially for DigiCube

i was wondering if this also has anything to do with the wallet having a password (as in walletpassphrase not the rpcpassword ?

also the config file is coded so only certain 'whitelisted' IPs can access it? i can't just allow any public user to view stats?

i'll double check again that the conf matches with the config.php credentials

On Fri, Apr 15, 2016 at 3:02 AM, Craig Watson notifications@github.com wrote:

Hi,

That looks like an RPC credentials problem.

Can you verify the credentials in config.php against your bitcoin.conf flle?

Thanks, Craig

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210317548

craigwatson commented 8 years ago

The script should work with any altcoin as long as it uses the same RPC interface as Bitcoin.

The wallet passphrase should not have any effect because the script doesn't interface with any wallets.

The main whitelist is for cache management - by default anyone can view the status page in a browser, and only a whitelisted set of IP addresses can clear or bypass the cache. There are also stats collection scripts for connections and peers that should only be used via cron (see the Readme) and so have whitelists of their own.

DemonRx commented 8 years ago

well for some reason if i don't add my ip to the config.php i can't view bitcoind-status/index.php in the browser as i'm accessing this remotely cause i'm running the daemon on a vps.

i'm just waking up too, i'll send you screenshots of the settings in my .conf and config.php when i get to it.

thnx for helping today.

On Fri, Apr 15, 2016 at 7:46 AM, Craig Watson notifications@github.com wrote:

The script should work with any altcoin as long as it uses the same RPC interface as Bitcoin.

The wallet passphrase should not have any effect because the script doesn't interface with any wallets.

The main whitelist is for cache management - by default anyone can view the status page in a browser, and only a whitelisted set of IP addresses can clear or bypass the cache. There are also stats collection scripts for connections and peers that should only be used via cron (see the Readme) and so have whitelists of their own.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210433359

DemonRx commented 8 years ago

sending you the config files for you to look over.

On Fri, Apr 15, 2016 at 7:52 AM:

well for some reason if i don't add my ip to the config.php i can't view bitcoind-status/index.php in the browser as i'm accessing this remotely cause i'm running the daemon on a vps.

i'm just waking up too, i'll send you screenshots of the settings in my .conf and config.php when i get to it.

thnx for helping today.

On Fri, Apr 15, 2016 at 7:46 AM, Craig Watson notifications@github.com wrote:

The script should work with any altcoin as long as it uses the same RPC interface as Bitcoin.

The wallet passphrase should not have any effect because the script doesn't interface with any wallets.

The main whitelist is for cache management - by default anyone can view the status page in a browser, and only a whitelisted set of IP addresses can clear or bypass the cache. There are also stats collection scripts for connections and peers that should only be used via cron (see the Readme) and so have whitelists of their own.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210433359

craigwatson commented 8 years ago

I don't seem to have any config files, however - if your Bitcoin daemon is not running on the same machine as the status page, you will need to allow the status script access to the Bitcoin daemon via the RPC whitelist option in bitcoin.conf.

No options need to be changed in config.php for this to work, just the daemon IP/hostname and RPC credentials.

Note that the status script was originally intended to be run on the same server as the Bitcoin daemon, which is why the default RPC values in config.php are set to 127.0.0.1.

DemonRx commented 8 years ago

they are on the same machine i've attached a link to the config files on my google drive. ​ sprouts.conf https://drive.google.com/file/d/0Bw98jYciD8-2NHV2MWlBaWhMLWRmMGRUaV9VOHZyc3VJZEI0/view?usp=drive_web ​​ config.php https://drive.google.com/file/d/0Bw98jYciD8-2bW5DN3dqWGxfMWtxb1U5YmpHRVNlTkhyd2Fv/view?usp=drive_web

On Fri, Apr 15, 2016 at 1:32 PM, Craig Watson notifications@github.com wrote:

I don't seem to have any config files, however - if your Bitcoin daemon is not running on the same machine as the status page, you will need to allow the status script access to the Bitcoin daemon via the RPC whitelist option in bitcoin.conf.

No options need to be changed in config.php for this to work, just the daemon IP/hostname and RPC credentials.

Note that the status script was originally intended to be run on the same server as the Bitcoin daemon, which is why the default RPC values in config.php are set to 127.0.0.1.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210557247

craigwatson commented 8 years ago

Can you try 127.0.0.1 instead of localhost?

DemonRx commented 8 years ago

yup i did that right after i sent you the file. still same error :/

On Fri, Apr 15, 2016 at 2:39 PM, Craig Watson notifications@github.com wrote:

Can you try 127.0.0.1 instead of localhost?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210585602

craigwatson commented 8 years ago

Have you tested the script with an actual Bitcoin daemon?

DemonRx commented 8 years ago

no, cause i wouldn't be able to run bitcoind, would need more server space.

so this is a bit of a mystery why it's not working.

On Fri, Apr 15, 2016 at 2:58 PM, Craig Watson notifications@github.com wrote:

Have you tested the script with an actual Bitcoin daemon?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/craigwatson/bitcoind-status/issues/21#issuecomment-210596768

craigwatson commented 8 years ago

Indeed - I'm only able to test against Bitcoind (both core and classic) - altcoins are unfortunately not within the scope of this script.

As per the readme, it should work with altcoins but no guarantees are made.

drmed92 commented 4 years ago

same problem here, have you solved it ?

craigwatson commented 4 years ago

@drmed92 are you using an altcoin?

drmed92 commented 4 years ago

@drmed92 are you using an altcoin?

yep, zcashd by: https://github.com/quentinlesceller/zcashd-status#getting-started

craigwatson commented 4 years ago

@drmed92 in that case, you're on your own - as I mentioned above, altcoins are not within the scope of this script and are not guaranteed to function in any way.

That said, I would personally check your RPC authentication username, password and whitelist configuration - the fork of my repository seems to have been done many years ago (and outside of the GitHub fork mechanism - no ahead/behind commit details are displayed), so it's worth taking it up with the maintainer of that repo.