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

Windows: False "Harvester appears offline" notifications when farm is fine #72

Closed
suckatlife opened this issue May 2, 2021 · 20 comments · Fixed by #164
Closed

Windows: False "Harvester appears offline" notifications when farm is fine #72

suckatlife opened this issue May 2, 2021 · 20 comments · Fixed by #164
Assignees
Labels
bug Something isn't working windows

Comments

@suckatlife
Copy link

Describe the bug

I'm running the Windows version of chiadog. Every now and then I'll get the "Your harvester appears offline! No events for the past xxxx seconds" notification, and I will continue getting this notification until I restart chiadog. When I check my farm (using chia farm summary) everything is fine. I actually won a block during one of these fake outages.

Looking at timestamps, these outages seem to always coincide with a log rotation, but not every rotation. My log rotates every 40-50 minutes, but this only happens around once a day or so - so it's definitely not with every rotation.

It was suggested I turn off any other processes tailing (using get-content) debug.log, which I've done, but it didn't help.

Environment:

  • OS: Windows 10
  • Python version: 3.9.4
  • PIP version: 21.1
  • Chia version: 1.1.3
@centrd
Copy link

centrd commented May 2, 2021

This is a known issue. There is a fix in the works.
It is indeed related to log rotation and the way logs are being accessed.

@pieterhelsen
Copy link
Collaborator

pieterhelsen commented May 3, 2021

I wonder if we can write a Windows-specific monitor that hooks into the keep alive monitor thread and then tries to reset the _consume_loop in the log_consumer if there's no activity for 60 seconds...

Or might be even better to write a monitor that monitors the size of the debug.log (on Windows) and resets the _consume_loop if the size goes from X MB to < 1 MB.

What do you think @martomi ?

@pieterhelsen
Copy link
Collaborator

pieterhelsen commented May 6, 2021

Apologies @skrustev ; I should've updated the issue.
I've been working on a fix as well, which has been tested successfully by a few people on the Keybase channel.
https://github.com/martomi/chiadog/tree/windows-rotating-log (initial version; needs cleaning up)

However, your solution ( #87 ) would be preferable I think, as it's not so invasive. Thoughts, @martomi ?

@greimela
Copy link
Contributor

greimela commented May 6, 2021

If #87 fixes the issue and has no side effects it would be really nice!

@skrustev
Copy link
Contributor

skrustev commented May 6, 2021

Yeah, It does not fix the issue, that is why I closed it. It doesn't happen as often but I still got the false offline state.
You can still try it out in the meantime but I don't think its enough.

@pieterhelsen
Copy link
Collaborator

OK! Thanks anyway, it would've been a graceful solution :)
Feel free to try out my branch instead. I've only implemented it for local File Consumers right now, but will implement the fix for the NetworkLogConsumer tonight.

@martomi martomi added windows bug Something isn't working labels May 8, 2021
@pieterhelsen
Copy link
Collaborator

I have moved the work on this feature to a new branch:
https://github.com/martomi/chiadog/tree/windows-rotation

This ticket relates to #102

@tschechniker
Copy link

@pieterhelsen i see the same issue on linux too. It works fine for a while then harvester offline messages pops up. Everytime i check the logs it's totally fine. From what i can see it's related

@DrHou83
Copy link

DrHou83 commented May 14, 2021

Hey guys are we waiting on a fix here. Does it help if I switch the log back from INFO to stop the log rotation.

@24601
Copy link

24601 commented May 14, 2021

I can confirm this also occurs on Mac OS X (Big Sur)

@gilgm12
Copy link

gilgm12 commented May 17, 2021

This fixed up yet? I'm resetting chiadog daily.

@pieterhelsen
Copy link
Collaborator

We have a fix ready that uses the Pygtail module to provide a more pythonic way of reading the logfiles and has better handling of log rotations.

@martomi
Copy link
Owner

martomi commented May 25, 2021

Closing this now as the fix is in the new release. Please reopen if issue persists.

@runechronos
Copy link

runechronos commented May 28, 2021

Are you sure ? I exactly have the same error, after the update, keeps telling me harvester is offline ????
Here is my daily recap of yesterday for example, does it seems regular to u ?

ℹ️ Chia DAILY: Hello farmer! 👋 Here's what happened in the last 24 hours:

Received ☘️: 0.00 XCH
Proofs 🧾: None
Search 🔍:
- average: 0.10s over 9124 searches
- over 5s: 3 occasions (0.0%)
- over 15s: 0 occasions (0.0%)
Plots 🌱: 132, new: 4
Eligible plots 🥇: 0.25 average
Skipped SPs ⚠️: Unknown

@pieterhelsen
Copy link
Collaborator

pieterhelsen commented May 28, 2021

Daily stats look OK. Some additional questions for you:

  • How often do you get the message telling you your harvester is offline?
  • Are you monitoring a local harvester or a remote harvester (using SSH)?

If the problem still persists, please change this line temporarily

for log_line in Pygtail(self._expanded_log_path, read_from_end=True, offset_file=self._offset_path):

from

for log_line in Pygtail(self._expanded_log_path, read_from_end=True, offset_file=self._offset_path):

to this

for log_line in Pygtail(self._expanded_log_path, read_from_end=True, offset_file=self._offset_path, paranoid=True):

Please report back if this fixes your problem.

@gilgm12
Copy link

gilgm12 commented May 28, 2021 via email

@runechronos
Copy link

runechronos commented May 31, 2021

@pieterhelsen I'm monitoring a local harvester. I create my plots with a computer 1, send them to a computer 2 via my local network, and i'm farming and running the full node on computer 2. I get the error mesage every 5 min. So it's a huge spam on pushover app ^^

What will it change to add the "paranoid=true" parameter ? (only removing harvesters notifications maybe ?)

@gilgm12
Copy link

gilgm12 commented Jun 2, 2021 via email

@runechronos
Copy link

@gilgm12 I think you are right, i did a new pull, and it seems to be ok now :)

Just can someone explain to me how the different "search tries are working ?

Search 🔍:

  • average: 0.46s in 9500 tries
  • over 5s: 0
  • over 15s: 0
    (for example)
    What has to be achieved to get the block reward (i guess one of your plot has to pass all 3 and maybe more ?)

Or if you have some link explaining how Chia harvesting is working exactly, would like to be less dumb ^^

Thanks in advance.

@gilgm12
Copy link

gilgm12 commented Jun 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.