-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Olric in docker container - memberlist "no private IP address found, and explicit IP not provided" #35
Comments
It seems its specifically related to how we configure our docker network at my studio vs a default installation, to deal with the potential for conflicts with the external network. So maybe this is just a matter of documenting the situation. |
Thank you for informing me. I'm going to take a look at thanos#615. Could you please give more information about your setup? Thus, I can provide the problem on my side. |
I have a reproduction for you.
This replicates how my studio has custom network settings for their docker deployment to deal with known issues like address collisions, etc. But in this case the hashicorp memberlist isn't happy with the private ip range. |
Hey, Sorry for pulling this one up again, but I am currently experiencing an issue myself. It looks like this line privateIfs, _, err = IfByRFC("6890", privateIfs) inside vendor/github.com/hashicorp/go-sockaddr/ifaddrs.go is forcing all ip addresses to be within RFC 6890 which is likely too narrow. Would it make sense to simply first look into the private addresses, and if nothing is found look into the public ones? if bindIP == "0.0.0.0" {
// if we're not bound to a specific IP, let's use a suitable private IP address.
ipStr, err := sockaddr.GetPrivateIP()
if err != nil {
return "", fmt.Errorf("failed to get interface addresses: %w", err)
}
if ipStr == "" {
// Add logic here to search public ip addresses for bind address.
return "", fmt.Errorf("no private IP address found, and explicit IP not provided")
}
parsed := net.ParseIP(ipStr)
if parsed == nil {
return "", fmt.Errorf("failed to parse private IP address: %q", ipStr)
}
bindIP = parsed.String()
} For instance my IP is within this range but you can see the Source is set to false, which is defined here. I'd be happy to write something up for you if you feel this is the correct direction. Otherwise if you have other ideas I would be willing to implement them too :) |
BTW: The workaround for this is to specify the interface in both the |
Hi @d1ngd0 Firstly, I'm so sorry for my late response.
Yes it is. Olric tries to discover the IP address from the network interface, if it is defined in the config.
Great! I would like to see your solution and discuss about it. |
This does work for me now, with the 0.4.4 release |
I'm looking to see if you have encountered the following issue while trying to run Olric in a container:
Search a bit, this issue implies its a factor of the memberlist library and its gossip protocol, in trying to choose a private ip:
thanos-io/thanos#615
And I believe it may have to do with how my docker configuration is set up. If I run it with
--net=host
then it starts:So my questions are:
The text was updated successfully, but these errors were encountered: