2

I am trying to stop confluence through ./stop-confluence.sh but it is showing error like this "PID file found but no matching process was found. Stop aborted." so I try to kill that process with "kill -9 pid" but it showing that "PID: no process found". Can anyone please give me any idea what is going wrong with the process.

Manav Patel
  • 21
  • 1
  • 2

3 Answers3

0

You can list the process and grep confluence and kill it like this ps -ef|grep confluence and then using pid kill it kill -9 2132

Nithees balaji
  • 148
  • 1
  • 11
0

To understand what is going on, you have to understand the init script of that process. In your case, its the thing from confluence. So its a popular way/design to create a pid file that will hold the pid (process id), when a deamon or a unix process/service starts. And this is the number that you see in the ps output.

Now due to some faulty reasons, when the process/deamon dies or exits, it leaves the pid file in the system. So, when you try to stop the service its throws you the exception: PID file found but no matching process was found. Stop aborted.

Ideally when a process exits the pid file have to be deleted by it.

Finally on your how to fix this, there is no single way to fix it. You have to look into the init script that executes when the service starts. Find why the service dies (unless someone is killing it intentionally). If stopping the service leaves the pid file, the issue is with the init script. You need to fix it.

Hope this helps!

OK999
  • 1,353
  • 2
  • 19
  • 39
0

In my case the reason of failure was a second startup script in the

/etc/init.d/

trying to start Jira the second time after the original script has already done it.

$ sudo ll /etc/init.d/ | grep jira
-rwxr-xr-x 1 root root  261 * * * jira
-rwxr-xr-x 1 root root  261 * * * jira1

I've disabled execution of the "jira1" startup script by executing

$ sudo chmod -x /etc/init.d/jira1
$ sudo ll /etc/init.d/ |grep jira
-rwxr-xr-x 1 root root  261 * * * jira
-rw-r--r-- 1 root root  261 * * * jira1

This way the second instance will not be started at server boot. You can also delete the second startup script, but please back it up before doing anything destructive.

linux64kb
  • 168
  • 5