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
Is your feature request related to a problem? Please describe.
Since the change in default limits to use the global strategy for distributor limits, we now require the distributor ring to be active. As a result, the code to find the listen address via the default set of interfaces is going to run. When this code fails to find an interface because different OSes have different names for the default interfaces, it causes loki to fail to boot.
Describe the solution you'd like
In this case, where none of the default interfaces are found, we should default the listen_address to 127.0.0.1. This problem only came up for the distributor ring, but I think this is reasonable to do for all the rings. It's probably worth a discussion with the cortex team to see if this change is reasonable to upstream, or at least upstream for the ruler ring?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Error encountered when default interface is not found:
ts=2021-10-15T07:09:34.268243247Z caller=log.go:168 level=info msg="Starting Loki" version="(version=, branch=, revision=)"
ts=2021-10-15T07:09:34.268514046Z caller=gokit.go:47 level=info http=[::]:3100 grpc=[::]:9095 msg="server listening on addresses"
level=warn ts=2021-10-15T07:09:34.271030144Z caller=worker_service.go:88 msg="Worker address is empty, attempting automatic worker configuration. If queries are unresponsive consider configuring the worker explicitly." address=127.0.0.1:9095
level=warn ts=2021-10-15T07:09:34.271640859Z caller=net.go:19 msg="error getting interface" inf=eth0 err="route ip+net: no such network interface"
level=warn ts=2021-10-15T07:09:34.271843265Z caller=net.go:19 msg="error getting interface" inf=en0 err="route ip+net: no such network interface"
level=error ts=2021-10-15T07:09:34.271892519Z caller=log.go:106 msg="error running loki" err="No address found for [eth0 en0]\nerror initialising module: distributor\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/home/danny/Code/open-source/loki/vendor/github.com/grafana/dskit/modules/modules.go:108\ngithub.com/grafana/dskit/modules.(*Manager).InitModuleServices\n\t/home/danny/Code/open-source/loki/vendor/github.com/grafana/dskit/modules/modules.go:78\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/home/danny/Code/open-source/loki/pkg/loki/loki.go:277\nmain.main\n\t/home/danny/Code/open-source/loki/cmd/loki/main.go:101\nruntime.main\n\t/home/danny/go/go1.16.5/src/runtime/proc.go:225\nruntime.goexit\n\t/home/danny/go/go1.16.5/src/runtime/asm_amd64.s:1371"
setting needed for resolution:
distributor:
ring:
instance_addr: 127.0.0.1
The text was updated successfully, but these errors were encountered:
This is largely solved by #4546 in that PR applies whatever is defined to the ingester to all the other rings which would address the issue as defined.
A further discussion about how to better handle the large number of operating systems which don't have either eth0 or en0 could still be discussed here though I think
If the ingester interface names aren't different from the default names, try to add a loopback interface to it (such as lo)
If the ingester interface names are set different by the user, doesn't append the loopback interface
Since right now the ingester ring default configs are replicated to other rings, applying this behavior to only the ingester has the good side-effect of having loopback when appropriate for all rings at the same time.
Is your feature request related to a problem? Please describe.
Since the change in default limits to use the
global
strategy for distributor limits, we now require the distributor ring to be active. As a result, the code to find the listen address via the default set of interfaces is going to run. When this code fails to find an interface because different OSes have different names for the default interfaces, it causes loki to fail to boot.Describe the solution you'd like
In this case, where none of the default interfaces are found, we should default the
listen_address
to127.0.0.1
. This problem only came up for the distributor ring, but I think this is reasonable to do for all the rings. It's probably worth a discussion with the cortex team to see if this change is reasonable to upstream, or at least upstream for the ruler ring?Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Error encountered when default interface is not found:
setting needed for resolution:
The text was updated successfully, but these errors were encountered: