Adds udp6 support for ingest servers (#1134)

with flag -enableUDP6  https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1131
This commit is contained in:
Nikolay 2021-03-17 01:03:06 +03:00 committed by Aliaksandr Valialkin
parent 05e301cfa0
commit b293f81eb8
3 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ func MustStart(addr string, insertHandler func(r io.Reader) error) *Server {
}
logger.Infof("starting UDP Graphite server at %q", addr)
lnUDP, err := net.ListenPacket("udp4", addr)
lnUDP, err := net.ListenPacket(netutil.GetUDPNetwork(), addr)
if err != nil {
logger.Fatalf("cannot start UDP Graphite server at %q: %s", addr, err)
}

View File

@ -44,7 +44,7 @@ func MustStart(addr string, insertHandler func(r io.Reader) error) *Server {
}
logger.Infof("starting UDP Influx server at %q", addr)
lnUDP, err := net.ListenPacket("udp4", addr)
lnUDP, err := net.ListenPacket(netutil.GetUDPNetwork(), addr)
if err != nil {
logger.Fatalf("cannot start UDP Influx server at %q: %s", addr, err)
}

View File

@ -51,7 +51,7 @@ func MustStart(addr string, telnetInsertHandler func(r io.Reader) error, httpIns
httpServer := opentsdbhttp.MustServe(lnHTTP, httpInsertHandler)
logger.Infof("starting UDP OpenTSDB collector at %q", addr)
lnUDP, err := net.ListenPacket("udp4", addr)
lnUDP, err := net.ListenPacket(netutil.GetUDPNetwork(), addr)
if err != nil {
logger.Fatalf("cannot start UDP OpenTSDB collector at %q: %s", addr, err)
}