-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?

2 Answers 2

5

I have been struggling to figure this out for mac. This page kept showing up. So, to help other mac users please use the following command brew services stop grafana

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. Commented Jul 30, 2020 at 13:52
  • how would I do that? Commented Jul 30, 2020 at 14:03
  • 2
    I would use systemctl --now disable grafana-server. Commented Jul 30, 2020 at 14:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.