Page 1 of 1

LFD Restart Bug for cPanel Version Checking

Posted: 12 Apr 2016, 18:50
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.

Re: LFD Restart Bug for cPanel Version Checking

Posted: 12 Apr 2016, 19:25
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.

Re: LFD Restart Bug for cPanel Version Checking

Posted: 12 Apr 2016, 20:03
by ForumAdmin
We've released v8.21 to avoid this issue. Thank you for reporting it.

Re: LFD Restart Bug for cPanel Version Checking

Posted: 13 Apr 2016, 23:13
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

Re: LFD Restart Bug for cPanel Version Checking

Posted: 14 Apr 2016, 10:03
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.

Re: LFD Restart Bug for cPanel Version Checking

Posted: 14 Apr 2016, 20:03
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! :)