-
Notifications
You must be signed in to change notification settings - Fork 234
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
inotifywait.pid not readable #311
Comments
Can someone let me know how to resolve this issue?? |
Just an update. Maldet can be started manually after executing "maldet -m users" How can this be fixed? |
Appreciate the feedback. Will look into this issue as soon as possible. Thanks |
I am seeing this issue as well. I also confirm that maldet can be started manually after boot with "maldet -m users". This is on CentOS Linux release 7.5.1804 (Core), Linux Malware Detect v1.6.3, inotify-tools.x86_64 3.14-8.el7. |
Using v1.6.3 here. I think the output from the PID file is actually a symptom, and not the cause. Looking into it more, it seems that at least for me, there is a bug in the systemctl script that was installed on my CentOS 7 (x86-64) cPanel / WHM (latest: current). @rfxn The systemd service file is passing a variable that has not been defined, $default_monitor_mode, and appears to be causing the crash. So instead of the program launching with the correct switch, it is using the variable placeholder literally instead.
Bad: $default_monitor_mode
To resolve it, I did the following:Stop the service from running and trying to restart.
I then edited /usr/lib/systemd/system/maldet.service and replaced the line
with
And let systemd know of the updated config file with
Now I started the service (which took a few seconds):
And then checked it was still running and not crashing...
We see the service is running... |
…passing $default_monitor_mode as a literal string to the service
@YipYup Thank you for the very thorough assessment. I've committed a change to always set a default value for default_monitor_mode in conf.maldet which should take care of the issue. On upgrades, conf.maldet values from the installer package are inherited if a local variable is unset. When 1.6.4 rolls out, this should take care of this issue. Thanks |
I have tried this method on my Kali Linux. Yet, no difference. ╰─○ systemctl status maldet Nov 01 14:49:20 CybernetiX-S3C systemd[1]: Starting Linux Malware Detect monitoring - maldet... ╰─○ uname -a |
maldet wont start after installation in CentOS7
● maldet.service - Linux Malware Detect monitoring - maldet
Loaded: loaded (/usr/lib/systemd/system/maldet.service; enabled; vendor preset: disabled)
Active: failed (Result: resources) since Mon 2018-10-01 09:08:02 IST; 44min ago
Oct 01 09:08:00 [fqdn] systemd[1]: Starting Linux Malware Detect monitoring - maldet...
Oct 01 09:08:02 [fqdn] maldet[1733]: Linux Malware Detect v1.6.3
Oct 01 09:08:02 [fqdn] maldet[1733]: (C) 2002-2018, R-fx Networks [email protected]
Oct 01 09:08:02 [fqdn] maldet[1733]: (C) 2018, Ryan MacDonald [email protected]
Oct 01 09:08:02 [fqdn] maldet[1733]: This program may be freely redistributed under the terms of the GNU GPL v2
Oct 01 09:08:02 [fqdn] maldet[1733]: maldet(1733): invalid usage of -m|--monitor, aborting.
Oct 01 09:08:02 [fqdn] systemd[1]: PID file /usr/local/maldetect/tmp/inotifywait.pid not readable (yet?) after start.
Oct 01 09:08:02 [fqdn] systemd[1]: Failed to start Linux Malware Detect monitoring - maldet.
Oct 01 09:08:02 [fqdn] systemd[1]: Unit maldet.service entered failed state.
Oct 01 09:08:02 [fqdn] systemd[1]: maldet.service failed.
The text was updated successfully, but these errors were encountered: