127.0.1.1 is used in ubuntu / debian by default in /etc/hosts for fqdn.

Due to the fact that address don't literally match the address of network interface isLocal fails to detect that address as local.

See
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution
https://serverfault.com/questions/363095/why-does-my-hostname-appear-with-the-address-127-0-1-1-rather-than-127-0-0-1-in

https://github.com/ClickHouse/ClickHouse/blob/51ba12c2c3106d9277bbc223adfe41fdb3e45439/src/Common/isLocalAddress.cpp#L13

&& 0 == memcmp(interface_address->addr(), address.addr(), address.length()))
                return true;
        }
        return false;
    }
    ~NetworkInterfaces()
    {
        freeifaddrs(ifaddr);
    }
};
}
bool isLocalAddress(const Poco::Net::IPAddress & address)
{
    NetworkInterfaces interfaces;
    return interfaces.hasAddress(address);
}
bool isLocalAddress(const Poco::Net::SocketAddress & address, UInt16 clickhouse_port)
{
    return clickhouse_port == address.port() && isLocalAddress(address.host());
}
size_t getHostNameDifference(const std::string & local_hostname, const std::string & host)
{
    size_t hostname_difference = 0;
    for (size_t i = 0; i < std::min(local_hostname.length(), host.length()); ++i)
        if (local_hostname[i] != host[i])
            ++hostname_difference;
    return hostname_difference;
}
}