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

Chiadog fails processing log when logrotate rotates log file with copytruncate #289

Open
flotti455 opened this issue Sep 8, 2021 · 1 comment

Comments

@flotti455
Copy link

Describe the bug

Instead of Chia's built-in log rotation, I use logrotate with the following configuration:

/home/chia/.chia/mainnet/log/*.log {
  su chia chia
  copytruncate
  rotate 9999
  nocompress
  missingok
  ifempty
  hourly
  datehourago
  dateext dateformat .%Y-%m-%d_%H-%M-%S
}

Whenever logrotate rotates Chia's log (as per my configuration, once per hour), Chiadog fails to process the log

[2021-09-07 20:03:27] [   DEBUG] --- Keep-alive check for HARVESTER: Last activity 201 seconds ago. (keep_alive_monitor.py:77)

I assume that Chiadog / pygtail has problems with the copytruncate rotation strategy.

Environment:

  • OS: Ubuntu 20 LTS
  • Python version: 3.8.10
  • PIP version: 21.2.4
  • Chia version: 1.2.5
  • Chiadog version: 0.7.0
  • Harvester: local
@egeedot
Copy link
Contributor

egeedot commented Sep 17, 2022

I can also confirm we are having the same problem albeit this with Chia's default log rotation rather than logrotate. The symptoms are exactly the same, when the log rolls over Chiadog cannot handle the problem correctly and thinks that the harvester is offline.

Environment:

  • OS: Ubuntu 22-04 LTS
  • Chia version: 1.5.1
  • Chiadog version: 0.7.3 Docker
  • Harvester: local

wrt Docker, I am using docker volume mounting with -v argument to directly mount the debug.log file into the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants