Mirobit / bitcoin-node-manager

:bar_chart: Lightweight dashboard and control system for bitcoin nodes
MIT License
122 stars 62 forks source link

"Undefined index" .... #14

Closed oitdmser closed 2 years ago

oitdmser commented 4 years ago

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.

Screen Shot 2020-05-15 at 7 30 32 AM

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?

Mirobit commented 4 years ago

Thanks for reporting this. I changed the error reporting settings in 0.5. BNM nowalso displays notices. I assume that these bugs have always been there, but have become visible only now.

I will look into this.

oitdmser commented 4 years ago

Appears to be fixed, at least for me, as of v0.6.0

oitdmser commented 4 years ago

I guess I spoke too soon. It pops up much less frequently (or maybe it's just my imagination?) as of v0.6.0, but does still happen, particularly after a daemon reboot.

Mirobit commented 3 years ago

I hope I finally fixed this bug (0f72f30fb0b76408108a8e864dc433f8c87c6b12). Please let me know if this still happens.

oitdmser commented 3 years ago

Initial trials suggest it's fixed, thanks! I'll keep an eye out.

Thanks for all the hard work getting it to v1.0

oitdmser commented 3 years ago

Issue seems to be occurring again with both versions 1.0.0 and 1.1.0. Note that this seems to happen when the node has zero banned peers.

Screen Shot 2021-01-16 at 10 03 12 AM
Mirobit commented 3 years ago

This has been fixed since the last release. But I haven't put out an official release yet. Will do this tomorrow. Git pull should fix this as well.

oitdmser commented 3 years ago

Oooooohhh, I get it. Sorry, I assumed 1.0 and 1.1 included those changes. I did a git pull https://github.com/Mirobit/bitcoin-node-manager.git master and it works fine now

Mirobit commented 3 years ago

I was a little late with the release. Should have done it before the 0.21.0 release.

oitdmser commented 3 years ago

So it still does it occasionally, usually on the first refresh in a day or so. Any subsequent refreshes have zero errors. This time it's a different line, not sure if that's significant ...

Screen Shot 2021-01-19 at 4 26 54 PM
Mirobit commented 3 years ago

Sadly it is still the same bug. I think happens if all previously known peers disconnected. I assume you have only outgoing peers?

oitdmser commented 3 years ago

No, on my nodes I have 90+ peers, mostly incoming

Shanghai-maglev commented 3 years ago

I have the same issue as of 26/02/2021.

Apart from this minor bug, this software is awesome! Keep up the good work.

image

Mirobit commented 3 years ago

@Shanghai-maglev thanks for reporting this? What Bitcoin core version are you using and is the latest version of BNM installed?

Shanghai-maglev commented 3 years ago

@Shanghai-maglev thanks for reporting this? What Bitcoin core version are you using and is the latest version of BNM installed?

Hi, I am on bitcoin core 0.21 and it appears I was using the outdated 1.10 BNM release.

I have updated to the latest 1.20 and the issue appears to have gone away. Please note that when you download the .zip from GitHub directly, the file name for 1.20 is still set to "bitcoin-node-manager-1.1.0".

pouyiouk commented 3 years ago

All these errors result if bitcoind client is in the process of importing a new block header/block/sync a new block, considering that you already have a fully synced node. I have taken a good look at it, and when the node is busy writing to disk, rpc calls tend to become very heavy for bitcoind. Thus sometimes you might even get rpc timeout errors.

Mirobit commented 3 years ago

I think there are three different errors mixed up in this issue:

  1. Whitelist error: Older BNM versions are not compatible with core 0.21.0. This is has been fixed.
  2. Geo caching Error: In rare cases there is an issue with the geo caching. This is the oldest BNM bug and I thought I had it fixed a couple of times already.
  3. On some machines den rpc call fails under some conditions. This error should be caught by BNM and a error message is shown (Not the php error/warning log). This is all I can do right now to fix this error.
qertoip commented 3 years ago

I do have the same issue. This only happens after re-visiting BNM after a while. Subsequent requests are fine.

Mirobit commented 3 years ago

This is really strange. I never encountered this issue. Could you delete data/geodatapeers.inc. Please let me know if the issues still appears after a few days.

oitdmser commented 3 years ago

This is really strange. I never encountered this issue. Could you delete data/geodatapeers.inc. Please let me know if the issues still appears after a few days.

Deleting geodatapeers.inc fixes the problem immediately. I'll monitor it over time and let you know

oitdmser commented 3 years ago

After 24 hour wait, then refresh on a heavily connected (200+ peers) node I refreshed and get three lines of the same error. Another quick immediate refresh and the lines go away. Perhaps it's something to do with node that have disconnected?

Mirobit commented 3 years ago

I don't think it is the node that you disconnected. I rather think it is a peer that you are connected to, that I am not (e.g. two peers with the same IP, that could confusing the caching system?). I will have a closer look at the weekend.

github-actions[bot] commented 3 years ago

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] commented 3 years ago

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

github-actions[bot] commented 2 years ago

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