bitcoin-node-manager icon indicating copy to clipboard operation
bitcoin-node-manager copied to clipboard

Some errors after server maintenance

Open mcjoshea opened this issue 3 years ago • 5 comments

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?

mcjoshea avatar Apr 29 '22 18:04 mcjoshea

Here are details of my node, in case it helps:

image

mcjoshea avatar May 02 '22 22:05 mcjoshea

This also happened to me after I updated bitcoind to version 23. I made the edits shown below:

Go to /bitcoin-node-manager/src

line 144 in node.php add comment out \ (Should be two slashes)

Line 253 in Utility.php Remove:

function checkSoftFork($softForks){ foreach($softForks as $name => &$sf){ if($sf['type'] === 'bip9' && $sf['bip9']['status'] === "started"){ if(!preg_match("/[A-Za-z0-9 ]{2,25}/", $name)){ unset($softForks[$name]); continue; } $sf['status'] = ucfirst(preg_replace("/[^A-Za-z]/", '', $sf['bip9']['status'])); $sf['start_time'] = date("Y-m-d",$sf['bip9']['start_time']); $sf['timeout'] = date("Y-m-d",$sf['bip9']['timeout']); $sf['since'] = checkInt($sf['bip9']['since']); if(isset($sf['bip9']['statistics'])){ $sf['process'] = round(($sf['bip9']['statistics']['count']/$sf['bip9']['statistics']['period'])*100,1); } }else{ unset($softForks[$name]); } } return $softForks; }

MeowMeNot avatar May 11 '22 02:05 MeowMeNot

Thanks for that. I never even realised I had updated my node to latest version until today when I saw your message! To get rid of the errors all I had to do was to comment out line 144 of Node.php and that did the trick.

mcjoshea avatar Jun 19 '22 22:06 mcjoshea

This issue is stale because it has been open 30 days with no activity. With no activity this will be closed in 60 days.

github-actions[bot] avatar Aug 22 '22 00:08 github-actions[bot]

Just adding this note to keep my issue fresh.

mcjoshea avatar Aug 22 '22 13:08 mcjoshea

This issue is stale because it has been open 30 days with no activity. With no activity this will be closed in 60 days.

github-actions[bot] avatar Nov 28 '22 00:11 github-actions[bot]

This issue was closed because it has been stalled for 60 days with no activity.

github-actions[bot] avatar Feb 27 '23 00:02 github-actions[bot]

This has been fixed in #60. Thanks for reporting this.

Mirobit avatar Jul 27 '23 12:07 Mirobit