There are processes named 'apache2' running
Solution 1
Kill them.
kill -9 $(ps -e | grep apache2 | awk '{print $1}')
Solution 2
Before killing the process, maybe, you would like to check if the pid file path set in
/etc/apache2/apache2.conf
equals the one stated in APACHE_PID_FILE environment variable exported in the :
/etc/apache2/envvars
file.
Saving a process snapshot before proceeding to kill, would be helpful :
# top -b -n1 > /tmp/process.log
Then get the pid of apache2 with :
pidof apache2
It output the related processes id(s) e.g 4920 4919. Then kill them with :
sudo kill -9 pid
replacing pid with the process id(s) you got from the previous output.
Finally restart Apache 2 server :
sudo /etc/init.d/apache2 restart
Next time would be helpful letting others know basic things about your OS distro etc.
Hope it helps someone.
user3393252
Updated on July 21, 2022Comments
-
user3393252 almost 2 years
help me resolve this error in apache
/etc/init.d/apache2 restart
error:
There are processes named 'apache2' running which do not match your pid file which are left untouched in the name of safety, Please review the situation by hand.
thanks