That is how I am doing to kill a service:

1.type ps -ef |grep service_name
2. then the output will be like that>root xxxx xxxx 0 09:15 pts/1
00:00:00 grep service_name
3. then I grep the pid which should be the one right after root and
type> kill -9 xxxx(the one right after root)

But I always got the result as follows:
bash: kill: (xxxx <pid of the service>) - no such process

Then I typed ps -ef |grep service_name again. I got the different pid.

I am confused. Can someone help with this? What did I wrong?

Thank you very much!