I'm using Ansible to automatically install Grafana, Promethus and Node exporter. Everything else works well, but I'm having issues starting the Grafana server. So I tried to SSH into the server and run sudo grafana-server --config grafana.ini --homepath "/usr/share/grafana"
. My HTTP options for Grafana is this:
# HTTP options[server]http_addr = 0.0.0.0http_port = 1339domain = ansiblevirtualboxroot_url = http://0.0.0.0:1337cert_key = enforce_domain = Falseprotocol = httpsocket = enable_gzip = Falsecert_file = static_root_path = publicrouter_logging = False
As you see, I'm currently using port 1339. Which gives me the error address already in use. I can change to port 3000, 1337 etc. I always get that error.
Here below is the log for the recent try to start the server.
t=2019-09-19T06:26:44+0000 lvl=info msg="Starting Grafana" logger=server version=6.3.5 commit=67bad72 branch=HEAD compiled=2019-09-02T09:34:49+0000t=2019-09-19T06:26:44+0000 lvl=info msg="Config loaded from" logger=settings file=/usr/share/grafana/conf/defaults.init=2019-09-19T06:26:44+0000 lvl=info msg="Config loaded from" logger=settings file=grafana.init=2019-09-19T06:26:44+0000 lvl=info msg="Path Home" logger=settings path=/usr/share/grafanat=2019-09-19T06:26:44+0000 lvl=info msg="Path Data" logger=settings path=/var/lib/grafanat=2019-09-19T06:26:44+0000 lvl=info msg="Path Logs" logger=settings path=/var/log/grafanat=2019-09-19T06:26:44+0000 lvl=info msg="Path Plugins" logger=settings path=/var/lib/grafana/pluginst=2019-09-19T06:26:44+0000 lvl=info msg="Path Provisioning" logger=settings path=/usr/share/grafana/conf/provisioningt=2019-09-19T06:26:44+0000 lvl=info msg="App mode production" logger=settingst=2019-09-19T06:26:44+0000 lvl=info msg="Initializing SqlStore" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3t=2019-09-19T06:26:44+0000 lvl=info msg="Starting DB migration" logger=migratort=2019-09-19T06:26:44+0000 lvl=info msg="Initializing HTTPServer" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing InternalMetricsService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing RemoteCache" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing QuotaService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing PluginManager" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Starting plugin search" logger=pluginst=2019-09-19T06:26:44+0000 lvl=info msg="Initializing RenderingService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing AlertEngine" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing DatasourceCacheService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing HooksService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing LoginService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing SearchService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing ServerLockService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing TracingService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing UsageStatsService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing UserAuthTokenService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing CleanUpService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing NotificationService" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing provisioningServiceImpl" logger=servert=2019-09-19T06:26:44+0000 lvl=info msg="Initializing Stream Manager"t=2019-09-19T06:26:44+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:1339 protocol=http subUrl= socket=t=2019-09-19T06:26:44+0000 lvl=eror msg="Stopped HTTPServer" logger=server reason="listen tcp 0.0.0.0:1339: bind: address already in use"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped Stream Manager"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped NotificationService" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped CleanUpService" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped UserAuthTokenService" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped UsageStatsService" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped TracingService" logger=server reason=nilt=2019-09-19T06:26:44+0000 lvl=info msg="Stopped RenderingService" logger=server reason=nilt=2019-09-19T06:26:44+0000 lvl=info msg="Stopped RemoteCache" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped InternalMetricsService" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped provisioningServiceImpl" logger=server reason="context canceled"t=2019-09-19T06:26:44+0000 lvl=info msg="Stopped AlertEngine" logger=server reason="context canceled"t=2019-09-19T06:26:45+0000 lvl=info msg="Stopped PluginManager" logger=server reason="context canceled"t=2019-09-19T06:26:45+0000 lvl=eror msg="Server shutdown" logger=server reason="listen tcp 0.0.0.0:1339: bind: address already in use"
What could be the issue? If I run netstat -tulpn
, it doesn't say anything about listening to the ports I have been using. I'm using Ubuntu 18.04