jens-maus / RaspberryMatic

:house: A feature-rich but lightweight, buildroot-based Linux operating system alternative for your CloudFree CCU3/ELV-Charly 'homematicIP CCU' IoT smarthome central. Running as a pure virtual appliance (ProxmoxVE, Home Assistant, LXC, Docker/OCI, Kubernetes/K8s, etc.) on a dedicated embedded device (RaspberryPi, etc.) or generic x86/ARM hardware.
https://raspberrymatic.de
Apache License 2.0
1.53k stars 186 forks source link

Bad Gateway nach Update #2720

Closed Traseus closed 4 months ago

Traseus commented 4 months ago

Describe the issue you are experiencing

Web UI meldet Bad Gateway

Describe the behavior you expected

Running Web UI in Home Assistant

Steps to reproduce the issue

Start Update, wait to restart the addon.

What is the version this bug report is based on?

3.75.7.20240420

Which base platform are you running?

ha-addon (HomeAssistant Add-on)

Which HomeMatic/homematicIP radio module are you using?

HmIP-RFUSB

Anything in the logs that might be useful for us?

Addon log says successful finish to start addon

Additional information

Restore backup to former addon version brings back web hi

dzedler commented 4 months ago

Just wanted to report the same.

image image
DieNocke commented 4 months ago

I can report the same behavior with Home Assistant after the current update.

jens-maus commented 4 months ago

Then please try to access the WebUI by setting port 80 to e.g. 8080 in the addon config and see if you can directly access the RaspberryMatic WebUI via Port 8080 to the HomeAssistant Host.

super-Alfi commented 4 months ago

Also the same behavior with Home Assistant after the current update.

dzedler commented 4 months ago

Just wanted to report the same.

image image

I am going to stay on that version for the time being as HA can still use the entities, just in case you need additional data.

jens-maus commented 4 months ago

As said, it seems only the WebUI is not directly accessible from within the HomeAssistant WebUI (Ingress routing). Add Port 8080 to the port 80 settings in the Add-on config of RaspberryMatic and you should be able to access the WebUI again by pointing your browser to port 8080 with the IP of your HomeAssistant host system.

stebra72 commented 4 months ago

Then please try to access the WebUI by setting port 80 to e.g. 8080 in the addon config and see if you can directly access the RaspberryMatic WebUI via Port 8080 to the HomeAssistant Host.

Thanks, this works for me

dzedler commented 4 months ago

Then please try to access the WebUI by setting port 80 to e.g. 8080 in the addon config and see if you can directly access the RaspberryMatic WebUI via Port 8080 to the HomeAssistant Host.

Great idea! I tried to expose port 80, but that does not work well. Exposing port 443 and using HTTPS works. Investigating further.

jens-maus commented 4 months ago

FYI: It seems the ha-proxy.js for managing the ingress routing seems to have run into some dependency issue in the latest release. See

Bildschirmfoto 2024-04-20 um 18 11 45

So please see how fast I can get that fixed :)

jens-maus commented 4 months ago

Ok, I think I identified the root-cause already: It seems the http-proxy-middleware nodejs project just released a new v3 version of their framework 3 weeks ago (https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.0) which comes with some breaking changes which unfortunately found its way into the current RaspberryMatic release unnoticed.

dzedler commented 4 months ago

Then please try to access the WebUI by setting port 80 to e.g. 8080 in the addon config and see if you can directly access the RaspberryMatic WebUI via Port 8080 to the HomeAssistant Host.

Great idea! I tried to expose port 80, but that does not work well. Exposing port 443 and using HTTPS works. Investigating further.

I had a HTTP to HTTPS redirect configured in RasperryMatic. I disabled it and rebooted the addon. Now it works with HTTP as well. Just in case anyone has the same issue.

Settings - Control Panel - Security

image

Einstellungen - Systemsteuerung - Sicherheit

image
jens-maus commented 4 months ago

FYI: This issue should be resolved now. So anyone that were or is affected, please reinstall the 3.75.7.20240420 version of the Addon (by repulling the image or installing an older backup and then updating again).

And if you can, please report back if the issue is now really solved for you after you have 3.75.7.20240420 installed again.

Traseus commented 4 months ago

The new update worked for me! Thank you for that quick fix!

tolife86 commented 4 months ago

Great! Yes, now it's working. Thank you so much Jens for this incredible fast support and fix!

aseeus commented 4 months ago

Works for me as well. Thank you very much for this great work in such short time.

MaxKau commented 4 months ago

Hi Jens, Raspberrymatic now works for me after I had an initial installation with the error described. Thank you very much for the quick help!

Fiiti commented 4 months ago

Für alle die, die sich hier genauso schwer tun zu verstehen, was genau gemacht werden muss, hier die Beschreibung zu einem Workaround:

Gehe in Home Assistant auf Einstellungen -> Add-Ons -> klicke auf das »RaspberryMatic« -Icon. Oben im Menu auf »Konfiguration« klicken.

Hier sieht man nun vermutlich wenig. Klicke auf »Deaktivierte Ports anzeigen«. Es wird nun eine lange Liste angezeigt. Scrolle runter CCU WebUI HTTP (extern) 80/tcp. Hier trägt man einfach eine 8080 ein, scrolle ganz nach unten und "Speichere".

Jetzt am besten einfach mal das gesamte System komplett durchstarten - also nicht nur Home Assistant, sondern auch mindestens auch Raspberrymatic. Oder einfach alles.

Nun wird immer noch nicht der Button "RaspberryMatic" funktionieren! Aber Ihr könnt nun direkt auf die CCU zugreifen:

Wenn die IP-Adresse eures Home Assistant 192.168.178.200 ist, dann ruft ihr einfach im Browser http://192.168.178.200:8080 auf. Und das sollte nun einfach klappen.


Ja, hier soll in englisch geschrieben werden. Fällt mir schwer und die meisten Homematic-User sind wohl in D angesiedelt. Dennoch nun folgend eine engl. Übersetzung mit DeepL:

For all those who find it just as difficult to understand what exactly needs to be done, here is the description of a workaround:

In Home Assistant, go to Settings -> Add-Ons -> click on the "RaspberryMatic" icon. Click on "Configuration" at the top of the menu.

You will probably see little here. Click on "Show disabled ports". A long list is now displayed. Scroll down CCU WebUI HTTP (external) 80/tcp. Simply enter 8080 here, scroll all the way down and "Save".

Now it is best to start the entire system completely - not only Home Assistant, but also at least Raspberrymatic. Or simply everything.

The "RaspberryMatic" button will still not work! But you can now access the CCU directly:

If the IP address of your Home Assistant is 192.168.178.200, then simply call http://192.168.178.200:8080 in the browser. And that should now simply work.

jens-maus commented 4 months ago

@Fiiti Dieser Workaround mit Port 8080 ist doch seit gestern Abend nicht mehr notwendig da ich das Problem beseitigt und die neue Version erneut hochgeladen habe. Also einfach das Addon erneut frisch installieren lassen und schon sollte die 3.75.7.20240420 mit dem Fix installiert werden und dann geht die WebUI innerhalb von HA auch wieder.

Fiiti commented 4 months ago

:( Wie man es macht, ... ..., das hatte ich nicht verstanden.

Aber wie kann man das neu re-installieren? Bei HACS gibt es eine einfache Möglichkeit.

Bei den Add-Ons nur "deinstallieren" und neu installieren. Muss ich dann alles zurück backuppen aus Rasperrymatic?

dzedler commented 4 months ago

FYI: This issue should be resolved now. So anyone that were or is affected, please reinstall the 3.75.7.20240420 version of the Addon (by repulling the image or installing an older backup and then updating again).

And if you can, please report back if the issue is now really solved for you after you have 3.75.7.20240420 installed again.

For some reason restoring the backup does not work for me. How can I repull the image?

Diesterwegstr commented 4 months ago

Hallo, nach diversen Versuchen(backup+update neu einspielen, geht das Add-on nach wie vor nicht. Back-up vom 18.04.24 und Update neu vom 21.04.2024 Über die IP-Adresse sowie Port 8080 kann man auf die CCU zugreifen. Das Add-on startet in Home Assistant nicht mehr.

emkaaay commented 4 months ago

:( Wie man es macht, ... ..., das hatte ich nicht verstanden.

Aber wie kann man das neu re-installieren? Bei HACS gibt es eine einfache Möglichkeit.

Bei den Add-Ons nur "deinstallieren" und neu installieren. Muss ich dann alles zurück backuppen aus Rasperrymatic?

hi, geh in HA auf backups und stelle das letzte release von rapsberry her.... hab ich eben auch gemacht, kam zwar ne fehlermeldung, aber hat scheinbar funktioniert... danach war unter add ons wieder "update" verfügbar, dann aktuelle version wieder installiert und oberfläche öffnet sich auch wieder in HA

dzedler commented 4 months ago

:( Wie man es macht, ... ..., das hatte ich nicht verstanden. Aber wie kann man das neu re-installieren? Bei HACS gibt es eine einfache Möglichkeit. Bei den Add-Ons nur "deinstallieren" und neu installieren. Muss ich dann alles zurück backuppen aus Rasperrymatic?

hi, geh in HA auf backups und stelle das letzte release von rapsberry her.... hab ich eben auch gemacht, kam zwar ne fehlermeldung, aber hat scheinbar funktioniert... danach war unter add ons wieder "update" verfügbar, dann aktuelle version wieder installiert und oberfläche öffnet sich auch wieder in HA

Das ist schön für dich, aber genau das hat bei mir auch nicht funktioniert.

deGrasi commented 4 months ago

:( Wie man es macht, ... ..., das hatte ich nicht verstanden. Aber wie kann man das neu re-installieren? Bei HACS gibt es eine einfache Möglichkeit. Bei den Add-Ons nur "deinstallieren" und neu installieren. Muss ich dann alles zurück backuppen aus Rasperrymatic?

hi, geh in HA auf backups und stelle das letzte release von rapsberry her.... hab ich eben auch gemacht, kam zwar ne fehlermeldung, aber hat scheinbar funktioniert... danach war unter add ons wieder "update" verfügbar, dann aktuelle version wieder installiert und oberfläche öffnet sich auch wieder in HA

Vielen lieben Dank, dass hat bei mir funktioniert. Ich kann nun wieder auf RaspberyMatic zugreifen und mich mit dem Admin einloggen!

Wolfgang-Gi commented 4 months ago

I don't like to install the backup. Please describe howto re-pull the addon. Why didn't you increment a sub/minor release number?

deGrasi commented 4 months ago

@Wolfgang-Gi You must restore the previous state in order to be able to install the update again

bm-magic commented 4 months ago

@jens-maus, vielen Dank...ich hatte das Problem seit einige Wochen auch. Habe (in meiner "jugendlichen Leichtsinn"), habe ~80 Jahre auf dem Buckel ;-) , gehofft, das es "irgend einmal" von alleine verschwindet. Es war nicht so tragisch...die Geräte haben funktioniert, nur das Add-on (aus der HA Oberfläche) nicht. Über :8088 war es erreichbar ;-))

fastbag commented 3 months ago

Also bei mir hat das nicht geklappt, mit dem Recovery und neu installieren, immer noch das gleiche nicht erreichbar.

Ahh jetzt erst nach einen kompletten richtigen Neustart des HomeAssistant