Better logging

Easy to criticize folks who mostly do this in their spare time.

Maybe put your hand up to fix?

2 Likes

To be fair many SD card setups run out of disk space and I can understand to an extent why they don’t save too much by default.

But take the kodi approach and save the current log AND the one before. Or automate it (theres an idea!) Then at least you get to copy the older one off to pastebin or another computer.

SSH is not just available as a web service. I regularly ssh in from my linux box. Use the ssh and web terminal addon.

Yes, but it is not just criticism. It is constructive feedback of what to do instead to improve the product so that it becomes significantly better. It does not matter if they do it on their free time. I also do development on my free time and I always appreciate constructive feedback. It this case; a very obvious and low hanging fruit that makes the developers look really bad and ignorant if they don’t implement ASAP as many users obviously experience random crashes with no information.

Maybe if home assistant was not written in a language I am unfamiliar with. For someone that knows the language and product, it should not take more than 10 minutes to fix. To me it would take weeks just to find where to do the change.

Plugins tend to not work when HA crashes. I want a native SSH server that starts and live independently from HA. If HA spawned it, it will most likely die with it. I will have a look next crash.

That is why I do a supervised install on debian :slight_smile:

I think the home assistant os should have this option natively (natively running an ssh server outside of the actual home assistant app), so that you don’t need to be a hacker. Or at least don’t clear the logs upon restart so that we less-hacky people can give them their logs when doing error reports.

No it doesn’t. It carries on working. Also, not a plugin, an addon. I assume you have taken the advice to install the ssh & web terminal addon.

What are you talking about? I thought it was the ssh server you say died. Do you understand the difference between a server and a client?

I didn’t flag this post to moderators, but please mind your anger.

+1 for syslog support!

You must understand what I meant. Plugin or addon, server or client.

You have no idea if it carried on working or not as you did not inspect my instance when the HA service crashed.

Steps:

  1. Use your pc/mac to connect to home assistant running on a raspberry pi 4 on port 22 (using a client to connect to the server!).
  2. Works as expected.
  3. Wait a few days
  4. HA dies
  5. The whatever-you-call-it does not longer accept incoming requests on port 22 as it died with HA
  6. Restart by power-toggling the board physically
  7. No logs, as HA clear them upon reboot.
  8. Repeat.

I was asking for a real SSH server that is native to the OS and does not die with the main HA process.

… or make HA not clear the logs upon reboot so that I don’t have to do the SSH-thing when it crashes.

The ssh server addon does not die when the core docker container stops. I tried it before my last post.

Your setup does not appear to be the same as mine, or you stopping the core docker container is not the same thing as the crash I experience. Perhaps it is not the core docker container, perhaps it is the entire OS, or something else which is not equivalent to stopping the core docker container in a controlled manner (or is your home assistant crashing too?)

I don’t know what happens, as I am unable to investigate.

The SSH addon I use is:

This is how my Supervisor > System tab looks like:

All of this is running on a Raspberry Pi 4, and based on the above screenshot; neither CPU, RAM, or “disk” = memory card space is anywhere near any limits.

When running the top command in the terminal it is usually around 95% idle; and it is in a fan-cooled enclosure and the CPU temperature never exceeds 36*C; so no thermal throttling / emergency shutdowns to protect the hardware either. Besides; LED’s are not indicating any error on the pi board when the system crashes.

Possibly your SD card?

Well it works for a couple of days after reboot; including reading/writing from/to the SD card. So if it is the SD card it is at least mostly working. But that I guess goes for most of the hardware. If the memory or cpu or anything else is having hardware issues, it yet seems to be mostly working.

Are there any particular indications pointing towards the SD card? Is there a good way to test it command line from within the Home Assistant OS (e.g. by using ssh to connect to the board and run som fancy cd / && super-disk-checker --verify=true that comes from the OS out of the box or do I need to install something extra that can test/verify/rule out any issues with the SD card in a reliable way?

Do not worry, i flagged that post.

Some people live happy and clueless, others change the world.

I myself welcome any feedback on all the projects that I publish. If I would have been a developer of Home Assistant, I would really appreciate angry users with ideas of how to improve it. Definitely not trying to hide it; but encourage people to tell me how bad it is so that I can fix it.

But of course, there will always be some people more interested in complaining about other people and what words they use rather than the actual message they are trying to convey. Those tend to become lawyers, not developers.

1 Like

You really didn’t have to do that. @erik3 has some points, he just has a shitty way of expressing them. Some of what he says is demonstrably wrong, but none of that is a reason to report his post.

@erik3 I suggest you run fsck on your SD card. As an experienced IT person I expect you will know how, or at least have the ability to find out. In the meantime please butt out or my FR thread, both of you.

there is no need to use bad language to change the world, there are better ways to give feedback. There is one main point here, this is not about users and developers, we are all at the same boat, many of developers are also users of this platform. We are not giving service and getting paid by this, we are developing what is needed, using it ourselves and collecting feedback to improve. there are major issues on overall this post and how are all these things are constructive, they are destructive and nothing helpful, some examples below

  • using of bad words as
  • talking in insulting way

take a look at rules and follow them, no need for any exception: Code of Conduct - Home Assistant

1 Like

And right afterwards:

Lawyer indeed, pointing at paragraphs. Touché :rofl:

Sorry @nickrout will not use this thread to complain about logging anymore. I will still let it have my upvote; though.

Touche, do you really think that this is a fight or discussion? Just give your constructive feedback in a respectful way, that is it. Keep the rest for yourself as they don’t add value here. On the other hand, why do you think i may feel insulted when you call me a lawyer. I would be more than glad to be lawyer.

FWIW, I still see this problem as well RPI 4 w SSD. Things will run fine for a year or so then this starts happening with no apparent reason logged or whatever. And I can totally understand the OP’s frustration, particularly with the “must be the SD” comments :wink:

How exactly can one find out and cure the problem? For me it seems to be the hours-long agony of re-burning a fresh HA and loading the last backup and trying to get the backup add-on connected to Google again. If there is a way to diagnose the cause and solve it that would be wonderful. As an aside I work in software and getting logs from customers is a key way that we use to diagnose problems, discarding that on restart seems like blowing both feet off.