Cron /usr/bin/kcarectl --auto-update "No updates are needed for this kernel" email arriving every 4 hours

vespera

Member
Apr 28, 2014
17
2
53
cPanel Access Level
Root Administrator
I'm OK when KernelCare sends a notification every now and then about some update, unknown kernel or similar, but for the past 2-3 days I'm getting an email every 4 hours, whenever KernelCare checks for updates, notifying me that I don't need an update:
"Subject: Cron <[email protected]> /usr/bin/kcarectl --auto-update"
"Updates already downloaded
No updates are needed for this kernel"

How do I stop these emails? I do want to know if something's wrong, but if everything is OK I really don't need an email every 4 hours telling me that nothing is wrong...
Thank's for any advice!
 
  • Like
Reactions: lkraav and djbaxter

Arseni

Registered
May 4, 2020
1
1
1
Florida
cPanel Access Level
Website Owner
Same here. I started getting these just recently. I would reroute these notifications to some separate email account, but not sure what is the proper way to do that
 
  • Like
Reactions: djbaxter

CloudLinux Skhristich

Well-Known Member
Verifed Vendor
May 23, 2019
62
31
18
kiev
cPanel Access Level
Root Administrator
I'm OK when KernelCare sends a notification every now and then about some update, unknown kernel or similar, but for the past 2-3 days I'm getting an email every 4 hours, whenever KernelCare checks for updates, notifying me that I don't need an update:
"Subject: Cron <[email protected]> /usr/bin/kcarectl --auto-update"
"Updates already downloaded
No updates are needed for this kernel"

How do I stop these emails? I do want to know if something's wrong, but if everything is OK I really don't need an email every 4 hours telling me that nothing is wrong...
Thank's for any advice!
Hello,
You can configure this using this command:
Code:
rm /etc/cron.d/kcare-cron
yum reinstall -y kernelcare
Thank you.
 

James Fu

Registered
Jan 9, 2017
4
2
1
Singapore
cPanel Access Level
Root Administrator
Hey Skhristich,

Thank you for your reply.

Inspecting my /etc/cron.d/ directory, I found `kcare-cron` and `kcare-cron.rpmnew`(an empty file). After removing both and reinstalling kernelcare, I see that the new `kcare-cron` runs `/usr/bin/kcarectl` with the `-q` flag compared to before. Presumably this is the only thing that needs to be corrected.

I looked up yum history and this appears to be where things went awry:

Code:
Updated    kernelcare-2.24-1.el7.x86_64                                    @kernelcare
Update                2.27-1.el7.x86_64                                    @kernelcare
Hope this helps someone else!
 
  • Like
Reactions: djbaxter

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
This is a known issue with kernelcare, there's no way for CloudLinux to immediately update the supported kernel as soon as a kernel version is released. There are a ton of other forums threads here that can answer this question as well.
 

vespera

Member
Apr 28, 2014
17
2
53
cPanel Access Level
Root Administrator
Unfortunately, the plain reinstall didn't help, I'm still getting the emails every 4 hours. I'll check my cron...
And, I think cPanelLauren didn't actually understand that this isn't the same issue as the known problem with KernelCare "unknown kernel" emails, that has been discussed all over the forums for some time now - this is a new problem, arised a few days ago, with constant emails telling us that "No updates are needed"...
 

vespera

Member
Apr 28, 2014
17
2
53
cPanel Access Level
Root Administrator
Just checked the etc/cron.d directory: I only have one kcare-cron file, and it contains just the line
14 */4 * * * xyz /usr/bin/kcarectl --auto-update
So, no -q flag... Adding the -q just before --auto-update should mean the task is running silent? But then I also wouldn't get the email if something went wrong (like the unknown kernel emails)?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
430
99
328
cPanel Access Level
DataCenter Provider
@cPanelLauren This is a different issue. It was introduced with 2.27-1. It started sending emails that there were no new patches to download vs the old not supported kernel.

I can also confirm that if you follow KernelCare's process (remove the cron, reinstall) it will fix it. After the reinstall the cron will look like this (your time will be different);

Code:
39 */4  * * * root /usr/bin/kcarectl -q --auto-update
I can't tell you what all the re-install does, but it adds the -q parameter to the cron.

It also loos like they released 2.28-1 yesterday, and I'm not sure if that solves it automagically.
 
  • Like
Reactions: fokakmeny

CloudLinux Skhristich

Well-Known Member
Verifed Vendor
May 23, 2019
62
31
18
kiev
cPanel Access Level
Root Administrator
Just checked the etc/cron.d directory: I only have one kcare-cron file, and it contains just the line
14 */4 * * * xyz /usr/bin/kcarectl --auto-update
So, no -q flag... Adding the -q just before --auto-update should mean the task is running silent? But then I also wouldn't get the email if something went wrong (like the unknown kernel emails)?
Hello,
No, -q does not affect warnings. The user will receive messages about unknown kernels even if -q is used. The --quiet option removes informational messages about a successful launch (kernel is safe, no updates are needed, etc). Warnings and mistakes will remain.
Thanks
 

vespera

Member
Apr 28, 2014
17
2
53
cPanel Access Level
Root Administrator
The plain reinstall didn't work for me, but adding the -q flag to kcare-cron did the trick. I'm not getting the emails any more... thanks for all the helpful advices.
 

James Fu

Registered
Jan 9, 2017
4
2
1
Singapore
cPanel Access Level
Root Administrator
Hello,
No, -q does not affect warnings. The user will receive messages about unknown kernels even if -q is used. The --quiet option removes informational messages about a successful launch (kernel is safe, no updates are needed, etc). Warnings and mistakes will remain.
Thanks
Yes, thanks for clarifying. @vespera this is in line with the `kcarectl` help message:
Code:
  -q, --quiet           Suppres messages, provide only errors and warnings to
                        stderr
@CloudLinux Skhristich Suppress is missing an 's', just btw.