[FAIL] Starting Grafana Server: failed!

I can’t restart grafana. [FAIL] Starting Grafana Server: failed!

Log is below:

root@grafana:/usr/share/grafana/public/app# service grafana-server restart
[ ok ] Stopping Grafana Server: Grafana Server is not running but pid file exists, cleaning up.
[FAIL] Starting Grafana Server: failed!

t=2017-04-11T02:00:02+0000 lvl=info msg=“Starting Grafana” logger=main version=4.2.0 commit=349f3eb compiled=2017-03-22T10:06:41+0000
t=2017-04-11T02:00:02+0000 lvl=info msg=“Config loaded from” logger=settings file=/usr/share/grafana/conf/defaults.ini
t=2017-04-11T02:00:02+0000 lvl=info msg=“Config loaded from” logger=settings file=/etc/grafana/grafana.ini
t=2017-04-11T02:00:02+0000 lvl=info msg=“Config overriden from command line” logger=settings arg="default.paths.data=/var/lib/grafana"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Config overriden from command line” logger=settings arg="default.paths.logs=/var/log/grafana"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Config overriden from command line” logger=settings arg="default.paths.plugins=/var/lib/grafana/plugins"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Path Home” logger=settings path=/usr/share/grafana
t=2017-04-11T02:00:02+0000 lvl=info msg=“Path Data” logger=settings path=/var/lib/grafana
t=2017-04-11T02:00:02+0000 lvl=info msg=“Path Logs” logger=settings path=/var/log/grafana
t=2017-04-11T02:00:02+0000 lvl=info msg=“Path Plugins” logger=settings path=/var/lib/grafana/plugins
t=2017-04-11T02:00:02+0000 lvl=info msg=“Initializing DB” logger=sqlstore dbtype=sqlite3
t=2017-04-11T02:00:02+0000 lvl=info msg=“Starting DB migration” logger=migrator
t=2017-04-11T02:00:02+0000 lvl=info msg=“Executing migration” logger=migrator id="copy data account to org"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Skipping migration condition not fulfilled” logger=migrator id="copy data account to org"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Executing migration” logger=migrator id="copy data account_user to org_user"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Skipping migration condition not fulfilled” logger=migrator id="copy data account_user to org_user"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Starting plugin search” logger=plugins
t=2017-04-11T02:00:02+0000 lvl=info msg=“Initializing CleanUpService” logger=cleanup
t=2017-04-11T02:00:02+0000 lvl=info msg=“Initializing Alerting” logger=alerting.engine
t=2017-04-11T02:00:02+0000 lvl=info msg="Initializing Stream Manager"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Initializing HTTP Server” logger=http.server address=0.0.0.0:3000 protocol=http subUrl=
t=2017-04-11T02:00:02+0000 lvl=eror msg=“Fail to start server” logger=server error="listen tcp 0.0.0.0:3000: bind: address already in use"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Shutdown started” logger=server code=1 reason="Startup failed"
t=2017-04-11T02:00:02+0000 lvl=info msg=“stopped http server” logger=http.server
t=2017-04-11T02:00:02+0000 lvl=info msg="Stopped Stream Manager"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Stopped CleanUpService” logger=cleanup reason="context canceled"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Stopped Alerting” logger=alerting.engine reason="context canceled"
t=2017-04-11T02:00:02+0000 lvl=info msg=“Shutdown completed” logger=server reason=“context canceled”

Please help me to restart grafana.
Thanks.

Something is already using port 3000 or there is a permission denied error when trying to bind to that port.

1 Like

Right. Something is already using port 3000.

Stop the grafana services
systemctl stop grafana.service -l

do a ps aux |grep grafana and kill if any process exits

Then start grafana using
systemctl stop grafana.service -l

Tailf for grafana logs

tailf /var/log/grafana/grafana.log

t=2017-07-10T18:30:38+0000 lvl=info msg=“Ldap enabled, reading config file” logger=ldap file=/etc/grafana/ldap.toml
t=2017-07-10T18:30:38+0000 lvl=info msg=“Starting plugin search” logger=plugins
t=2017-07-10T18:30:38+0000 lvl=info msg=“Registering plugin” logger=plugins name=Clock
t=2017-07-10T18:30:38+0000 lvl=info msg=“Registering plugin” logger=plugins name="Pie Chart"
t=2017-07-10T18:30:38+0000 lvl=info msg=“Registering plugin” logger=plugins name=Diagram
t=2017-07-10T18:30:38+0000 lvl=info msg=“Registering plugin” logger=plugins name=HeatmapEpoch
t=2017-07-10T18:30:38+0000 lvl=info msg=“Registering plugin” logger=plugins name=Histogram
t=2017-07-10T18:30:38+0000 lvl=info msg=“Initializing Alerting” logger=alerting.engine
t=2017-07-10T18:30:38+0000 lvl=info msg=“Initializing CleanUpService” logger=cleanup
t=2017-07-10T18:30:44+0000 lvl=info msg=“Initializing HTTP Server” logger=server address=0.0.0.0:3000 protocol=http subUrl=

1 Like

same issue, I can’t start grafana server.

You can use other port for grafana.

Hi, do you found the solution …?

If you have something else using that port then you can change the port Grafana uses in the grafana ini file.

Something is already using port 3000. So we need to change port to other.