รายละเอียดปัญหา -มีการเรียกใช้งานจำนวนมากๆ พร้อมๆกันไม่ได้ หรือ ทำการ Refresh บ่อยครั้งแล้วเกิด Error จุดสังเกตุ 1. ตรวจสอบที่ /usr/local/apache/logs/error_log จะพบ ตัวอย่าง [Thu Jul 05 13:43:55.837466 2018] [:error] [pid 23213:tid 140573633652480] [client 14.207.100.60:50892] client denied by server configuration: /home/gandhi326/public_html/admin/notics_manager, referer: http://www.gandhi326.com/admin/stockout_rt/ [Thu Jul 05 13:43:56.068488 2018] [:error] [pid 23213:tid 140573574903552] [client 14.207.100.60:21109] client denied by server configuration: /home/gandhi326/public_html/admin/notics_manager, referer: http://www.gandhi326.com/admin/stockout_rt [Thu Jul 05 13:43:57.644161 2018] [:error] [pid 23213:tid 140573490976512] [client 14.207.100.60:51650] client denied by server configuration: /home/gandhi326/public_html/admin/notics_manager, referer: http://www.gandhi326.com/admin/whitelist_ips/ 2.ตรวจสอบเพิ่มเติมที่ ls -alt /var/log/apache2/mod_evasive/ ตัวอย่าง [root@server5 ~]# ls -alt /var/log/apache2/mod_evasive/ total 96 drwxrwx--- 2 root nobody 4096 Jul 5 10:19 . -rw-r--r-- 1 nobody nobody 6 Jul 5 10:19 dos-124.120.192.189 -rw-r--r-- 1 nobody nobody 6 Jul 5 10:17 dos-14.207.97.80 -rw-r--r-- 1 nobody nobody 6 Jul 5 10:12 dos-27.130.99.38 -rw-r--r-- 1 nobody nobody 6 Jul 5 10:04 dos-101.108.254.245 -rw-r--r-- 1 nobody nobody 6 Jul 5 09:26 dos-14.207.100.60 -rw-r--r-- 1 nobody nobody 6 Jul 5 07:11 dos-188.20.8.70 -rw-r--r-- 1 nobody nobody 6 Jul 4 22:24 dos-198.58.75.9 -rw-r--r-- 1 nobody nobody 4 Jul 4 17:21 dos-115.87.103.7 -rw-r--r-- 1 nobody nobody 4 Jul 4 14:17 dos-110.169.242.62 -rw-r--r-- 1 nobody nobody 4 Jul 4 13:52 dos-171.96.191.198 -rw-r--r-- 1 nobody nobody 4 Jul 4 12:42 dos-120.27.107.165 -rw-r--r-- 1 nobody nobody 4 Jul 4 10:00 dos-203.78.98.10 -rw-r--r-- 1 nobody nobody 4 Jul 4 09:53 dos-101.108.245.240 การแก้ปัญหาชั่วคราว - ลบไฟล์ที่เป็น IP ลูกค้าออก การแก้ที่ถูกต้อง - ปรับ config ให้เหมาะสม เพราะค่าที่ cpanel ให้มามันไม่เหมาะกับเว็บไซต์ที่มี dynamic มาก ๆ เช่น wordpress , stock /etc/apache2/conf.d/300-mod_evasive.conf
ปัญหา เมื่อทำการ login webmail แล้วสามารถเข้าถึงการทำ forwarders ได้ที่ระดับ Account สิ่งที่แสดง วิธีการแก้ไข 1. ทำการ Login ไปยังเครื่องเซิร์ฟเวอร์ที่พบปัญหานี้ 2. เข้าไปยัง Folder : /usr/local/cpanel/base/webmail/paper_lantern/_assets [root@system ~]# cd /usr/local/cpanel/base/webmail/paper_lantern/_assets 3. ทำการ Backup ไฟล์ user_preferences.html.tt ไว้ก่อน [root@sytem _assets]# cp -a user_preferences.html.tt user_preferences.html.tt_original 4. ทำการ Edit ไฟล์ user_preferences.html.tt [root@sytem _assets]# nano -w user_preferences.html.tt แล้ว ลบบรรทัดต่อไปนี้
ในกรณีของ VPS ที่มีความผิดปกติจากการ force reboot ทำให้ partion /tmp ไม่สามารถเขียนได้ กลายเป็น read only systems มีผลทำให้เกิดความผิดปกติต่างๆเช่น เข้า webmail ไม่ได้ เพราะไม่สามาถเขียน session ในการทำงานได้ และปัญหาอื่นๆ หากตรวจสอบจาก log จะพบ error ดังนี้ Mar 30 12:35:00 vps14 kernel: EXT3-fs error (device loop0): ext3_lookup: unlinked inode 6486 in dir #2 Mar 30 12:35:00 vps14 kernel: Aborting journal on device loop0. Mar 30 12:35:00 vps14 kernel: __journal_remove_journal_head: freeing b_committed_data Mar 30 12:35:00 vps14 kernel: __journal_remove_journal_head: freeing b_committed_data Mar 30 12:35:00 vps14 kernel: EXT3-fs error (device loop0): ext3_lookup: unlinked inode 6486 in dir #2 Mar 30 12:35:00 vps14 last message repeated 3 times Mar 30 12:35:00 vps14 kernel: ext3_abort called. ปัญหาเกิดจากไฟล์ /usr/tmpDSK มี error inode สามารถแก้ไขโดยทำการ scandisk โดยใช้คำสั่ง fsck ใน vps บางระบบอาจจะเป็น filesystem ext2 หรือ ext3 แตกต่างกันไป สามารถตรวจสอบชนิดของ filesystem โดยใช้คำสั่งดังต่อไปนี้ # file /usr/tmpDSK /usr/tmpDSK: Linux rev 1.0 ext3 filesystem data (needs journal recovery) << แสดงผลเป็น filesystem ext3 หรือตรวจสอบโดยใช้คำสั่ง df # df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 ext3 39549536 30980724 6527368 83% / /dev/xvda1 ext3 101086 27104 68763 29% /boot tmpfs tmpfs 524288 0 524288 0% /dev/shm /usr/tmpDSK ext3 495844 26713 443531 6% /tmp << แสดงผลเป็น filesystem ext3 วิธีแก้ปัญหาทีม TS- หากพบความผิดปกติในการใช้งาน webmail และพบ logs ที่เป็นปัญหาให้ส่งให้ Level2 ทันที วิธีแก้ปัญหาทีม SYSNOC หรือ ITS วิธีการขั้นตอนในการแก้ไขปัญหา 1. สร้างไฟล์ disable secure tmp # touch /var/cpanel/version/securetmp_disabled 2. restart system เพื่อให้ระบบยกเลิกการ mount partition /tmp #reboot 3. ทำการ scandisk file และ fix error inode # fsck.ext3 -f /usr/tmpDSK -y 4. mount loopback filesystem /usr/tmpDSK ไปไว้ที่ /tmp # mount -o loop /tmp 5. ยกเลิกการ disable secure tmp # rm /var/cpanel/version/securetmp_disabled
ปัญหา ไม่สามารถ ssh login เข้าเครื่องได้ และ run command yum rpm ได้ โดยจะขึ้น error Sep 11 15:00:01 svn kernel: [139923.063452] sshd[15554]: segfault at 8 ip 00007f3e802487b3 sp 00007ffc92528570 error 4 in ld-2.12.so[7f3e8023d000+20000]Sep 11 15:00:06 svn kernel: [139928.255318] rpm[15620]: segfault at 8 ip 00007effedb8d7b3 sp 00007ffcb909b270 error 4 in ld-2.12.so[7effedb82000+20000] ทางแก้ปัญหา 1. ทำการตรวจสอบ OS version โดยใช้ command cat /etc/redhat-release 2. จากนั้นให้ทำการเข้า rescue mode แล้วทำการหา libralies จากเครื่องที่ใช้ OS version เดียวกัน แล้วนำไฟล์มาทับ โดย ld-2.12.so นี้จะเก็บ อยู่ที่โฟลเดอร์ /lib64 โดยให้ทำการ backup /lib64 ของเดิมไว้ก่อน เมื่อนำไฟล์ไปวางทับได้แล้วให้ ทำการ reboot เครื่อง 3. เมื่อเครื่อง on ขึ้นมา ให้ลองทำการ run yum update ดูว่ายังขึ้น error segfault อยู่หรือไม่ 4. ถ้าไม่ขึ้น error แล้ว ให้ทำการติดตั้ง libssh2 ตามด้านล่าง cd /root wget https://libssh2.org/download/libssh2-1.7.0.tar.gz tar zxvf libssh2-1.7.0.tar.gz cd libssh2-1.7.0 ./configure make make install yum install libssh2 libssh2-devel yum update 5. ทดสอบ ssh login เข้าเครื่อง หมายเหตุ: ขั้นตอนต่างๆ จะทำผ่าน console โดย vnc เข้าไป สาเหตุของปัญหา อาจเป็นที่มีการ update kernel หรือ มีการ run คำสั่งอะไรบางอย่างทำให้ libralies ของระบบพัง หรือ Harddisk Drive อาจมี bad sector เลยทำให้ libralies พัง
ปัญหา Mailman : mailing list ไม่แสดง list หลังจากย้ายเครื่อง server มาเครื่องใหม่ ทางแก้ปัญหา 1. ทำการ run /scripts/restartsrv_mailman จะพบ error File "/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl", line 110, in from Mailman.MailList import MailList File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 51, in from Mailman.Archiver import Archiver File "/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/__init__.py", line 17, in from Archiver import * File "/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/Archiver.py", line 37, in from Mailman.i18n import _ File "/usr/local/cpanel/3rdparty/mailman/Mailman/i18n.py", line 36, in if not mm_cfg.DISABLE_COMMAND_LOCALE_CSET: AttributeError: 'module' object has no attribute 'DISABLE_COMMAND_LOCALE_CSET' 2. ให้ทำการติดตั้ง mailman ใหม่ โดยให้ทำการ run คำสั่งตามด้านล่าง cd /usr/local/cpanel/3rdparty mv mailman mailman.bak /usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.mailman installed /usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=mailman /scripts/restartsrv mailman 3. ทำการ copy mailing list เดิมมาใส่ไว้ใน folder list cp -a /usr/local/cpanel/3rdparty/mailman.bak/lists/mailinglist /usr/local/cpanel/3rdparty/mailman/lists/ /scripts/restartsrv mailman 4. เข้าไปเช็คดูใน cpanel account สาเหตุของปัญหา การติดตั้ง mailman ไม่สมบูรณ์ หรือมีการ copy ข้อมูลจากเครื่องเดิมมาทับเลยทำให้เกิด error