LFD Restart Bug for cPanel Version Checking

This forum is only for reproducible bugs with csf and lfd (i.e. not iptables problems, lack of understanding how to use a feature, etc). Posts must be accompanied with full technical details of the problem and how it can be recreated. Any posts not adhering to this, or not considered bugs, will be moved to the General Discussion (csf) forum.
Post Reply
expressweb
Junior Member
Posts: 1
Joined: 12 Apr 2016, 18:35

LFD Restart Bug for cPanel Version Checking

Post by expressweb »

So this has started hitting us after the latest update (v8.20).

What is happening is that our LFD is stuck in a restart loop. This is due to a misconfiguration in the csf.conf value GENERIC on our side combined with a logic error in lfd.pl. We had this value set to 1 (probably due to our use of clustering and it copying from a server that didn't have cPanel installed).

What occurs is that when GENERIC is set to 1 the value of $cpconfig{version} does not get populated (it ends up blank) on line 186, however in csfcheck() there is no check for $config{GENERIC} so the system ends up comparing the current cpanel version against the variable $cpconfig{version} which is blank. This causes LFD to believe that cpanel has been upgraded, and issues a restart of CSF and LFD.

I am not sure how you want to correct this issue, either a check of GENERIC in csfcheck() or a bounds check on $cpconfig{version} to ensure that it isn't blank.

On our side, we have been setting GENERIC to 0 on servers that encounter the issue, and it corrects the issue, but I suspect that we might not be the only ones encountering this.

Maybe a better approach is to throw an error that indicates that GENERIC is set to 1 but a control panel is detected, or something similar. Not 100% sure.
vanillatom
Junior Member
Posts: 1
Joined: 12 Apr 2016, 19:23

Re: LFD Restart Bug for cPanel Version Checking

Post by vanillatom »

I ran into the same problem today when CSF updated to v8.20. Changing GENERIC from 1 to 0 solved the problem for me. Thanks for the information.
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: LFD Restart Bug for cPanel Version Checking

Post by ForumAdmin »

We've released v8.21 to avoid this issue. Thank you for reporting it.
Don113
Junior Member
Posts: 3
Joined: 11 Dec 2013, 20:21

Re: LFD Restart Bug for cPanel Version Checking

Post by Don113 »

Hello,

I am not sure if this is related to the same problem but the following is happening with webmin (see dropbox link before for snapshot):

https://www.dropbox.com/s/k5qyh8o9oxsjx ... r.png?dl=0
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: LFD Restart Bug for cPanel Version Checking

Post by ForumAdmin »

That is not code from csf and nothing to do with the issue in this thread. You will have to speak to the webmin template author.
Don113
Junior Member
Posts: 3
Joined: 11 Dec 2013, 20:21

Re: LFD Restart Bug for cPanel Version Checking

Post by Don113 »

Thank you ForumAdmin for your response.

I wasn't sure and thought best option would be to check with CSF first. I will contact Webmin authors about this issue.

Once again, thank you! :)
Post Reply