Accidentally hard power cycled my Rpi, now I keep getting "failed to perform ssl handshake" error

I was messing around with some cords under my desk yesterday and accidentally unplugged my raspberry pi that runs home assistant.

After that I started getting an error saying “failed to perform ssl handshake” everytime I try to open the app or access my instance from any browser. I power cycled it again and it loaded up fine but about 10 minutes later the app suddenly lost connection and I got the same error again.

It seems to consistently work for about 5-10 minutes every time I reboot the pi and then the same error comes back. Doesn’t matter what device I use, I still get the same error on my PC.

I’ve seen other threads about this error but they all seem to be related to duck DNS and I use Nabu Casa.

Any ideas what could’ve caused this? Could it be related to the fact that I hard power cycled it? At the very least does anyone know what that error even means?

1 Like

I’d start by checking what the time is on the Pi when it starts saying it’s failed to perform the SSL handshake. That’s usually what causes SSL to fail, if for example the time is suddenly an hour out.

Hello I am facing the same issue and I’m currently troubleshooting. Do you access your HA instance via localhost ip or nabu casa when you’re in your LAN?

I checked the time on mine and it’s correct. Does the time temporarily go out of sync causing the issue and later fix itself?

Problem is that I don’t know when the error starts until I try opening the app which may have been hours later.

I have this as well every now and then. My companion app can’t connect anymore with the given error, but I can still browse to the local instance (which also has a let’s encrypt SSL certificate and which just works fine). When I disconnect and reconnect Nabu Casa, it’s immediately resolved.

Can you check whether that’s the case with your setup as well?

In my case I don’t have a LetsEnrypt certificate. But why do you need one if you’re accessing on localhost address and using HTTP?

You don’t need it indeed, I just like to use https as well for local access. It’s likely unrelated to the issue, but I wanted to add it since it shows that there’s nothing wrong with the time etc.

1 Like

Thanks. I think the Let’s Encrypt addon will be my next troubleshooting step when this problem reoccurs.

OP you may want to consider the same even though you’re using Nabu Casa. I also have Nabu Casa by the way.

Edit: I said Duck DNS add on in an earlier version of this post when I meant to say Let’s Encrypt

Just for whoever may stumble across this later, I never found a solution but my issue resolved itself. After waiting a little while (less than an hour) it worked fine.