There are processes named 'apache2' running

后端 未结 4 1143
野性不改
野性不改 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.

    0 讨论(0)
  • 2021-02-15 15:49

    Kill them.

    kill -9 $(ps -e | grep apache2 | awk '{print $1}')

    0 讨论(0)
  • 2021-02-15 15:54

    none of these answers worked.. this did

    kill -9 $(pidof apache2)
    
    0 讨论(0)
  • 2021-02-15 16:01

    I had a similar problem and I solved this code.

    pidof /usr/sbin/apache2
    

    service apache2 restart It's work.

    0 讨论(0)
提交回复
热议问题