There are processes named 'apache2' running

后端 未结 4 1142
野性不改
野性不改 2021-02-15 15:20

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 wh

4条回答
  •  梦谈多话
    2021-02-15 15:46

    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.

提交回复
热议问题