hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
213 stars 61 forks source link

Grafana addon does not startup #403

Closed otto2me closed 1 week ago

otto2me commented 1 month ago

Hello,

I am running home assistent on VirtualMachine on a Synology NAS (DS220+). HA runs fine, I could also install InfluxDB and now I would like to use grafana for visualisation. , There my problem starts. I could install grafana HA version 9.2.2 and just now 10.0.0, but as soon as I start the addon the startup is terminated at some point. Unfortunately, I am not able to modifiy the grafana.ini (as suggested in other topics) as within HA this is not “vissible” (not even an ssh connection)

On my Synology I was able to install grafana within a Docker container, but I would rather like to run it as an addon within HA.

This is my Log:

s6-rc: info: service init-nginx successfully started
s6-rc: info: service init-grafana successfully started
s6-rc: info: service grafana: starting
s6-rc: info: service grafana successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[12:59:41] INFO: Starting Grafana...
s6-rc: info: service legacy-services successfully started
[13:00:51] INFO: Starting NGINX...
2024/05/15 13:01:32 [error] 541#541: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
2024/05/15 13:02:37 [error] 541#541: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
Grafana server is running with elevated privileges. This is not recommended
logger=settings t=2024-05-15T13:02:51.701536945+02:00 level=info msg="Starting Grafana" version=11.0.0 commit=277ef258d4b9a5acdf2932347c6a4ca72d739b28 branch=HEAD compiled=2024-05-15T13:02:51+02:00
logger=settings t=2024-05-15T13:02:51.739435296+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2024-05-15T13:02:51.739793972+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2024-05-15T13:02:51.740552964+02:00 level=info msg=Target target=[all]
logger=settings t=2024-05-15T13:02:51.740673435+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2024-05-15T13:02:51.740688853+02:00 level=info msg="Path Data" path=/data
logger=settings t=2024-05-15T13:02:51.740701816+02:00 level=info msg="Path Logs" path=/var/logs/grafana
logger=settings t=2024-05-15T13:02:51.740714549+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2024-05-15T13:02:51.74072787+02:00 level=info msg="Path Provisioning" path=/usr/share/grafana/conf/provisioning
logger=settings t=2024-05-15T13:02:51.740741762+02:00 level=info msg="App mode production"
logger=sqlstore t=2024-05-15T13:02:51.743483301+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2024-05-15T13:02:52.584896949+02:00 level=info msg="Locking database"
logger=migrator t=2024-05-15T13:02:52.584971697+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2024-05-15T13:02:52.797731082+02:00 level=info msg="migrations completed" performed=0 skipped=558 duration=15.862063ms
logger=migrator t=2024-05-15T13:02:52.800400888+02:00 level=info msg="Unlocking database"
logger=secrets t=2024-05-15T13:02:52.876898626+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
2024/05/15 13:03:42 [error] 541#541: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
2024/05/15 13:06:11 [error] 541#541: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
logger=plugins.registration t=2024-05-15T13:06:42.843779338+02:00 level=info msg="Plugin registered" pluginId=grafana-image-renderer
logger=plugin.angulardetectorsprovider.dynamic t=2024-05-15T13:06:44.261542777+02:00 level=info msg="Restored cache from database" duration=976.97444ms
logger=plugin.store t=2024-05-15T13:06:50.139161278+02:00 level=info msg="Loading plugins..."
2024/05/15 13:07:07 [error] 541#541: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
logger=plugins.registration t=2024-05-15T13:07:19.464267673+02:00 level=error msg="Could not register plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugins.initialization t=2024-05-15T13:07:19.569706061+02:00 level=error msg="Could not initialize plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugin.store t=2024-05-15T13:07:20.057582362+02:00 level=info msg="Plugins loaded" count=54 duration=29.918427794s
logger=query_data t=2024-05-15T13:07:33.568083701+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2024-05-15T13:07:38.824969904+02:00 level=info msg="Live Push Gateway initialization"
logger=ngalert.notifier.alertmanager org=1 t=2024-05-15T13:07:44.699292005+02:00 level=info msg="Applying new configuration to Alertmanager" configHash=a013a3f424edb13bed8050eaf374d506
logger=ngalert.state.manager t=2024-05-15T13:07:46.990656587+02:00 level=info msg="Running in alternative execution of Error/NoData mode"
logger=infra.usagestats.collector t=2024-05-15T13:07:48.52963277+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=provisioning.alerting t=2024-05-15T13:07:48.642312486+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2024-05-15T13:07:48.642475114+02:00 level=info msg="finished to provision alerting"
logger=grafanaStorageLogger t=2024-05-15T13:07:48.898104986+02:00 level=info msg="Storage starting"
logger=ngalert.state.manager t=2024-05-15T13:07:48.790883625+02:00 level=info msg="Warming state cache for startup"
logger=ngalert.multiorg.alertmanager t=2024-05-15T13:07:48.880773982+02:00 level=info msg="Starting MultiOrg Alertmanager"
logger=ngalert.state.manager t=2024-05-15T13:07:49.761197802+02:00 level=info msg="State cache has been initialized" states=0 duration=970.296572ms
logger=ngalert.scheduler t=2024-05-15T13:07:49.784000143+02:00 level=info msg="Starting scheduler" tickInterval=10s maxAttempts=1
logger=ticker t=2024-05-15T13:07:49.784174229+02:00 level=info msg=starting first_tick=2024-05-15T13:07:50+02:00
logger=provisioning.dashboard t=2024-05-15T13:07:50.928022853+02:00 level=info msg="starting to provision dashboards"
logger=provisioning.dashboard t=2024-05-15T13:07:50.930561461+02:00 level=info msg="finished to provision dashboards"
logger=http.server t=2024-05-15T13:07:55.219954368+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl=/api/hassio_ingress/QkDjsFh4L_5oLjA1KUycNiDK7wnc5dc1DZRh05ef8Ww socket=
logger=grafana.update.checker t=2024-05-15T13:08:30.169806868+02:00 level=error msg="Update check failed" error="failed to get stable version from grafana.com: Get \"https://grafana.com/api/grafana/versions/stable\": dial tcp: lookup grafana.com: i/o timeout (Client.Timeout exceeded while awaiting headers)" duration=40.695546097s
logger=plugin.angulardetectorsprovider.dynamic t=2024-05-15T13:08:29.877038509+02:00 level=error msg="Error while updating detectors" error="fetch: http do: Get \"https://grafana.com/api/plugins/angular_patterns\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
logger=plugin.angulardetectorsprovider.dynamic t=2024-05-15T13:08:30.185364746+02:00 level=info msg="Patterns update finished" duration=38.435327798s
logger=plugin.signature.key_retriever t=2024-05-15T13:08:18.171623179+02:00 level=error msg="Error downloading plugin manifest keys" error="Get \"https://grafana.com/api/plugins/ci/keys\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
logger=plugin.grafana-image-renderer t=2024-05-15T13:09:03.300529886+02:00 level=error msg="plugin process exited" plugin=/var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_amd64 id=584 error="signal: killed"
logger=server t=2024-05-15T13:09:03.857946047+02:00 level=error msg="Stopped background service" service=*rendering.RenderingService reason="timeout while waiting for plugin to start"
logger=tracing t=2024-05-15T13:09:04.027751359+02:00 level=info msg="Closing tracing"
logger=ngalert.multiorg.alertmanager t=2024-05-15T13:09:06.724001363+02:00 level=error msg="Error while synchronizing Alertmanager orgs" error="context canceled"
logger=plugin.grafana-image-renderer t=2024-05-15T13:09:07.490688686+02:00 level=warn msg="plugin failed to exit gracefully"
2024/05/15 13:09:14 [error] 541#541: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: a0d7b954-grafana, request: "GET /api/health HTTP/1.1", upstream: "http://127.0.0.1:3000/api/health", host: "127.0.0.1:1337"
logger=ssosettings.service t=2024-05-15T13:09:15.961551993+02:00 level=error msg="failed to fetch SSO Settings for all providers" err="context canceled"
logger=ngalert.scheduler t=2024-05-15T13:09:16.202188483+02:00 level=error msg="Failed to update alert rules" error="failed to get alert rules: failed to fetch alert rules: context canceled"
logger=ticker t=2024-05-15T13:09:16.209180509+02:00 level=info msg=stopped last_tick=2024-05-15T13:08:10+02:00
logger=infra.usagestats.collector t=2024-05-15T13:09:16.811439161+02:00 level=error msg="Failed to get system stats" error="context canceled"
logger=infra.usagestats.collector t=2024-05-15T13:09:16.815755359+02:00 level=error msg="Failed to get system stats" error="context canceled"
logger=grafana-apiserver t=2024-05-15T13:09:29.86521302+02:00 level=info msg="Adding GroupVersion playlist.grafana.app v0alpha1 to ResourceManager"
logger=grafana-apiserver t=2024-05-15T13:09:29.890602641+02:00 level=info msg="Adding GroupVersion featuretoggle.grafana.app v0alpha1 to ResourceManager"
Error: ✗ *rendering.RenderingService run error: timeout while waiting for plugin to start
[13:09:32] INFO: Service Grafana exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
[13:09:34] INFO: Starting Grafana...
[13:09:34] INFO: Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service init-nginx: stopping
s6-rc: info: service grafana: stopping
s6-rc: info: service init-nginx successfully stopped
[13:09:34] INFO: Service Grafana exited with code 256 (by signal 15)
s6-rc: info: service grafana successfully stopped
s6-rc: info: service init-grafana: stopping
s6-rc: info: service memcached: stopping
s6-rc: info: service init-grafana successfully stopped
[13:09:35] INFO: Service memcached exited with code 0 (by signal 0)
s6-rc: info: service memcached successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
rudsomlima commented 1 month ago

I have the same problem.

github-actions[bot] commented 2 weeks ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!