المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : السي بانال WHM/cPanel حل مشكلة SYSLOG Check Failed و Failed to detect code



Rise Company
10-05-2023, 10:53
السي بانال WHM/cPanel حل مشكلة SYSLOG Check Failed و Failed to detect code
حل مشكلة Failed to detect code [] in SYSLOG_LOG [/var/log/messages]
حل مشكلة SYSLOG may not be running correctly on
System logs are no longer being written to nor are files being created
HOW TO FIX SYSLOG FAILED MESSAGE - SYSLOG Check Failed
lfd on example.com SYSLOG Check Failed - Problem with logging.
Error: Failed to detect code in SYSLOG_LOG
The cPanel installer does not install / require syslog if it is missing
cpanel File corruption detected at /run/log/journal/


https://www.rise.company/upload/uploads/168370863900461.png
-----------------------------------------------------
المشكلة :
-----------------------------------------------------

يصل ايميل مثل هذا


lfd on myserver.com: SYSLOG Check Failed
Error: Failed to detect code [CGWnpiMYsteGydwmp6m] in SYSLOG_LOG [/var/log/messages]
SYSLOG may not be running correctly on myserver.com


-----------------------------------------------------
سبب المشكلة :
-----------------------------------------------------

Nothing in cPanel requires it, so we don't force it to be there.
rsyslog is not a package that is provided by cPanel as that is controlled by the operating system.
could Linux 8 and AlmaLinux 8 They don’t install it. Not cPanel

لا تثبت افتراضيا مع النظام ولا يثبت مع cpanel حيث لا يحتاجها cpanel
انما يحتاجها فقط system و خاصة فايروول CSF Firewall
وهى مفعله هنا بقيمة رقم 3 يمكن تعطيلها 0 لوقف الرسائل ولكن لا ننصح بذلك !

https://www.rise.company/upload/uploads/168370999179781.png

System logs such as /var/log/messages, /var/log/maillog,
and many others are no longer being created or are empty.

It looks like rsyslog is working but not saving any information.
The problem was caused by the journal system, its files were corrupted

كيف تتاكد ان هناك مشكلة ام لا ؟

https://www.rise.company/upload/uploads/168595501831491.png

ادخل هذا الامر لكى تتحقق من وجود FAIL ام كله PASS

I verified the files by:

journalctl --verify


-----------------------------------------------------
حل المشكلة :
-----------------------------------------------------

حل المشكلة فى كلمة واحدة فقط هى تثبيت rsyslog System Logger Daemon
هيكون غير مثبت لديك ! نعم هذا هو حل المشكلة 100 %

https://www.rise.company/upload/uploads/168370958264951.png

الخطوات :

1- ثبت ClamAV for cPanel

2- ثم ادخل هذا الامر



/scripts/upcp --force


3- ثم اعمل Rebuild RPM Database فقط
من خلال المسار
Home / Software / Rebuild RPM Database

https://www.rise.company/upload/uploads/168655928299181.png

4- هنا لن تجد Rsyslogd is running:

ادخل هذا الامر


/scripts/restartsrv_rsyslogd --status

ويمكنك ايضا التحقق من وجوده ام لا فى
Home / Service Configuration / Service Manager

https://www.rise.company/upload/uploads/168370958264951.png

اذا لم تكن مثبته

Install syslog. Check to see what the package name is with the following command:



yum list | grep syslog

Install the syslog package of your choice. Typically rsyslog or syslog-ng:



yum install rsyslog


اذا كانت مثبته , تابع الشرح


ثم ادخل هذا الامر لكى تتحقق من حل مشكلة وان كله PASS

I verified the files by:

journalctl --verify


النتيجة

https://www.rise.company/upload/uploads/168595532349581.png

* ملحوظة : الحلول الاخري فى الاسفل تحل المشكلة بشكل مؤقت وتعود مرة اخري بعد ايام
اما الحل فى الاعلى تحت الاختبار.

المرجع:
https://forums.cpanel.net/threads/lfd-on-example-com-syslog-check-failed-problem-with-logging.708853/
https://support.cpanel.net/hc/en-us/articles/360059952274-System-logs-are-no-longer-being-written-to-nor-are-files-being-created?_ga=2.67886036.453764823.1683707174-90341209.1638625035
https://www.knownhost.com/kb/how-to-fix-syslog-failed-message/
https://forums.cpanel.net/threads/syslog-check-failed.669085/
https://forums.cpanel.net/threads/error-failed-to-detect-code-in-syslog_log.524851/
https://forums.cpanel.net/threads/error-failed-to-detect-code-llsnlk7slm2bxuws4wvqhdft3oqck-in-syslog_log-var-log-messages.697909/
https://support.cpanel.net/hc/en-us/articles/4402584851479-The-cPanel-installer-does-not-install-require-syslog-if-it-is-missing?_ga=2.28613369.453764823.1683707174-90341209.1638625035

Rise Company
12-06-2023, 10:48
حلول اخري



ادخل هذا الامر
If the file is missing simply issue the following three commands to allow it to rebuild:



systemctl restart systemd-journald.socket
systemctl restart systemd-journald
systemctl restart rsyslog


جرب هذا
The touch command creates files in Linux through the terminal.


touch /var/log/messages



This is where the errors occurred.


Next rotate files:

journalctl --rotate


Then I delete the old entries:

journalctl --vacuum-time=1s


I then delete all files from the directory:

var/log/journal


Then delete the file:

var/lib/rsyslog/imjournal.state


(This file stores the rsyslog state for journal file reading)
The files will be restored after restarting the services.


Now you just need to restart the services:



systemctl restart systemd-journald.socket
systemctl restart systemd-journald
systemctl restart rsyslog


And everything is back to normal.

Rise Company
12-06-2023, 10:59
للتاكد من عمل ensure that Rsyslogd is running:

ادخل هذا الامر


/scripts/restartsrv_rsyslogd --status

ويمكنك ايضا التحقق من وجوده ام لا فى
Home / Service Configuration / Service Manager

https://www.rise.company/upload/uploads/168370958264951.png


اذا لم تكن مثبته

Install syslog. Check to see what the package name is with the following command:



yum list | grep syslog

Install the syslog package of your choice. Typically rsyslog or syslog-ng:



yum install rsyslog


اذا كانت مثبته , تابع الشرح