home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.64k stars 30.79k forks source link

HASS does not start on WSL #122260

Closed andreshs1 closed 3 months ago

andreshs1 commented 3 months ago

The problem

Hello there

I have installed the HA Core on Windows following the guidelines in the page:

When I reached the end of the steps and tried HASS I only get errors as below:

(homeassistant) homeassistant@MyPC://home/homeassistant/.homeassistant$ hass 2024-07-21 00:06:32.606 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 98] error while attempting to bind on address ('0.0.0.0', 8123): address already in use 2024-07-21 00:06:35.979 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package aiodiscover==2.1.0: error: subprocess-exited-with-error Any ideas on what can I do to get it working?

Thanks in advance

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

https://www.home-assistant.io/installation/windows/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

(homeassistant) homeassistant@MyPC://home/homeassistant/.homeassistant$ hass
2024-07-21 00:06:32.606 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 8123: [Errno 98] error while attempting to bind on address ('0.0.0.0', 8123): address already in use
2024-07-21 00:06:35.979 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package aiodiscover==2.1.0: error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_ext
      checking for getifaddrs...found.
      checking for getnameinfo...found.
      checking for IPv6 socket IOCTLs...not found.
      checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h netrose/rose.h linux/atm.h linux/llc.h linux/tipc.h.
      checking whether struct sockaddr has a length field...no.
      checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un rose ash ec ll atmpvc atmsvc llc.
      checking for routing socket support...no.
      checking for sysctl(CTL_NET...) support...no.
      checking for netlink support...yes.
      will use netlink to read routing table
      building 'netifaces' extension
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DNETIFACES_VERSION=0.11.0 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_NETROSE_ROSE_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ROSE=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/srv/homeassistant/include -I/usr/include/python3.12 -c netifaces.c -o build/temp.linux-x86_64-cpython-312/netifaces.o

Additional information

No response

mib1185 commented 3 months ago

[Errno 98] error while attempting to bind on address ('0.0.0.0', 8123): address already in use means that there is already an process listening on port 8123. Maybe you have started it twice? It is already running in background? You should check which process is listening on 8123 within your wsl

andreshs1 commented 3 months ago

Thanks, after further investigation, I found write up from another user having the same issues as me, and he recommended adding

pip install git+https://github.com/boto/botocore

so I have done a full re-installation and add that package just before starting HASS and now works

I only need to know how to auto-start HASS whenever Windows starts up

Any ideas?

Cheers

mib1185 commented 3 months ago

I only need to know how to auto-start HASS whenever Windows starts up

Any ideas?

For this, you should try our Community Forum or join our Discord chat server. We use GitHub for tracking issues with Home Assistant Core itself, not for providing support 😉

Thanks! 👍