You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-compactor.ring.instance-interface value
Name of network interface to read address from. (default [eth0 en0])
-distributor.ring.instance-interface value
Name of network interface to read address from. (default [eth0 en0])
-experimental.store-gateway.sharding-ring.instance-interface value
Name of network interface to read address from. (default [eth0 en0])-
-ingester.lifecycler.interface value
Name of network interface to read address from. (default [eth0 en0])
-ruler.ring.instance-interface value
Name of network interface to read address from. (default [eth0 en0])
We could have a -default.interfaces flag so we do not need to overrule all those flags when we do not have en0 or eth0 on a machine.
Thanks for raising the issue. Let me try to approach the issue from another angle. If you had this issue I guess your system doesn't have neither eth0 and en0. If so, could you share which network interfaces your system has, please? Maybe we could just improve defaults.
Nice! I'm wondering if, instead of failing when the preferred interfaces don't exist, we could just fallback to the first defined interface in the system. Honestly, I would be happy if you wouldn't have to configure the interface name at all.
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Still the case on master, and there are now eight of these flags (alertmanager, compactor, distributor, frontend, ingester, querier, ruler and store-gateway), all defaulting to [eth0 en0]. The address lookup still only tries the listed interfaces and fails with "no address found" otherwise (
, with an identical copy in pkg/util/net.go used by the frontend), so the fallback suggested above would remove the need to override each flag on hosts without those interface names.
I would like to work on this issue. I have experience with Go and cloud-native backend systems, and I’ve followed the discussion on unifying the -default.interface flag across Cortex components and improving the default interface fallback behavior.
If this issue is still open for external contributors, could you please assign it to me? I will review the current per-component interface flags, propose and implement the unified flag/fallback behavior with appropriate tests, and submit a PR following the project's guidelines.
Activity
pracucci commentedon Jul 16, 2020
Thanks for raising the issue. Let me try to approach the issue from another angle. If you had this issue I guess your system doesn't have neither
eth0anden0. If so, could you share which network interfaces your system has, please? Maybe we could just improve defaults.roidelapluie commentedon Jul 16, 2020
enp0s31f6 and wlp3s0 :)
pracucci commentedon Jul 16, 2020
Nice! I'm wondering if, instead of failing when the preferred interfaces don't exist, we could just fallback to the first defined interface in the system. Honestly, I would be happy if you wouldn't have to configure the interface name at all.
@pstibrany any thought on this?
roidelapluie commentedon Jul 16, 2020
Alertmanager takes the first rfc1918 ip address by default
pracucci commentedon Jul 16, 2020
We could do the same as well, while still keeping the option to allow to configure the preferred one.
stale commentedon Sep 14, 2020
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.
pracucci commentedon Sep 15, 2020
Still valid. Feedback is good.
roidelapluie commentedon Sep 15, 2020
I am now doing
./cortex-linux-amd64 $(./cortex-linux-amd64 --help|grep eth0 -B 1|grep value|sed s/value/lo/)locally.sandy2008 commentedon Oct 28, 2026
Still the case on master, and there are now eight of these flags (alertmanager, compactor, distributor, frontend, ingester, querier, ruler and store-gateway), all defaulting to
[eth0 en0]. The address lookup still only tries the listed interfaces and fails with "no address found" otherwise (cortex/pkg/ring/util.go
Lines 154 to 186 in 5d93557
pkg/util/net.goused by the frontend), so the fallback suggested above would remove the need to override each flag on hosts without those interface names.princecherry9905 commentedon Dec 3, 2026
Hello maintainers,
I would like to work on this issue. I have experience with Go and cloud-native backend systems, and I’ve followed the discussion on unifying the
-default.interfaceflag across Cortex components and improving the default interface fallback behavior.If this issue is still open for external contributors, could you please assign it to me? I will review the current per-component interface flags, propose and implement the unified flag/fallback behavior with appropriate tests, and submit a PR following the project's guidelines.
Thank you!