Skip to content

ZeroConf() returns OSError: [Errno 48] Address already in use  #967

@SudhindraAnegondhi

Description

@SudhindraAnegondhi

Zeroconf() fails on instantiation with OSError: [Errno 48] Address already in use

The code works perfectly well on Ubuntu 21.04 but fails with the following error on macOS Big Sur version 11.5 :
` ``csh

 File "/Users/sudhindra/projects/cloudphotoservice/browse.py", line 61, in <module>
    zeroconf = Zeroconf()
  File "/usr/local/lib/python3.9/site-packages/zeroconf/_core.py", line 410, 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 48] Address already in use

As you can see Zeroconf() just creates an instance of the Zeroconf class. Neither Port nor IP address has been specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions