1. 程式人生 > 其它 >關於alertmanager報No private IP address found, and explicit IP not provided

關於alertmanager報No private IP address found, and explicit IP not provided

./alertmanager --config.file=alertmanager.yml

level=info ts=2021-11-22T05:53:11.195Z caller=main.go:216 msg="Starting Alertmanager" version="(version=0.21.0, branch=HEAD, revision=4c6c03ebfe21009c546e4d1e9b92c371d67c021d)" level=info ts=2021-11-22T05:53:11.195Z caller=main.go:217 build_context="(go=go1.14.4, user=root@dee35927357f, date=20200617-08:54:02)" level=warn ts=2021-11-22T05:53:11.202Z caller=cluster.go:154 component=cluster err="couldn't deduce an advertise address: no private IP found, explicit advertise addr not provided" level=error ts=2021-11-22T05:53:11.203Z caller=main.go:241 msg="unable to initialize gossip mesh" err="create memberlist: Failed to get final advertise address: No private IP address found, and explicit IP not provided"

解決方法:

啟動引數加:

--cluster.advertise-address=0.0.0.0:9093
./alertmanager --config.file=./alertmanager.yml --cluster.advertise-address=0.0.0.0:9093 

level=info ts=2021-11-22T05:58:06.120Z caller=main.go:216 msg="Starting Alertmanager" version="(version=0.21.0, branch=HEAD, revision=4c6c03ebfe21009c546e4d1e9b92c371d67c021d)" level=info ts=2021-11-22T05:58:06.120Z caller=main.go:217 build_context="(go=go1.14.4, user=root@dee35927357f, date=20200617-08:54:02)" level=info ts=2021-11-22T05:58:06.121Z caller=cluster.go:623 component=cluster msg="Waiting for gossip to settle..." interval=2s level=info ts=2021-11-22T05:58:06.148Z caller=coordinator.go:119 component=configuration msg="Loading configuration file" file=./alertmanager.yml level=info ts=2021-11-22T05:58:06.149Z caller=coordinator.go:131 component=configuration msg="Completed loading of configuration file" file=./alertmanager.yml level=info ts=2021-11-22T05:58:06.153Z caller=main.go:485 msg=Listening address=:9093 level=info ts=2021-11-22T05:58:08.122Z caller=cluster.go:648 component=cluster msg="gossip not settled" polls=0 before=0 now=1 elapsed=2.000081356s

level=info ts=2021-11-22T05:58:15.390Z caller=main.go:524 msg="Received SIGTERM, exiting gracefully..." level=info ts=2021-11-22T05:58:15.390Z caller=cluster.go:632 component=cluster msg="gossip not settled but continuing anyway" polls=4 elapsed=9.268526403s