bestlibre / hassio-addons

173 stars 109 forks source link

Caddy Proxy version upgrade makes the add-on unresponsive on Raspberry Pi 3 #78

Closed thibmaek closed 4 years ago

thibmaek commented 6 years ago

After upgrading to the latest caddy-proxy version this add-on is no longer working. I can't access my remote domain anymore, which worked fine before the version bump. Using the following config in Hass.io 0.72.1:

{
  "homeassistant": "x.domain.com",
  "vhosts": [
    {
      "vhost": "a.domain.com",
      "remote": "192.168.1.x",
      "port": "xxxx"
    },
    {
      "vhost": "b.domain.com",
      "remote": "192.168.1.x",
      "port": "xxxx",
      "user": "xxx",
      "pwd": "xxxx"
    },
    {
      "vhost": "c.domain.com",
      "remote": "192.168.1.x",
      "port": "xxxxx",
      "user": "xxxxxxxxxxxxxxx",
      "pwd": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    {
      "vhost": "d.domain.com",
      "remote": "192.168.1.y",
      "port": "xx"
    },
    {
      "vhost": "e.domain.com",
      "remote": "192.168.1.x",
      "port": "xxxx"
    }
  ],
  "raw_config": [],
  "email": "xxxxxxxxxxxxxxxxxx@xxxxxxxxxxxx.com"
}

There is no log output from the add-on, nor is there any usable error logging in the supervisor layer.

bestlibre commented 6 years ago

It is strange. I'm using the same addon with almost the same conf and it works for me. I do not use the user/pwd anymore. Can you try without those params ?

thibmaek commented 6 years ago

Yeah I'll retry this weekend, otherwise I'll just try and downgrade to another Docker image tag for this add-on if that's possible

thibmaek commented 6 years ago

Issue seems to be this vhost configuration:

{
  "vhost": "",
  "remote": "192.168.x.x",
  "port": "9091"
}

which points to Transmission on another server. This server first shows a Basic Authentication dialog screen (like you would have if user & password are set in Caddy vhost config) and then does a redirect to /transmission/web/ on that URL.

Maybe Caddy changed how Basic Authentication prompts or redirects are being handled?

einschmidt commented 6 years ago

I experienced the same issue, but under different occasions. The issue happened after switching to HassOS 1.5 Afterwards I removed one vhost after the other and found the one causing the issue:

{
  "vhost": "pi-hole.domain.de",
  "port": "8080"
},

Changing the port didn't solve the issue. Neither 8080 nor 8088 worked. Of course I also changed the port for the Pi-Hole addon accordingly. The same config worked fine under resinOS.

bestlibre commented 5 years ago

Is this still an issue?

thibmaek commented 5 years ago

Yep, I'm also not able to use that vhost I mentioned

einschmidt commented 5 years ago

Didn't try it recently but about a month ago. And yes, the issue still occurs.

tayanov commented 5 years ago

+1. when remove vhost, all work