When I'm trying to run Prometheus alert manager with alertmanager --config.file /etc/alertmanager/alertmanager.yml
It giving me error like
$ alertmanager --config.file /etc/alertmanager/alertmanager.yml
level=info ts=2021-11-10T05:08:13.937Z caller=main.go:216 msg="Starting Alertmanager" version="(version=0.21.0, branch=HEAD, revision=4c6c03ebfe21009c546e4d1e9b92c371d67c021d)"
level=info ts=2021-11-10T05:08:13.937Z caller=main.go:217 build_context="(go=go1.14.4, user=root@dee35927357f, date=20200617-08:54:02)"
level=info ts=2021-11-10T05:08:13.939Z caller=cluster.go:161 component=cluster msg="setting advertise address explicitly" addr=<PrivateIP> port=9094
level=error ts=2021-11-10T05:08:13.940Z caller=main.go:241 msg="unable to initialize gossip mesh" err="create memberlist: Could not set up network transport: failed to obtain an address: Failed to start TCP listener on \"0.0.0.0\" port 9094: listen tcp 0.0.0.0:9094: bind: address already in use"
I checked the listening port by netstat -tnlp
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::9094 :::* LISTEN -
I tried too kill the process with sudo kill -9 $(sudo lsof -t -i:9094) and fuser -n tcp -k 9094
I'm not getting how to resolve that issue.