Fault Phenomenon: On a server, launch the Apache process with a WACOS user, start using the command ps -ef | grep httpd immediately after startup, but when you visit the web interface, you will use the command ps -ef. | GREP HTTPD, discovery process has been down. After inquiring the operations conducted by the field engineer, I know the replication of the service port before. Check the Apache's error log file error_log, found a alarm: [WARN] PID file /opt/wacos/tools/apache/logs/httpd.pid Overwritten - Unclean Shutdown of Previous Apache Run • Failed Description: In one server On, launch the Apache process with WACOS users, immediately use the command ps -ef | grep httpd to see a process is started, but the web interface is reported later, then use the command ps -ef | grep httpd, discovery process already Dump. After inquiring the operations conducted by the field engineer, I know the replication of the service port before. Check the Apache's error log file error_log, find the following alarm: [WARN] PID file /opt/wacos/tools/apache/logs/httpd.pid overwritten - Unclean Shutdown of Previous Apache Run? Suspected with the PID record file with Apache Or the configuration file is related (because the site changes the Apache's listening port). So open two login windows, one window monitors the output of the error log file with the TAIL -F ERROR_LOG, and the other window starts Apache's service. After starting Apache, the error log file is found as follows: [THU Jun 24 21:54:27 2004] [WARN] PID file /opt/wacos/tools/apache/logs/httpd.pid overwritten - Unclean Shutdown of Previous Apache Run? Fopen: Permission DeniedHttpd: Could Not Log Pid to file /opt/wacos/tools/apache/logs/httpd.pid Enter / Opt / WacOS / Tools / Apache / logs Check httpd using ls -l httpd.pid. The properties of the PID file are found, the properties of the file are as follows: -rw-r - r - 1 Root Others 4 JUN 25 14:58 httpd.pid Observer is root, and has not released the write permission to other users. Using the WACOS user launched Apache, Apache tried to overwrite the httpd.pid file, it will definitely failed. This file records the process identifier (PID, Process ID) after Apache, which has an important role in HTTPD services, which will of course quit. Fault Analysis: It is estimated that there is a relevant person in daily maintenance, using the root user to start apache, resulting in the host of the httpd.pid file to be root, resulting in the later use of the WACOS user to start apache, apache will try to write httpd.pid. Record your own PID process number, but because httpd.pid is currently ROOT to modify httpd.pid files will fail. Troubleshooting: After positioning the problem, use the following solution.
Go to the / OPT / WACOS / Tools / Apache / logs directory to delete the httpd.pid file. Then restart Apache with WACOS users, and start Apache.