-1

I need port 3000 free for my dev work. But it's being used by grafana-server, that I don't remember ever installing. We do use it within our company so perhaps at some point it has been added to system somehow.

Example netstat output

Anyway, so I use this command sudo netstat -lepunt | grep 3000 to get the process that is on port 3000.

Then sudo kill -9 [process number] then I netstat again and it's there again but with a different process number.

I've also followed this example to force the port number used to a different one but it still doesn't seem to fix my problem.

I've also tried to find every occurrence of grafana on my computer and delete them. Restarted services to make the system know that they no longer exist, but they still do. At the end of my wit and not sure what to do next. Any ideas? Any more information needed from myself?

0

Credit goes to user OweH_OweH on reddit.

systemd restarts it, because grafana-server.service has Restart=on-failure in it and by sending the process SIGKILL you trigger that failure state. If you just use the normal kill PROCID_HERE command it will terminate normally and not be restarted.

So I shouldn't have being adding the -9 in my kill command.

3
  • 1
    I would recommend stopping and disabling the service instead of throwing kill signals at it. – Jeff Schaller Jul 30 '20 at 13:52
  • how would I do that? – shmink Jul 30 '20 at 14:03
  • 1
    I would use systemctl --now disable grafana-server. – Jeff Schaller Jul 30 '20 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.