mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/promscrape: hint that -enableTCP6 command-line flag can be used for connecting to IPv6 addresses
This commit is contained in:
parent
8608e956dd
commit
d892d63204
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ package promscrape
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
@ -52,6 +53,9 @@ func statDial(addr string) (conn net.Conn, err error) {
|
|||
dialsTotal.Inc()
|
||||
if err != nil {
|
||||
dialErrors.Inc()
|
||||
if !netutil.TCP6Enabled() {
|
||||
err = fmt.Errorf("%w; try -enableTCP6 command-line flag", err)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
conns.Inc()
|
||||
|
|
Loading…
Reference in a new issue