Yugabyte db is not starting on localhost (

how yugabyte takes the ip for the server? while starting the yb db on my local machine it is taking the address : instead of where does the yb taking the ip from ?

Yugabyted basically checks fqdn using below snippet and it uses the IP address accordingly.

if “localhost” in fqdn:
fqdn = socket.getaddrinfo(socket.gethostname(), None, socket.AF_INET,
socket.SOCK_DGRAM, socket.IPPROTO_IP,
if “localhost” in fqdn:
fqdn = socket.gethostname()
Please refer code from here on how yugabyted fetches the IP address yugabyte-db/bin/yugabyted at master · yugabyte/yugabyte-db · GitHub

Also can you please share your /etc/hosts file and what it has.