Zeroconf error

Thanks a lot, I have had this error for very long, but this finally helped.

This did not solved my issue, but perhaps it is a different issue. Every now and then i get this in my Notifications:

Invalid config
The following integrations and platforms could not be set up:

zeroconf
discovery
ios
default_config
Please check your config and logs.

A detail of the log:

Logger: homeassistant.setup
Source: components/zeroconf/__init__.py:90
First occurred: 5:25:14 PM (2 occurrences)
Last logged: 5:25:17 PM

Error during setup of component zeroconf
Error during setup of component discovery
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/zeroconf/__init__.py", line 142, in async_setup
    zeroconf = hass.data[DOMAIN] = await _async_get_instance(hass, **zc_args)
  File "/usr/src/homeassistant/homeassistant/components/zeroconf/__init__.py", line 90, in _async_get_instance
    zeroconf = await hass.async_add_executor_job(partial(HaZeroconf, **zcargs))
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 2394, in __init__
    self._listen_socket, self._respond_sockets = create_sockets(
  File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 2319, in create_sockets
    respond_socket = add_multicast_member(cast(socket.socket, listen_socket), i, apple_p2p=apple_p2p)
  File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 2264, in add_multicast_member
    listen_socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, _value)
OSError: [Errno 105] No buffer space available

One of the consequences is that ShellyForHass is no longer working…
I tried to create a very minimal configuration.yaml, but that did no help.
Anyone has an idea about this issue?

Have you tried the other fix from post4?

zeroconf:
  default_interface: true

[/quote]

Yes, I have. As a matter of fact that config is active now, but sadly did not sole the issue.

This ia my configuration.yaml:

homeassistant:
  name: !secret my_name
  latitude: !secret my_latitude
  longitude: !secret my_longitude
  elevation: 5
  unit_system: metric
  time_zone: !secret time_zone
  external_url: !secret external_url
  internal_url: !secret internal_url
#
#
#  auth_providers:
#    - type: homeassistant
#    - type: legacy_api_password
#      api_password: !secret http_password
#    - type: trusted_networks
#      trusted_networks:
#        - 192.168.178.0/24
#        - 172.30.0.0/16
#        - fd00::/8
#      trusted_users:    # aangepast op 20201115. Let op, bij een nieuwe Install opnieuw doen
#        192.168.178.155: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.228: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.51: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.56: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.57: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.82: be9fe0b22a8947878267f20413e3d7e4
#        192.168.178.0/24:
#          - be9fe0b22a8947878267f20413e3d7e4
#          - c483cc0e0e5847d7a1e6149b24409241
#        "fd00::/8":
#          - be9fe0b22a8947878267f20413e3d7e4
#          - c483cc0e0e5847d7a1e6149b24409241
#          - group: system-users
#  whitelist_external_dirs:
#    - /config/
#
default_config:
zeroconf:
  default_interface: true
updater:
frontend:
  themes: !include_dir_merge_named themes
discovery:
http: !include includes/http.yaml
lovelace:
  mode: storage
#
media_player:
  - platform: yamaha_musiccast
    host: 192.168.178.51
#
stream:
# Text to speech
tts:
  - platform: google_translate
    cache: false
    cache_dir: /config/tts
    time_memory: 60
    base_url: !secret external_url
    service_name: google_say
    language: nl
#
# Inputs
input_boolean: !include includes/input_booleans.yaml
input_datetime: !include includes/input_datetimes.yaml
input_select: !include includes/input_selects.yaml
input_number: !include includes/input_numbers.yaml
#
# Logging and history
logger: !include includes/logger.yaml
recorder: !include includes/recorder.yaml
#device_tracker: !include includes/device_trackers.yaml
#
# Managed via UI
scene: !include scenes.yaml

automation: !include automations.yaml
automation old: !include_dir_merge_list automations

###   script: !include scripts.yaml
script: !include scripts.yaml
###   scene: !include scenes.yaml
#
# Others
mqtt: !include includes/mqtt.yaml
person: !include includes/persons.yaml
###device_tracker: includes includes/device_trackers.yaml
###device_tracker: device_trackers.yaml
zone: !include includes/zones.yaml
group: !include includes/groups.yaml
cover: !include includes/covers.yaml
#switch: !include includes/switches.yaml
#sensor: !include includes/sensors.yaml
#binary_sensor: !include includes/binary_sensors.yaml
#weather: !include includes/weather.yaml
shell_command: !include includes/shell_commands.yaml
#notify: !include includes/notify.yaml
#light: !include includes/lights.yaml
deconz: !include includes/deconz.yaml
camera: !include includes/camera.yaml
spotify:
  client_id: !secret spotify_client_id
  client_secret: !secret spotify_client_secret
spotcast:
  sp_dc: !secret spotcast_dc
  sp_key: !secret spotcast_key
#
alarm_control_panel:
  - platform: manual
    name: ha_alarm
    code: !secret alarm_code_panel
# zet tijden op 30 sec.
    arming_time: 5
    delay_time: 6
    trigger_time: 5
#    
ios:
#

I’m not sure if you mean the same fix as I was referring to: increasing buffer size/multicast connection in /etc/sysctl.conf

Hi @ciB Sorry, no I did not get your hint about the buffer sizes. I thought it was about he zeroconf option.
But in the mean time, I have got the system again running without these Notifications. I do not know what was the cause. I removed lots of entries in my configuration.yaml and brought them back block-by-block and restarted every time. Finally i had the file completely back again and it is running without the notification issue… Very frustrating.

But i had a look at /etc/sysctl.conf and noticed that it has nothing configured yet.
I’l keep your solution in mind, might it happen again.

Thank you for trying to help me! Kind regards, Bert

zeroconf:
  default_interface: true

this fixed the issue for me but is now deprecated :confused:

1 Like

I think it’s the default now anyway and I’m pretty sure you can now config this from the frontend if I remember correctly.

1 Like

It is deprecated, I removed the whole zeroconf: section from configuration.yaml when 2021.6 released and haven’t had any issue since.

Hi guys!
I have same problem, but none of above solutions work. My difference is that i get error “Address not available”. Whole log:

Logger: homeassistant.setup
Source: components/zeroconf/__init__.py:120
First occurred: 09:47:11 (1 occurrences)
Last logged: 09:47:11

Error during setup of component zeroconf
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/zeroconf/__init__.py", line 179, in async_setup
    aio_zc = await _async_get_instance(hass, **zc_args)
  File "/usr/src/homeassistant/homeassistant/components/zeroconf/__init__.py", line 120, in _async_get_instance
    zeroconf = HaZeroconf(**zcargs)
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_core.py", line 447, in __init__
    listen_socket, respond_sockets = create_sockets(interfaces, unicast, ip_version, apple_p2p=apple_p2p)
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_utils/net.py", line 360, in create_sockets
    respond_socket = new_respond_socket(i, apple_p2p=apple_p2p)
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_utils/net.py", line 319, in new_respond_socket
    respond_socket = new_socket(
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_utils/net.py", line 244, in new_socket
    s.bind((bind_addr[0], port, *bind_addr[1:]))
OSError: [Errno 99] Address not available

Any suggestions? I removed and reconfigured HomeKit, since Apple is mentioned (i have iPad), but error stays…