hassio-addons / addon-ssh

Advanced SSH & Web Terminal - Home Assistant Community Add-ons
https://addons.community
MIT License
356 stars 96 forks source link

Black screen, press enter to reconnect, not working #455

Closed jagjordi closed 1 year ago

jagjordi commented 2 years ago

Problem/Motivation

When I open the web UI it shows a black screen. If I press any key it says ¨Press enter to reconnect". If I press enter it says "Reconnecting" but after a second it says "Press enter to reconnect again" image

Expected behavior

A prompt appears.

Actual behavior

Black screen

Steps to reproduce

Install and try to open web UI

Logs

[2022/11/01 11:36:22:1968] N:  ++ [wsisrv|c|adopted] (1)
[2022/11/01 11:36:22:2004] N: HTTP / - 172.30.32.2
[2022/11/01 11:36:22:3660] N: HTTP /token - 172.30.32.2
[2022/11/01 11:36:22:7201] E: lws_process_ws_upgrade: malformed or absent conn hdr
[2022/11/01 11:36:22:7203] N: lws_libuv_closewsi: [wsisrv|c|adopted]
[2022/11/01 11:36:22:7203] N: lws_libuv_closewsi: thr 0: [wsisrv|c|adopted] sa left 2: dyn left: 3 (rk 0)
[2022/11/01 11:36:22:7203] N:  -- [wsisrv|c|adopted] (0) 523.511ms
[2022/11/01 11:36:27:8128] N:  ++ [wsisrv|d|adopted] (1)
[2022/11/01 11:36:27:8143] N: HTTP /token - 172.30.32.2
[2022/11/01 11:36:27:8776] E: lws_process_ws_upgrade: malformed or absent conn hdr
[2022/11/01 11:36:27:8778] N: lws_libuv_closewsi: [wsisrv|d|adopted]
[2022/11/01 11:36:27:8778] N: lws_libuv_closewsi: thr 0: [wsisrv|d|adopted] sa left 2: dyn left: 3 (rk 0)
[2022/11/01 11:36:27:8778] N:  -- [wsisrv|d|adopted] (0) 65.027ms
[2022/11/01 11:36:42:4842] N:  ++ [wsisrv|e|adopted] (1)
[2022/11/01 11:36:42:4853] N: HTTP /token - 172.30.32.2
[2022/11/01 11:36:42:5210] E: lws_process_ws_upgrade: malformed or absent conn hdr
[2022/11/01 11:36:42:5212] N: lws_libuv_closewsi: [wsisrv|e|adopted]
[2022/11/01 11:36:42:5212] N: lws_libuv_closewsi: thr 0: [wsisrv|e|adopted] sa left 2: dyn left: 3 (rk 0)
[2022/11/01 11:36:42:5213] N:  -- [wsisrv|e|adopted] (0) 37.049ms
[2022/11/01 11:36:42:5766] N:  ++ [wsisrv|f|adopted] (1)
[2022/11/01 11:36:42:5775] N: HTTP /token - 172.30.32.2
[2022/11/01 11:36:42:8437] E: lws_process_ws_upgrade: malformed or absent conn hdr
[2022/11/01 11:36:42:8439] N: lws_libuv_closewsi: [wsisrv|f|adopted]
[2022/11/01 11:36:42:8439] N: lws_libuv_closewsi: thr 0: [wsisrv|f|adopted] sa left 2: dyn left: 3 (rk 0)
[2022/11/01 11:36:42:8440] N:  -- [wsisrv|f|adopted] (0) 267.390ms
bsjouke commented 2 years ago

Experiencing the same. For me, SSH access with winscp and Putty works like a charm, just (as above) the web terminal won't connect.

jagjordi commented 2 years ago

For me it turned out to be a problem with the reverse proxy. I used to have both SSL config in home assistant and in NGINX Proxy Manager and it eventually stopped working. Now I have removed the SSL certs from HA and use only those in NPM and it works again. I also experienced problems with other addons such as Zigbee2MQTT. I think it is something related with ingress.

bsjouke commented 2 years ago

For me it turned out to be a problem with the reverse proxy. I used to have both SSL config in home assistant and in NGINX Proxy Manager and it eventually stopped working. Now I have removed the SSL certs from HA and use only those in NPM and it works again. I also experienced problems with other addons such as Zigbee2MQTT. I think it is something related with ingress.

This indeed showed the right way, thanks! I did not have Nginx reverse proxy installed at all, and all functions BUT the terminal and ESPHome worked like a charm. I just put the Nginx RP in between, and this seemed to resolve the issue. Terminal is working and ESPHome compiles again. What you mention about removing the ssl certs may be the same as mentioned in the documentation, which instructs you to remove all sll statements from configuration.yaml

jagjordi commented 2 years ago

Glad it helped :) Btw, where in the documentation is it mentioned that you need to remove the SSL statements?

Best regards,

Jordi Altayó


From: bsjouke @.> Sent: Wednesday, November 9, 2022 5:26:33 PM To: hassio-addons/addon-ssh @.> Cc: Jordi Altayó @.>; Author @.> Subject: Re: [hassio-addons/addon-ssh] Black screen, press enter to reconnect, not working (Issue #455)

For me it turned out to be a problem with the reverse proxy. I used to have both SSL config in home assistant and in NGINX Proxy Manager and it eventually stopped working. Now I have removed the SSL certs from HA and use only those in NPM and it works again. I also experienced problems with other addons such as Zigbee2MQTT. I think it is something related with ingress.

This indeed showed the right way, thanks! I did not have Nginx reverse proxy installed at all, and all functions BUT the terminal and ESPHome worked like a charm. I just put the Nginx RP in between, and this seemed to resolve the issue. Terminal is working and ESPHome compiles again. What you mention about removing the ssl certs may be the same as mentioned in the documentation, which instructs you to remove all sll statements from configuration.yaml

— Reply to this email directly, view it on GitHubhttps://github.com/hassio-addons/addon-ssh/issues/455#issuecomment-1309017190, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADLIJK6HXNV3JD2KPLR2VJTWHPGDTANCNFSM6AAAAAART5X73Y. You are receiving this because you authored the thread.Message ID: @.***>

bsjouke commented 2 years ago

Hi Jordi,

Check out Settings->add ons->NGINX Home Assistant SSL proxy and then the documentation tab.

Although I can access HA directly now on my intranet, for external traffic it's still behind a separate apache reversed proxy. This distributes all my incoming external traffic to multiple servers. Terminal is still not working for that scenario, but that's outside HA.

Best regards, Boudewijn

jagjordi commented 2 years ago

Ah, I don't use NGINX addon. I run it as a docker container on my server since I run HA as a virtual machine. But it seems that same settings work also for my case!


From: bsjouke @.***> Sent: Wednesday, November 9, 2022 8:39:13 PM To: hassio-addons/addon-ssh Cc: Jordi Altayo Gonzalez; Author Subject: Re: [hassio-addons/addon-ssh] Black screen, press enter to reconnect, not working (Issue #455)

Hi Jordi,

Check out Settings->add ons->NGINX Home Assistant SSL proxy and then the documentation tab.

Although I can access HA directly now on my intranet, for external traffic it's still behind a separate apache reversed proxy. This distributes all my incoming external traffic to multiple servers. Terminal is still not working for that scenario, but that's outside HA.

Best regards, Boudewijn

— Reply to this email directly, view it on GitHubhttps://github.com/hassio-addons/addon-ssh/issues/455#issuecomment-1309265582, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADLIJK33BB3RYA2JH25EMM3WHP4WDANCNFSM6AAAAAART5X73Y. You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 1 year 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!

frenck commented 1 year ago

Closing this issue, as it seems it has been resolved using a workaround above. 👍