Can not restart grafana-server

Hello,

I have grafana installed via apt in an ubuntu 18.04. For starting the server if a try to execute from init.d “grafana-server start” it returns an error “Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath”.

To solve this, I started the server by writing in same dir “grafana-server --config=/etc/grafana/grafana.ini --homepath=/usr/share/grafana”

Then I can access to grafana by host:3000 . I have created a dashboard, connected it to my database, everything looks ok.

But, I have not control over the server. I’ve installed a plugin, but I can not see it, because I need to restart the server. But how? By writing grafana-server stop, or restart, or start, I get the same error as before.

If I use the command service, nothing happen. Actually, despite the server looks being working (I have access to the grafana dashboard, and so on), if I execute service --status-all, grafana-server appears `with symbol [-], this is, down.

I’m thinking in removing and install via .deb package.

Nobody had similar issue? :pensive:

If you are sudoer, go to /etc/default for ubuntu, for centos /etc/sysconfig
Find the file that name grafana-server, in that file the configuration of the grafana-server, edit accordingly as your needs

Then you can restart grafana using

service grafana-server restart

I do , I find out that the grafana-server file is not on the grafana folder but on C:\ prompt. I copied it back and right click on it to run it as administrator. This solved the problem.