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

Google Graphs not loading #56

Closed mcjoshea closed 4 years ago

mcjoshea commented 4 years ago

Hi Craig,

I have your bitcoind-status application working on my old laptop server. Everything appears to be working well, except the Google graphs.

When the data reaches the minimum data point level, a space occurs where the graphs should be. That's directly under the number of connections line. Before that happens there is no extra space there. There are currently 13 live connections to my node.

screenshot jph

The laptop is running: Debian 10 Apache 2.4.38 PHP 7.3 Satoshi 0.20.0 (still synching)

I'm not expecting the sync on this node to ever compete, as the drive is far too small. This just a test to make sure I know what I'm doing. It can be wiped and reloaded with a different configuration if required. I aim to build a final node later when I am happy with everything on this one.

The php CRON jobs are running every 5 minutes and the data files are filling up: /tmp/bitcoind-peers.data /tmp/bitcoind-status.data

All these pages display various forms of text data: http://192.168.1.111/chartdata.php?stat=connection http://192.168.1.111/chartdata.php?stat=peer http://192.168.1.111/stats.php?view http://192.168.1.111/peercount.php?view

When I look at the developers console in Chrome I see this:

Uncaught Error: Autoload failed with: SyntaxError: Unexpected token ' in JSON at position 1 at zc (loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:84) at xc (loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:83) at loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:96 at loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:96 loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:89 Uncaught Error: Must call google.charts.load before google.charts.setOnLoadCallback at Object.E.N [as setOnLoadCallback] (loader.js?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}:89) at (index):36

For fault finding I have given all the files in the bitcoind-status web directory 777 access and made sure they are all owned by www-data.

I have also set the majority of the options in the configuration file to true.

I'm just a bit stuck now with working out how to get a graphs to appear. Do you have any ideas?

Cheers Mark

mcjoshea commented 4 years ago

Hi Craig,

I finally managed to work out what was going wrong with my setup.

Turns out that my Cron jobs were not actually working and the only data collected was from when I manually tested the data collection scripts. When I changed to the Curl cron jobs, the graphs sprung into life. Also, I had to do a full reload in Chrome to get them both up and running.

This is what I have now:

Capture

Thanks for all your efforts with putting this application together. It really makes running a node so much more fun. Now my next job is to get everything running on my Raspberry Pi 3+! Fingers crossed that goes smoothly.

Cheers Mark