NebraLtd / hm-diag

Helium Miner Diagnostics
https://nebra.io/hnt
MIT License
21 stars 25 forks source link

diagnostics page hangs endlessly when miner loading #267

Open shawaj opened 2 years ago

shawaj commented 2 years ago

when the miner is loading, the diagnostics pages just loads endlessly and then times out, as does the /json endpoint

initFile.txt eventually loads, but is pretty slow

seems like we have an error somewhere...

 diagnostics  INFO:apscheduler.scheduler:Scheduler started
 diagnostics  DEBUG:apscheduler.scheduler:Looking for jobs to run
 diagnostics  DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
 diagnostics  /opt/python-dependencies/apscheduler/util.py:95: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
 diagnostics    if obj.zone == 'local':
 diagnostics  /opt/python-dependencies/apscheduler/triggers/cron/__init__.py:146: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
 diagnostics    return self.timezone.normalize(dateval + difference), fieldnum
 diagnostics  INFO:apscheduler.scheduler:Added job "get_app.<locals>.run_ship_diagnostics_task" to job store "default"
 diagnostics  DEBUG:apscheduler.scheduler:Looking for jobs to run
 diagnostics  DEBUG:apscheduler.scheduler:Next wakeup is due at 2021-12-05 02:00:00+00:00 (in 1125.685919 seconds)
 diagnostics  DEBUG:flask_caching.backends.simplecache:get key 'view//' -> miss 
 diagnostics  INFO:root:Running periodic hardware diagnostics
 diagnostics  2021-12-05 01:41:14,565 - [INFO] - hm_pyhelper.miner_param - (miner_param.py).run_gateway_mfr -- /opt/python-dependencies/hm_pyhelper/miner_param.py:(41) - gateway_mfr response stdout: b'{\n  "key": "11m3KCgNMEqdcT2cHQL1qQPC3ZC5d8fJJsXu4h6v2Za8Av4UbHL",\n  "name": "wide-mulberry-puppy",\n  "slot": 0\n}\n'
 diagnostics  INFO:hm_pyhelper.miner_param:gateway_mfr response stdout: b'{\n  "key": "11m3KCgNMEqdcT2cHQL1qQPC3ZC5d8fJJsXu4h6v2Za8Av4UbHL",\n  "name": "wide-mulberry-puppy",\n  "slot": 0\n}\n'
 diagnostics  2021-12-05 01:41:14,577 - [INFO] - hm_pyhelper.miner_param - (miner_param.py).run_gateway_mfr -- /opt/python-dependencies/hm_pyhelper/miner_param.py:(43) - gateway_mfr response stderr: b''
 diagnostics  INFO:hm_pyhelper.miner_param:gateway_mfr response stderr: b''
 diagnostics  INFO:jsonrpcclient.client.request:{"jsonrpc": "2.0", "method": "peer_book", "params": {"addr": "self"}, "id": 1}
 diagnostics  DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): helium-miner:4467
 diagnostics  DEBUG:urllib3.connectionpool:http://helium-miner:4467 "POST / HTTP/1.1" 200 949
 diagnostics  WARNING:charset_normalizer:override steps (5) and chunk_size (512) as content does not fit (949 byte(s) given) parameters.
 diagnostics  INFO:charset_normalizer:ascii passed initial chaos probing. Mean measured chaos is 0.000000 %
 diagnostics  INFO:charset_normalizer:ascii should target any language(s) of ['Latin Based']
 diagnostics  INFO:charset_normalizer:We detected language [('English', 1.0), ('Indonesian', 1.0), ('Simple English', 1.0)] using ascii
 diagnostics  INFO:charset_normalizer:ascii is most likely the one. Stopping the process.
 diagnostics  INFO:jsonrpcclient.client.response:{"jsonrpc":"2.0","result":[{"address":"/p2p/11m3KCgNMEqdcT2cHQL1qQPC3ZC5d8fJJsXu4h6v2Za8Av4UbHL","connection_count":4,"last_updated":"184.991","listen_addr_count":0,"listen_addresses":[],"name":"wide-mulberry-puppy","nat":"unknown","sessions":[{"local":"/ip4/172.17.0.3/tcp/44158","name":"amateur-cotton-carp","p2p":"/p2p/112PSgxJfmFfJb6Q7wouyoaPhFwCSEDKQv6dZ97eCpf1tw4w7DQ3","remote":"/ip4/83.40.86.103/tcp/44158"},{"local":"/ip4/172.17.0.3/tcp/42277","name":"mysterious-licorice-kookaburra","p2p":"/p2p/11LiGvAJf2Fd9tWMU3KPPAxHm9fwDejd9w9T9745RUS16AY1RQH","remote":"/ip4/3.64.206.59/tcp/2154"},{"local":"/ip4/172.17.0.3/tcp/42465","name":"ancient-beige-hare","p2p":"/p2p/11UCbsgywnxzfXdjDxsHcUqwfPgjt9nSt9m3Kt3zQH4Phcz7DwT","remote":"/ip4/54.251.69.171/tcp/443"},{"local":"/ip4/172.17.0.3/tcp/44191","name":"sneaky-juniper-sheep","p2p":"/p2p/14jUgjUuy8rCr6MmfnvzTtXBwzjbYJzbwHtLVaqU8qMAyZGnRCw","remote":"/ip4/108.171.215.229/tcp/2154"}]}],"id":1}
 diagnostics  INFO:jsonrpcclient.client.request:{"jsonrpc": "2.0", "method": "info_height", "id": 1}
 diagnostics  DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): helium-miner:4467

possibly due to jsonrpc not loading and/or snapshot load. once the snapshot loads and you have a 100% sync - the diagnostics page will load. There is clearly still some error with displaying the diagnostics page before the miner loads / stops hanging

Related-to: #264

shawaj commented 2 years ago

fyi @SebastianMaj @kashifpk

shawaj commented 2 years ago

Possibly relates to #248

shawaj commented 2 years ago

@MuratUrsavas this might be related to what you were talking about?

I've still seen this during snapshot loads etc

MuratUrsavas commented 2 years ago

@shawaj Yea could be. I'm seeing it nowadays with my Frankenstein miner, too. Especially if it's busy with catching the blockchain. And the last GA has such issue (the block height is always around 120 blocks behind)

shawaj commented 1 year ago

Related to https://github.com/NebraLtd/hm-diag/issues/195

shawaj commented 1 year ago

This doesn't seem to be causing any issues anymore since moving to gateway-rs and no longer syncing blockchain.

Guess we can probably close now @KevinWassermann94 unless you want to perform any further tests on this?