csf DA plugin bug @ centos7
-
- Junior Member
- Posts: 10
- Joined: 14 Nov 2014, 21:21
csf DA plugin bug @ centos7
I am posting this as a bug because it looks like one.
I have installed the csf plugin for Directadmin on a server running the fairly new and shiny Centos 7. The script as such in functioning well, but in Directadmin's service monitor, the process shows up using 0 memory and cannot be (re)started or stopped. The error is as follows:
Cannot find the script in /etc/systemd/system or /usr/lib/systemd/system
Details
/usr/lib/systemd/system/lfd.service
Quite some troubleshooting time went into this (including reinstall and tweaking files) but no luck so far. The theory is now that the plugin may simply not be compatible with systemd (new component in Centos 7 I suppose) yet and thus need a fix.
I have installed the csf plugin for Directadmin on a server running the fairly new and shiny Centos 7. The script as such in functioning well, but in Directadmin's service monitor, the process shows up using 0 memory and cannot be (re)started or stopped. The error is as follows:
Cannot find the script in /etc/systemd/system or /usr/lib/systemd/system
Details
/usr/lib/systemd/system/lfd.service
Quite some troubleshooting time went into this (including reinstall and tweaking files) but no luck so far. The theory is now that the plugin may simply not be compatible with systemd (new component in Centos 7 I suppose) yet and thus need a fix.
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: csf DA plugin bug @ centos7
That will be an issue with the integration with DirectAdmins service monitor as lfd uses the supported legacy hook into init for interaction with systemd:
We won't be able to look into why the DA service monitor isn't working with checking lfd for a while as we do not have DA on CentOS v7.
Code: Select all
# systemctl status lfd
lfd.service - LSB: csf Login Failure Daemon (lfd)
Loaded: loaded (/etc/rc.d/init.d/lfd)
Active: active (running) since Sat 2014-11-15 08:28:16 GMT; 1min 11s ago
Process: 10417 ExecStop=/etc/rc.d/init.d/lfd stop (code=exited, status=0/SUCCESS)
Process: 10421 ExecStart=/etc/rc.d/init.d/lfd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/lfd.service
10423 lfd - sleeping
10427 lfd UI
Nov 15 08:28:16 localhost.localdomain systemd[1]: Starting LSB: csf Login Failure Daemon (lfd)...
Nov 15 08:28:16 localhost.localdomain lfd[10421]: Starting lfd:[ OK ]
Nov 15 08:28:16 localhost.localdomain systemd[1]: Started LSB: csf Login Failure Daemon (lfd).
-
- Junior Member
- Posts: 10
- Joined: 14 Nov 2014, 21:21
Re: csf DA plugin bug @ centos7
Well since I do - is there any way I can help? Note that this is a production server, but I haven't uploaded the actual accounts yet, so if you're quick... Feel free to contact me via the email address associated with my account, this is probably something that shouldn't be discussed in public (at least not in detail).
Btw. there's probably at least one more issue that needs to be adressed: CSF is complaining about syslog and rsyslos not being active, but it seems like in CentOS 7 the logging works entirely differently. Since CSF relies on log access, I suppose it means it isn't working properly until the script is adapted accordingly?
Btw. there's probably at least one more issue that needs to be adressed: CSF is complaining about syslog and rsyslos not being active, but it seems like in CentOS 7 the logging works entirely differently. Since CSF relies on log access, I suppose it means it isn't working properly until the script is adapted accordingly?
-
- Junior Member
- Posts: 10
- Joined: 14 Nov 2014, 21:21
Re: csf DA plugin bug @ centos7
PS: Never mind the second paragraph, solved that by installing rsyslog.
Re: csf DA plugin bug @ centos7
I'm running Centos7 / DirectAdmin and csf/lfd as well and run into simular problems.wonderwall wrote:I have installed the csf plugin for Directadmin on a server running the fairly new and shiny Centos 7. The script as such in functioning well, but in Directadmin's service monitor, the process shows up using 0 memory and cannot be (re)started or stopped.
DA service monitor always shows the below, whether lfd is running or not:
Code: Select all
Service Status Memory Usage Start Stop Restart Reload
lfd lfd (pid 1234) 0 B Start Stop Restart Reload
Code: Select all
# service lfd restart
Redirecting to /bin/systemctl restart lfd.service
# service lfd status
Redirecting to /bin/systemctl status lfd.service
lfd.service - ConfigServer Firewall & Security - lfd
Loaded: loaded (/usr/lib/systemd/system/lfd.service; enabled)
Active: active (running) since Sun 2015-02-08 12:20:04 CET; 17min ago
Process: 2345 ExecStart=/usr/sbin/lfd (code=exited, status=0/SUCCESS)
Main PID: 3456(lfd - sleeping)
CGroup: /system.slice/lfd.service
└─3456lfd - sleeping
Feb 08 12:20:04 xxx systemd[1]: Starting ConfigServer Firewall & Security - lfd...
Feb 08 12:20:04 xxx systemd[1]: Started ConfigServer Firewall & Security - lfd.
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: csf DA plugin bug @ centos7
csf v7.61 should hopefully fix the restart issues via the DA UI:
http://blog.configserver.com/
I cannot help with the DA service monitor as I do not know how it retrieves the memory usage. The Stop/Start and Restart options should work for systemd on DA so long as DA is correctly using the systemctl commands to restart it.
http://blog.configserver.com/
I cannot help with the DA service monitor as I do not know how it retrieves the memory usage. The Stop/Start and Restart options should work for systemd on DA so long as DA is correctly using the systemctl commands to restart it.
Re: csf DA plugin bug @ centos7
Installed v7.61 and did two tests.
Restarted LFD from DA UI. Result: Firewall Status: Enabled and Running
Changed some setting in Firewall Configuration pressed change in DA UI. Restarting CSF and LFD. Result: Firewall Status: Enabled and Running
Looks like this problem is fixed. Thanks!
Will alert the DA devs to this thread. Perhaps they can be of assistance.
The DA service monitor for LFD is nice to have but not essential.
Restarted LFD from DA UI. Result: Firewall Status: Enabled and Running
Changed some setting in Firewall Configuration pressed change in DA UI. Restarting CSF and LFD. Result: Firewall Status: Enabled and Running
Looks like this problem is fixed. Thanks!
Will alert the DA devs to this thread. Perhaps they can be of assistance.
The DA service monitor for LFD is nice to have but not essential.
Re: csf DA plugin bug @ centos7
I've got a reply from DirectAdmin support, CentOS 7 64-bit, ready for BETA testing
Here is a copy paste:
Here is a copy paste:
Hope this helps to solve the problem.Memory usage on the services monitor page is taken from this script:where the memory usage is taken from all processes of the same name from the "ps axo comm,rss" output.Code: Select all
/usr/local/directadmin/scripts/service_memory_usage.sh
As for start/stop/restart on systemd, for "lfd", DA would call:it also checks to ensure that:Code: Select all
/usr/bin/systemctl restart lfd.service 2>&1
exists before the command is run. If it doesn't exist, it then checks forCode: Select all
/etc/systemd/system/lfd.service
which would also be found by the systemctl command.. so either lfd.service file can be used (but in DA, we use /etc/systemd/system/*.service)Code: Select all
/usr/lib/systemd/system/lfd.service
John