mirobit / bitcoin-node-manager Goto Github PK
View Code? Open in Web Editor NEW:bar_chart: Lightweight dashboard and control system for bitcoin nodes
License: MIT License
:bar_chart: Lightweight dashboard and control system for bitcoin nodes
License: MIT License
Bitcoin Node Manager shows the IP address of my node as unknown.
It seems to only show an IP address when I manually set it in Bitcoin Core using -externalip.
The node is set up on a Raspberry Pi 3 Model B+ using the packaged Snap version with port forwarding configured at the router.
I think it would be nice to show the external IP address in BNM instead of reporting it as unknown.
Here is a useful API https://www.ipify.org that can be used to grab the external IP address.
Could we have a way of seeing both uploaded and downloaded traffic for each individual peer on the peers page? Currently all we see is one traffic figure per peer. Something as simple as separate traffic in and traffic out columns would be great.
Just installed it on ubuntu (rasp4) and gives me this error
Fatal error: Uncaught Error: Call to undefined function App\curl_init() in /var/www/html/bitcoin-node-manager/src/jsonRPCClient.php:79 Stack trace: #0 /var/www/html/bitcoin-node-manager/src/Utility.php(461): App\jsonRPCClient->__call() #1 /var/www/html/bitcoin-node-manager/src/Content.php(6): App\getPeerData() #2 /var/www/html/bitcoin-node-manager/index.php(89): App\createMainContent() #3 {main} thrown in /var/www/html/bitcoin-node-manager/src/jsonRPCClient.php on line 79
no rights issue because i did 777 on all files
The expected behavior is to pick the IPv4 with the highest score value returned by getnetworkinfo
.
It seems BNM currently simply picks random (or maybe the last) IPv4 on the list.
When the Peers page is first opened the clickable chevron symbol points up, but the data is not displayed below the header. After the chevron is clicked, the data rolls down -- is displayed -- and the chevron points down. After the down chevron is clicked, the data rolls up-- is hidden -- and the chevron again points up.
With I2P now officially integrated in bitcoind, it would be cool to show that status and address in the Main server summary.
Blocks tab fails because function getrawtransaction() is missing a third argument "blockhash". Without this argument it just looks in the mempool for the txid not in the block.
Changing the line 116 on Content.php should fix the issue:
$coinbaseTx = $bitcoind->getrawtransaction($block["tx"][0], 1);
to
$coinbaseTx = $bitcoind->getrawtransaction($block["tx"][0], 1, $block["hash"]);
Thank you for your work!
Recently upgraded to v1.3.0. Clicking 'About' in the web interface shows version 1.2.0.
Hi,
I've got a small issue with Bitcoin Node Manager and wondered if you would be able to help?
In the node information panel on the main screen, my node's services are reporting as unknown:
Yet when I issue the command bitcoin-cli getnetworkinfo
my node reports this:
Bitnodes.io is also reporting my node's services correctly:
My set up is:
Raspberry Pi 3+
Raspberry Pi OS (Debian 10)
Apache 2.4.38
PHP 7.3
Bitcoin Core 0.20.0 (Snap Store)
Bitcoin Node Manager v0.6.0
My node is running in a standard home setup behind an ADSL router with port forwarding. The external IP address has been added to bitcoin.conf using externalip=
Any ideas?
This bug has been going on for a while but I have never had to forsite to take a screenshot of it until tonight.
I'm only interested in the top three lines. The bottom line has already been logged as #22.
If I do a refresh the errors go away and don't come back for a while. I only ever see them when I open the site up after being away from it for for a while.
The last time I looked at my node was about a day ago.
I do also get similar errors appearing if a peer with an unknown country IP address connects to my node but it soon catches up and the error vanishes.
I know it's something to do with the IP country code lookup. Any ideas?
I've mentioned this before as part of other issues but thought it might be best to raise it independently of them, now that they have all been resolved.
The issue is with the way the info panel information boxes are formatted. The individual info boxes are not the same size so if the page is resized they do not line up evenly.
The reason they do not line up is that the info boxes are not all the same height.
In the example below some are 97 pixels high and others are 95 pixels high.
I think this has something to do with the addition of the second font used for the GB text.
If this could be fixed I think the info boxes would line up evenly making the page look so much better on a smaller screen.
In src/Config.php I made the value of PASSWORD empty (two quotation marks). But I can't log in: the login page just refreshes. I tried changing PASSWORD to something non-empty but no joy. (This feels like the annoying "it doesn't work" kind of issue report, but I don't know what details might help.)
In some scenarios like localhost setup or onion client auth the password becomes pointless and also hinders infrastructure tests automation.
It would be cool to add option to disable password authentication.
TIA!
After upgrading my node to 0.21.0 this error has appeared:
I think it's something to do with this:
The getpeerinfo RPC no longer returns the whitelisted field by default. This field will be fully removed in the next major release. It can be accessed with the configuration option -deprecatedrpc=getpeerinfo_whitelisted. However, it is recommended to instead use the permissions field to understand if specific privileges have been granted to the peer. (#19770)
https://bitcoincore.org/en/releases/0.21.0/
I tried starting my node with with -deprecatedrpc=getpeerinfo_whitelisted
and also putting that in my config file but it made no difference.
"Unknown" displays instead.
I have patched my copy of /src/Utility.php, first line of function checkIpPort($ip){
thus:
/bitcoin-node-manager/src$ diff Utility.php.orig Utility.php
127c127
< if(preg_match("/^\[{0,1}[0-9a-z:\.]{7,39}\]{0,1}:[0-9]{1,5}$/", $ip)) {
---
> if(strpos($ip, ".onion") or preg_match("/^\[{0,1}[0-9a-z:\.]{7,39}\]{0,1}:[0-9]{1,5}$/", $ip)) {
Uncaught Error: Call to undefined function App\getServices() in /var/www/html/BNM/src/Peer.php
I get this error on login. I tried turning off geo lookup in config, but still get the error.
Any help would be appreciated. The full error is below
Fatal error: Uncaught Error: Call to undefined function App\getServices() in /var/www/html/BNM/src/Peer.php:51 Stack trace: #0 /var/www/html/BNM/src/Utility.php(551): App\Peer->__construct() #1 /var/www/html/BNM/src/Utility.php(464): App\createPeersGeo() #2 /var/www/html/BNM/src/Content.php(6): App\getPeerData() #3 /var/www/html/BNM/index.php(89): App\createMainContent() #4 {main} thrown in /var/www/html/BNM/src/Peer.php on line 51
Hi, Do you have any plans about make BNM litecoin compatible? Will be great to have this wonderfuls screens for LTC nodes too.
Hello,
I am giving a try to bitcoin-node-manager to manage my new full node.
Actually I am still syncing the node and the manager crashes.
Is it possible to catch the error and to the keep the dashboard up while syncing or am I doing something wrong?
Thank you!
`
Warning: fopen(http://[email protected]:8332/): failed to open stream: HTTP request failed! in /home/nexus/bitcoin-node-manager/src/jsonRPCClient.php on line 136
Notice: Undefined variable: content in /home/nexus/bitcoin-node-manager/index.php on line 82
`
I restarted my node today and noticed these errors:
A short while later I did a refresh and got this:
As soon as the geo tracing picked up the first IP address the errors went away.
I had just updated BNM to the very latest version so not sure if that had anything to do with this. I seem to remember seeing this before but did not mention it as it went away within minutes.
When loading BNM the first time or refreshing after a long time of no viewing I often get 3-6 of the following errors. Waiting 30 seconds or so and refreshing makes them all go away.
It seems like the page loads before the RPC portion gets all its data. These only rarely if ever appeared in v0.4.0. Is there some timeout value that changed from 0.4-0.5, or maybe some race condition?
Currently running my node with onlynet=ipv4
and listenonion=1
, so with active connections over TOR and clearnet, just not IPv6. The interface doesn't recognize the fact that IPv4 is active, it only notices the TOR.
Where does the script pull the IP and onion addresses from? Does it read the bind=x.x.x.x or externalip=x.x.x.x addresses in bitcoin.conf?
Just realised that the ban list cron job is no longer working. I can manually run the rules and that works fine. It's just the cron jobs no longer work.
Here's the error I get when I enter the cron job into the browser manually:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function App\jsonRPCClient::__construct(), 1 passed in /var/www/bitcoin/bnm/index.php on line 31 and at least 2 expected in /var/www/bitcoin/bnm/src/jsonRPCClient.php:39 Stack trace: #0 /var/www/bitcoin/bnm/index.php(31): App\jsonRPCClient->__construct('http://bitcoin:...') #1 {main} thrown in /var/www/bitcoin/bnm/src/jsonRPCClient.php on line 39
If I go back to the old version of BNM it work fine except I get the whitelist error but the job runs successfully and the appropriate nodes are blocked.
Any ideas?
When interrogating entries on the Memory Pool page, Bitcoin Block Explorer no longer works.
Hi,
I'm getting an error in the wallet section. Not sure if this is something to do with my setup. The chances are it is!
I have never used the wallet in my node and don't intend to. Just would just be nice not to get the error:
Notice: Undefined index: utxo in /var/www/bitcoin/bnm/views/wallet.phtml on line 76
Warning: Invalid argument supplied for foreach() in /var/www/bitcoin/bnm/views/wallet.phtml on line 76
When I set up my node I included wallet support. I have not looked into this issue very much. I was hoping that it's something obvious that you've seen before.
I set up the node first on a PC using Bitcoin Core (64bit), downloaded the blockchain and then swapped the disk over to a Raspberry Pi, where it's running now.
My setup is:
Raspberry Pi 3+
Raspberry Pi OS (Debian 10)
Apache 2.4.38
PHP 7.3
Bitcoin Core 0.20.0 (Snap Store)
Bitcoin Node Manager v0.6.0
The node is running with txindex=1
in the config file.
Thanks
Mark
In my copy of Peer.php I have a new line after the initial assignment to $this->id
/bitcoin-node-manager/src$ diff Peer.php.orig Peer.php
44a45
> $this->id = $peer["inbound"] ? '«' . $this->id : $this->id . '»';
Hi and thank you for this solution!
I got things set up and I am using the docker image on Ubuntu 20.04
Bitcoin Core not reachable: Failed to connect to 127.0.0.1 port 8332: Connection refused
With my bitcoind running (bitcoin core 0.20.1) I am getting above error message.
Here is my bitcoin.conf file
rpcuser=*****
rpcpassword=******
rpcport=8332
server=1
txindex=1
Is there something missing from my bitcoin.conf file to allow for this solution to connect to bitcoin core? Is there another logfile I can look at to determine whats going on?
Thank you in advance.
After updating my server with all the latest security patches and updates, and after performing a few reboots, I checked my Bitcoin Node Manager and I'm now getting the following errors on the main page of BNM.
Notice: Undefined index: softforks in /.../src/Node.php on line 144
Warning: Invalid argument supplied for foreach() in /.../src/Utility.php on line 253
I have tried updating to the latest version of the code but that made no difference.
I also reverted back to a snapshot taken before the updates (but not before the reboots) and I still get the same issues, so this is probably to do with the rebooting of the server, rather than anything else. I also rebooted my Bitcoin node at a similar time, in case it matters. I've got two separate servers.
I'm running BNM on:
Debian Linux 10
Linux 4.19.0-20-amd64 on x86_64
PHP Version 7.3.31-1~deb10u1
Any ideas?
Running v1.1.0, the new build that supports Tor v2 and v3 by displaying addresses on mouse-over. When I mouse-over the Tor address it incorrectly displays 127.0.0.1:9050 instead of the appropriate .onion address. If I run bitcoin-cli getnetworkinfo
on the nodes the appropriate .onion address does appear in the 'localaddresses' section.
Thanks for fixing issue #23
I was looking at the Forks page tonight and came across the same issue.
On this page there is only one option which does not work.
It would be nice to give this page the same amount of options as the other pages.
Thanks
bitcoin-cli listbanned
returns a ban_reason value. It would be helpful if this was displayed in Bitcoin Node Manager's Ban List page under 'reason'. In my Reason list all I see is 'Core' which isn't helpful from a diagnostics standpoint.
Would it be possible to link the main page to a filtered subset of connected peers when clicking the appropriate peer type or country?
For example, when clicking on any item in the top peer clients panel, say Core 0.20.0 peers for example, I'd like it to open up the Peers page and list all the Core 0.20.0 peers that are connected to my node. Same goes for the global peer distribution section. If I clicked on Germany for example, I'd like to see a list of all my German peers.
Security conscious users may want to run BNM on a separate, remote machine so that Bitcoin Node is not endangered by the PHP stack and app.
One way to do it is to expose Bitcoin RPC as onion with client authentication.
The good news is this almost works with BNM already.
The only thing missing is:
CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5_HOSTNAME,
CURLOPT_PROXY => '127.0.0.1:9050'
...in jsonRPCClient.php
, obviously subject to user config setting.
For the connected Bitcoin node and for the peers it would be cool to support the new NODE_COMPACT_FILTERS
service flag.
This regards "Services" paragraph and column.
PS Keep up the great work! I find BNM valuable tool.
Hi,
Any chance of updating the mobile device support so menus are included?
This is how it looks on my Android phone:
Would be great if the sidebar could be included as a drop down menu. At the moment there is no menu at all.
I get the same issues when I switch to the browser's desktop site option:
The screenshots are from Bromite but I get the same issue in Chrome. The phone is running Android 8.1.0.
Thanks Mark
After updating my node to Satoshi:0.20.1 I am now getting an error at the top of the page.
Notice: Undefined index: ban_reason in /var/www/bitcoin/bnm/src/Content.php on line 72
The ban list for rules I have setup myself now shows the reason for my bans as "unknown"
If I clear out the ban list, the warning at the top of the screen goes away.
I think this may be related to the recent update and the changes regarding misbehavnig peers.
https://bitcoin.org/en/release/v0.20.1#changes-regarding-misbehaving-peers
There is no method to list discouraged addresses. They are not returned by the listbanned RPC. That RPC also no longer reports the ban_reason field, as "manually added" is the only remaining option.
It would be interesting to have a column in the ban list showing country of each banned IP. It would be something a person could see if nodes in a certain country were misbehaving more frequently than others. Not a necessary feature, but interesting nonetheless
would it be possible to list client type in the banlist too? This would help visualize if bans were going to specific client or version
After the initial run and after some time that the peer list changes, the dashboard is not accessible. Error recieving is:
Fatal error: Uncaught Error: Call to undefined function App\curl_init() in /home/testbed/Downloads/bmn/src/Utility.php:662 Stack trace: #0 /home/testbed/Downloads/bmn/src/Utility.php(540): App\getIpData() #1 /home/testbed/Downloads/bmn/src/Utility.php(461): App\createPeersGeo() #2 /home/testbed/Downloads/bmn/src/Content.php(6): App\getPeerData() #3 /home/testbed/Downloads/bmn/index.php(78): App\createMainContent() #4 {main} thrown in /home/testbed/Downloads/bmn/src/Utility.php on line 662
After taking a closer look at the code, I pressume it has to do with the ip geolocation data. Is there any way to disable the geolocation service and only recieve the IP addresses of peers? I don't mind removing the chart and the map on the main screen just to see if it will work that way. Any other suggestions would be appreciated.
The demo url is a 404
I love the dashboard, great work Mirobi!
It would be helpful to know what networks are using a proxy (usually this would be a tor proxy). with the getnetworkinfo call the daemon returns "networks" > "proxy". "proxy" is empty if it's accessible directly, the field has an address if a proxy is in use.
happy coding
In the Main -> Node sub panel the tor information does not seem to update correctly. I changed the onion_private_key on my bitcoin core node, restarted bitcoind, then restarted apache. BNM displays the old .onion address, not the current one shown in bitcoind's debug.log. Neither restarting apache2 nor shutting it down and starting again resolve the issue.
When I set const PEERS_GEO = TRUE;
apache returns the following error:
Fatal error: Uncaught Error: Call to undefined function App\curl_init() in /var/www/html/bnmbtclnd/src/Utility.php:627 Stack trace: #0 /var/www/html/bnmbtclnd/src/Utility.php(503): App\getIpData(Array) #1 /var/www/html/bnmbtclnd/src/Utility.php(429): App\createPeersGeo(Array) #2 /var/www/html/bnmbtclnd/src/Content.php(9): App\getPeerData() #3 /var/www/html/bnmbtclnd/index.php(74): App\createMainContent() #4 {main} thrown in /var/www/html/bnmbtclnd/src/Utility.php on line 627
Due to upload bandwidth constraints my connection can sometimes be sucked dry by my Bitcoin node.
To stop this I have set up some rules to limit each nodes traffic at 500 Mb per day. This works well but I do not want to limit any of the research nodes, with the binocular icon, or my separate Windows node.
I'd like a way of letting individual peers bypass the rules, or a way of adding an exception so that selected peers are never restricted.
I installed this on mu Odroid C1 with Ubuntu 18.04.4 LTS (GNU/Linux 3.10.107-13 armv7l)
So far it seems to work but when i click on "blocks" the following error comes:
Fatal error: Uncaught Exception: Unable to connect in /var/www/html/bnm/src/jsonRPCClient.php:144 Stack trace: #0 /var/www/html/bnm/src/Content.php(149): App\jsonRPCClient->__call('getrawtransacti...', Array) #1 /var/www/html/bnm/index.php(342): App\createBlocksContent() #2 {main} thrown in /var/www/html/bnm/src/jsonRPCClient.php on line 144
And some informational lines (IPv4) don't work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.