Error adding ESP8266 in Home Assistant: Socket Operation Failed: Connection_Closed errno=11

Do you mind telling how did you sorted out the problem? I’m having the same issue I guess…

3 Likes

same here :frowning:

So there are at least 2 problems described in this thread. Please be specific.

Same here :frowning:

Same, esphome fresh install on 3 different esp8266, My DNS is managed by adguard but deactivate it for debug.

nice way to ask the community for help and then ghost without posting your solution.

5 Likes

I just had this same problem on one of my ESP8266 devices. Deleting it in Settings->Devices and Services->ESPHome fixed it. After deleting it, 2 min later it was auto-discovered. After adding it via auto-discovery, everything worked again.

2 Likes

Hello everyone. Had the same log message hare, even if everything was working fine.

Removed the device, re-added and the warning message disappeared.

Edit: message still shown. Everything working but every 60 second i have that warning:

Socket operation failed: HANDSHAKESTATE_READ_FAILED errno=11

Thanks this worked for me.

I have the same message… have you figured how to fix it & does it effect anything ?

Too you can check that the fixed IP you use, it is reverved on your DHCP server, for your ESP.

I also had this problem. I solved it by hooking up the Bluetooth proxy device to my computer and re-flashing it there. I think the issue originated when trying to remote-update the device. Sometimes upgrades work correctly through ESPHome; sometimes they work correctly through the Home Assistant Updates panel. This time, the upgrades failed through both and I resorted to physical updates.

Yep, I have the same for one device and cannot figure out how to get over it. Any luck?

Socket operation failed: HANDSHAKESTATE_READ_FAILED errno=11

I’m totally blocked with this. I tried to remove the device and install it all over again with different name. Started with the default configuration that ESPHome gives for a new device(with wifi) and I still get the same error:

[09:52:32][C][api:138]: API Server:
[09:52:32][C][api:139]:   Address: kaukolampo-lukija.local:6053
[09:52:32][C][api:141]:   Using noise encryption: YES
[09:53:02][D][api:102]: Accepted 192.168.1.27
[09:53:02][W][api.connection:071]: 192.168.1.27: Socket operation failed: HANDSHAKESTATE_READ_FAILED errno=11

Because the device is not available in HA, I assume the error comes from the connection to API server.

I don’t have any more ideas what to try. Any help would be highly appreciated!

Ok, finally got it working. I had to remove the old device (even with different name) from the Home Assistant’s integrations view. After that, adding a new device in ESPHome triggered normal configuration request (asking the API key) in HA. So, there seems to be some kind of book keeping for the device itself and adding the same device with different name is not enough. It is not either enough to remove the old device in ESPhome but it needs to be removed from HA, too.

3 Likes

This is driving me NUTS!
My board is wireless-tag and want to run it on ethernet.
Flashed about 20x, deleting addon / removing board / set toWiFi, set to ETH, everytime this message in the log every 60 seconds.

Turned on the extra verbose:
[22:06:15][VV][api.socket:358]: [ip] noise_handshakestate_read_message failed: MAC_FAILURE
[22:06:15][W][api.connection:075]: [ip]: Socket operation failed: HANDSHAKESTATE_READ_FAILED errno=11

So I thought the wifi has diffrent mac than eth. That was when i commented out the network settings in the yaml, but still… errrno=11

Isn’t it possible with this board? Do I really need olimex???

Any help is appreciated!!!

Ok, that was fun …

I had the esp32 device configured on 2 diffrent RPI / HA installations.
The socket operation failed message was from the ‘wrong’ HA still trying to connect.
When I removed the device, the message stopped …
All working nicely now…

i fixed this issue because in home assistant devices and services there was ‘reconfigure’ button on the ESP device, needed to enter the encryption key and the error went away

3 Likes

Fixed it for me.

In my case it was the blackbox exporter with the TCP probes. :person_shrugging: