Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad gateway 502 #684

Closed
McFcologne opened this issue Jan 30, 2024 · 15 comments
Closed

bad gateway 502 #684

McFcologne opened this issue Jan 30, 2024 · 15 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@McFcologne
Copy link

Problem/Motivation

It is not running. It only throws bad gateway 502

Expected behavior

expected the plugin to work

Actual behavior

see above

Steps to reproduce

install it, run it

Proposed changes

i have no idea

@frenck
Copy link
Member

frenck commented Jan 30, 2024

Anything in the logs?

../Frenck

@pebie
Copy link

pebie commented Feb 4, 2024

Same issue,
@frenck i've got no log

@frenck
Copy link
Member

frenck commented Feb 4, 2024

@pebie if there are no logs, you haven't started it or something else is wrong. If the add-on did even an mild attempt to start, it would have had logs.

So, if you really have no logs, your issue isn't add-on related.

../Frenck

@Dan-Ross
Copy link

Dan-Ross commented Feb 4, 2024

Had this issue as well on a fresh install of HAOS and this add on

The Logs tab of the Add-on config say this on a boot. Try setting these and seeing if the issue resolves.

[10:59:43] FATAL:
[10:59:43] FATAL: Configuration of this add-on is incomplete.
[10:59:43] FATAL:
[10:59:43] FATAL: Please be sure to set at least an SSH password
[10:59:43] FATAL: or at least one authorized key!
[10:59:43] FATAL:
[10:59:43] FATAL: You can configure this using the "ssh.password"
[10:59:43] FATAL: or the "ssh.authorized_keys" option in the
[10:59:43] FATAL: add-on configuration.

@McFcologne @pebie

@frenck
Copy link
Member

frenck commented Feb 4, 2024

That exactly states what to do. Also, if you run into this, it also means you didn't read the install instructions of the add-on 🤷

@Dan-Ross
Copy link

Dan-Ross commented Feb 5, 2024

100%, but being brand new to HAOS, I didn't know where to find the logs initially. Following the steps in the config fixed the issue. I shared the above to try to help other users who may not have knowledge or experience on how to view logs or configs like I did.

@frenck
Copy link
Member

frenck commented Feb 5, 2024

You wouldn't need logs if you read the installation instructions? Above all, those same install instructions point to the logs as well...

@Dan-Ross
Copy link

Dan-Ross commented Feb 5, 2024

Hey man, was just trying to help out some users who were struggling with the install like I did and give some guidance that might help them (and maybe future users) solve the issue.

Us users are imperfect creatures and won't get it right 100% of the time. Considering there are several reports(1, 2, 3, 4,) in a relatively short time frame for this issue, perhaps it might be worth copying the snippet of the initial setup docs for that startup config to the Readme that everyone hits when finding the addon instead of it only existing in a link that is easy to miss? Apparently, lots of us as missing it and you must be tired of asking "Anything in the logs?" by now.

If you're into that idea, I can figure out how to make a PR to edit the readme to help out future users.

@frenck
Copy link
Member

frenck commented Feb 5, 2024

Us users are imperfect creatures and won't get it right 100% of the time

I can't help if they don't read 🤷

erhaps it might be worth copying the snippet of the initial setup docs for that startup config to the Readme that everyone hits when finding the addon instead of it only existing in a link that is easy to miss?

It is listed directly inside Home Assistant. The main page links to the documentation directly as well.

Even if they have issues, that can happen, sure. They A) don't take a moment to read or find documentation, instead, they B) create an issue (without looking at past issues).

Lucky I've also added logs to also provide information on what went wrong (C)... which many don't see either...

Like... 🤷

I'm not planning on doing more than this. If all of the above doesn't help someone, than IMHO, this is maybe not for them. They don't have to use this.

Apparently, lots of us as missing it and you must be tired of asking "Anything in the logs?" by now.

No, not really to be honest, happy to help.

If you're into that idea, I can figure out how to make a PR to edit the readme to help out future users.

There is nothing to add? See above.

../Frenck

@geerlingguy
Copy link

(Just wanted to drop a note that I didn't realize I had to do any extra configuration with the addon either — maybe having a 'Quick Start Guide' that appears in the readme / docs section that appears directly within the HA Addons UI would be helpful, basically say "Install this Add-on" then step two "Click the Configuration tab and add a password or authorized key".)

@kupietools
Copy link

kupietools commented Feb 17, 2024

Developer: thank you for creating and sharing this much-needed tool, but, respectfully, you're displaying a really terrible attitude here. The documentation, configuration tab, and logs tab are all much harder for a newbie to find than you seem to believe they are, they're very easily overlooked by someone unfamiliar with community add-ins or who rarely does back-end work on their HA instance, and, when we do find the documentation (which can be found here in this repo without even realizing there's links at the top of the page in HA, making it totally confusing as to what it's talking about with "logs" and "configuration" and "tabs"), it is extremely vague. Much clearer information is needed. I'm a software engineer and web developer and even I had a lot of trouble working out from the documentation and this issue thread what I had to do to get this working. A few sentences of clear explanation (sometimes known the biz as "good documentation") would be much more helpful than the above thread responses.

On the up side: Once I had the below all worked out, saw the logs, and started playing with the other options (like enabling SFTP), yes, the logs are extremely helpful & clear for solving further issues—thanks!

For others like myself here with this problem, here is the "quickstart" documentation this package is missing:

1.) After install, the tabs for the documentation, configuration, and logs are at the top of the page:

image

2.) fill in a username and password in the Configuration tab.

Note: The Documentation tab (also available in this repo at https://github.com/hassio-addons/addon-ssh/blob/main/ssh/DOCS.md) gives more info about options you can use here. To be extra-secure you really should set up keys, which you can find info about in the Documentation, but this is a quickstart, so to get this mother love bone rolling we'll just pick a username and password.

image

3.) After entering a username and password, be sure to scroll to the bottom of that Options block and click 'save'.

Note: Be careful! There are several "save" buttons on that tab, one for each block. If you click the wrong 'save' button, it won't tell you there's a problem, but it won't save your chosen username & password! If you have problems later in this process, come back to this step and make sure you saved your username and password correctly.

image

4.) Go back to the Info tab, then click 'Start'.

image

5.) Some CPU & RAM meters and a link for "Open Web UI" will appear. Click "Open Web UI".

image
6.) Ta-daa! You're in. Or, at least, I was, by following those steps. YMMV.

image

You can now SSH in from a normal SSH client, using the name and password you set up in step 2.

image

In case anything happens to this issue thread, I have these instructions permanently archived on my website at https://www.kupietz.com/2024/02/17/the-missing-quickstart-guide-to-the-home-assistant-advanced-ssh-web-terminal-community-add-on/.

@xwl
Copy link

xwl commented Feb 23, 2024

Big thanks for the hint of clicking the correct Save button, I used the one at the bottom wrongly multiple times, wondering why it was not saved..

@kupietools
Copy link

kupietools commented Feb 23, 2024

I used the one at the bottom wrongly multiple times,

Glad that tip helped someone—I made sure to mention it because I got tripped up by that a few times myself before I caught it.

@bradkemper
Copy link

@kupietools Thank you so much. That was a big help.

Copy link

github-actions bot commented Apr 9, 2024

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Apr 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

8 participants