Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors in log #346

Open
ZwaZo22 opened this issue Jul 14, 2022 · 3 comments
Open

errors in log #346

ZwaZo22 opened this issue Jul 14, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ZwaZo22
Copy link

ZwaZo22 commented Jul 14, 2022

Hello,

I have just upgraded to the 0.7.2 (Ubuntu 20.04.4 LTS + Chia 1.4). I am using it to monitor the local node / harvester + a remote harvester.

I have edited the config-example.yaml file with the few parameters I needed then renamed it as config.yaml.

in the output04.log I get the following
[2022-07-14 10:19:05] [ INFO] --- Starting Chiadog (v0.7.2) (main.py:54)
[2022-07-14 10:19:05] [ INFO] --- Connected (version 2.0, client OpenSSH_8.2p1) (transport.py:1873)
[2022-07-14 10:19:05] [ INFO] --- Authentication (publickey) successful! (transport.py:1873)
[2022-07-14 10:19:05] [ INFO] --- Enabled Posix network log consumer. (log_consumer.py:128)
[2022-07-14 10:19:05] [ INFO] --- Connected (version 2.0, client OpenSSH_8.2p1) (transport.py:1873)
[2022-07-14 10:19:05] [ INFO] --- Authentication (publickey) successful! (transport.py:1873)
[2022-07-14 10:19:05] [ INFO] --- Consuming remote log file ~/.chia/mainnet/log/debug.log from 192.xxx.xxx.xxx:22 (OS.LINUX) (log_consumer.py:116)
[2022-07-14 10:19:05] [ INFO] --- Keep-alive check period: 300 seconds (keep_alive_monitor.py:45)
[2022-07-14 10:19:05] [ INFO] --- Initializing Telegram notifier. (telegram_notifier.py:13)
[2022-07-14 10:19:05] [ INFO] --- Enabled stats for daily notifications (stats_manager.py:48)
[2022-07-14 10:19:05] [ INFO] --- Summary notifications will be sent out every 24 hours starting from 21:00 (stats_manager.py:61)
[2022-07-14 10:19:05] [ ERROR] --- Invalid config.yaml. Missing key: 'harvester_activity_handler' (log_handler.py:22)
[2022-07-14 10:19:05] [ INFO] --- Initializing handler: harvester_activity_handler (init.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled parser for harvester activity - eligible plot events. (harvester_activity_parser.py:32)
[2022-07-14 10:19:05] [ INFO] --- Enabled check for farming events. (time_since_last_farm_event.py:22)
[2022-07-14 10:19:05] [ INFO] --- Enabled check for non-decreasing total plot count. (non_decreasing_plots.py:18)
[2022-07-14 10:19:05] [ INFO] --- Enabled check for time taken to respond to challenges. (quick_plot_search_time.py:18)
[2022-07-14 10:19:05] [ ERROR] --- Invalid config.yaml. Missing key: 'partial_handler' (log_handler.py:22)
[2022-07-14 10:19:05] [ INFO] --- Initializing handler: partial_handler (init.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled parser for partial submitting stats. (partial_parser.py:28)
[2022-07-14 10:19:05] [ ERROR] --- Invalid config.yaml. Missing key: 'block_handler' (log_handler.py:22)
[2022-07-14 10:19:05] [ INFO] --- Initializing handler: block_handler (init.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled parser for block found stats. (block_parser.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled check for found blocks. (found_blocks.py:15)
[2022-07-14 10:19:05] [ ERROR] --- Invalid config.yaml. Missing key: 'finished_signage_point_handler' (log_handler.py:22)
[2022-07-14 10:19:05] [ INFO] --- Initializing handler: finished_signage_point_handler (init.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled parser for finished signage points. (finished_signage_point_parser.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled check for finished signage points. (non_skipped_signage_points.py:19)
[2022-07-14 10:19:05] [ ERROR] --- Invalid config.yaml. Missing key: 'wallet_added_coin_handler' (log_handler.py:22)
[2022-07-14 10:19:05] [ INFO] --- Initializing handler: wallet_added_coin_handler (init.py:28)
[2022-07-14 10:19:05] [ INFO] --- Enabled parser for wallet activity - added coins. (wallet_added_coin_parser.py:26)
[2022-07-14 10:19:05] [ INFO] --- Filtering transaction with mojos less than 0 (wallet_added_coin_handler.py:26)
[2022-07-14 10:19:06] [ INFO] --- Detected new plots. Farming with 969 plots. (non_decreasing_plots.py:28)
[2022-07-14 10:19:06] [ INFO] --- Connected HDD? The total plot count increased from 0 to 969. (non_decreasing_plots.py:33)

Did I miss something ?

Best regards,

@pieterhelsen
Copy link
Collaborator

pieterhelsen commented Jul 14, 2022

Looks like you're somehow still using an old config.yml ?
The new config files has changed significantly.

# In this section you can enable and configure the log handlers
handlers:
# Checks for new coins received (wallet)
wallet_added_coin_handler:
enable: true
# Transactions with lower amount mojos will be ignored
# Use this to avoid notification spam during dust storms
min_mojos_amount: 5
# Checks for skipped signage points (full node)
finished_signage_point_handler:
enable: true
# Checks for new blocks found (full node)
block_handler:
enable: true
# Checks for found partials (farmer)
partial_handler:
enable: true
# Checks harvester activity & health (harvester)
harvester_activity_handler:
enable: true

Now, that being said, I do believe the application will recover from these errors and just take the default values instead.

@ZwaZo22
Copy link
Author

ZwaZo22 commented Jul 14, 2022

Thanks for your answer.

Basically, I use the provided sample config file and updated a few options (Telegram bot info mainly) the rest remained unchanged.

# In this section you can enable and configure the log handlers
handlers:
  # Checks for new coins received (wallet)
  wallet_added_coin_handler:
    enable: true
    # Transactions with lower amount mojos will be ignored
    # Use this to avoid notification spam during dust storms
    min_mojos_amount:  5
  # Checks for skipped signage points (full node)
  finished_signage_point_handler:
    enable: true
  # Checks for new blocks found (full node)
  block_handler:
    enable: true
  # Checks for found partials (farmer)
  partial_handler:
    enable: true
  # Checks harvester activity & health (harvester)
  harvester_activity_handler:
    enable: true

@martomi
Copy link
Owner

martomi commented Jul 14, 2022

The log_handler is unfortunately one of the few classes without test coverage. It might be that I introduced a bug while implementing this recently and I didn't have a farm to test it with.

In any case, it has a safe fallback so that you don't need to worry about the errors, we should probably change them to WARN and log the fact that there's a fallback.

Chiadog will continue to reliably monitor your farm with all available log handlers. The only problem is that it's not reading the min_mojos_amount: 5 so it'll default to 0 and notify you about any incoming amount.

If anyone wants to take on writing some unit tests for the log_handler and fix the bug I'd be happy to review. Seems like a nice Python exercise :-)

@martomi martomi added good first issue Good for newcomers bug Something isn't working labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants