hassio-addons / addon-grafana

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

Can't install plugins (connect: cannot assign requested address) #233

Closed dadav closed 2 years ago

dadav commented 2 years ago

Problem/Motivation

I can't install plugins.

Expected behavior

The plugin (e.g. grafana-clock-panel) should just be installed.

Actual behavior

Using the following config

certfile: fullchain.pem
env_vars: []
keyfile: privkey.pem
plugins:
  - grafana-clock-panel
ssl: true

results in the following logs

[cont-init.d] grafana.sh: executing... 
Error: ✗ Get "https://grafana.com/api/plugins/repo/grafana-clock-panel": dial tcp [2600:1901:0:b3ea::]:443: connect: cannot assign requested address
[14:59:47] FATAL: Failed installing Grafana plugin: grafana-clock-panel
[cont-init.d] grafana.sh: exited 1.

The ipv6 address points to grafana.com, which seems to only have an ipv6 adress. Using the terminal addon, I can curl other sites which support both (ipv4 & ipv6) but not grafana.com.

In the network section of the hass settings I can see that it has an ipv4 and ipv6 address. In the terminal addon (so inside of the docker container?) I can just see 172.30.33.2, but no ipv6.

Steps to reproduce

Use the config from above? Probably it's just my network (ds-lite)...?

Proposed changes

No idea. Just hoping for some hints to fix this issue :)

dadav commented 2 years ago

My configuration.yaml looks like this:

http:
  cors_allowed_origins:
    - https://reverse-proxy-url.com/
    - http://hass:8123
  use_x_forwarded_for: true
  trusted_proxies:
    - 10.8.0.101
    - 172.30.33.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5
sinclairpaul commented 2 years ago

As you can duplicate the issue across multiple addons, this isn't an issue with the Grafana addon.

As it is likely a system configuration issue, you will likely get more assistance on the Home Assistant Discord or Forums.

dadav commented 2 years ago

Turns out it was some DNS issue...