# Container failing randomly without useful logs

**URL:** https://discourse.nodered.org/t/container-failing-randomly-without-useful-logs/94081
**Category:** General
**Tags:** docker, home-assistant
**Created:** [21 December 2024 14:23 UTC](https://discourse.nodered.org/t/container-failing-randomly-without-useful-logs/94081 "2024-12-21T14:23:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![martinjuhasz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martinjuhasz/32/97440_2.png) [@martinjuhasz](https://discourse.nodered.org/u/martinjuhasz)
#### Post date: [21 December 2024 14:23 UTC](https://discourse.nodered.org/t/container-failing-randomly-without-useful-logs/94081/1 "2024-12-21T14:23:50Z")

</div>

Hi all,

i'm wondering if somebody has an idea how i could debug this.  
my NodeRED container began stopping randomly every 2-3 days or so since two weeks (i didnt change anything).  
The only log messages i get are these regarding a failed websocket connection:  
[https://dpaste.org/A8zWK](https://dpaste.org/A8zWK)

If this is a websocket connection that fails from a flow i guess it should not break my docker instance.  
Anybody got an idea what i can do to nail this problem down? I'm a bit lost here.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [21 December 2024 14:44 UTC](https://discourse.nodered.org/t/container-failing-randomly-without-useful-logs/94081/2 "2024-12-21T14:44:16Z")

</div>

Welcome to the forums @martinjuhasz

The error is:  
A node that is using a websocket/HTTP connection, is not handling unexpected errors

```auto
Unhandled rejection RequestError: Error: socket hang up

```

```auto
Unhandled rejection RequestError: Error: read ECONNRESET

```

```auto
20 Dec 15:56:39 - [red] Uncaught Exception:
20 Dec 15:56:39 - [error] Error: Opening handshake has timed out

```

Node RED Nodes should handle errors correctly - to stop the runtime from being terminated.  
it looks as if a Node you are using, is not handling errors correctly - Which is Bad!

If you are using the internal HA Nodes (which you seem to be)

```auto
16 Dec 04:13:34 - [info] [server:HA - Winston] Connecting to http://home-assistant:8123
16 Dec 04:13:39 - [info] [server:HA - Winston] Connecting to http://home-assistant:8123
16 Dec 04:13:44 - [info] [server:HA - Winston] Connecting to http://home-assistant:8123
16 Dec 04:13:44 - [info] [server:HA - Winston] Connected to http://home-assistant:8123

```

I would ask the HA community, as it maybe some internal HA Node, or another 3rd party node you have installed, and not handling errors correctly.

Many here do not use HA, so won't know much about the internals, if you suspect a 3rd party Node - an issue will need to be raised with the author

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 March 2025 14:45 UTC](https://discourse.nodered.org/t/container-failing-randomly-without-useful-logs/94081/3 "2025-03-21T14:45:07Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
