{"record":{"id":"93e8d507536e21f0","repo":"hyperledger/fabric","slug":"no-non-loopback-ipv4-interface-detected","errorCode":null,"errorMessage":"no non-loopback, IPv4 interface detected","messagePattern":"no non-loopback, IPv4 interface detected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/peer/config.go","lineNumber":384,"sourceCode":"\tpeerLogger.Info(\"Returning\", peerAddress)\n\treturn peerAddress, nil\n}\n\n// getLocalIP returns the a loopback local IP of the host.\nfunc getLocalIP() (string, error) {\n\taddrs, err := net.InterfaceAddrs()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfor _, address := range addrs {\n\t\t// check the address type and if it is not a loopback then display it\n\t\tif ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {\n\t\t\tif ipnet.IP.To4() != nil {\n\t\t\t\treturn ipnet.IP.String(), nil\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\", errors.Errorf(\"no non-loopback, IPv4 interface detected\")\n}\n\n// GetServerConfig returns the gRPC server configuration for the peer\nfunc GetServerConfig() (comm.ServerConfig, error) {\n\tserverConfig := comm.ServerConfig{\n\t\tConnectionTimeout: viper.GetDuration(\"peer.connectiontimeout\"),\n\t\tSecOpts: comm.SecureOptions{\n\t\t\tUseTLS: viper.GetBool(\"peer.tls.enabled\"),\n\t\t},\n\t}\n\tif serverConfig.SecOpts.UseTLS {\n\t\t// get the certs from the file system\n\t\tserverKey, err := os.ReadFile(config.GetPath(\"peer.tls.key.file\"))\n\t\tif err != nil {\n\t\t\treturn serverConfig, fmt.Errorf(\"error loading TLS key (%s)\", err)\n\t\t}\n\t\tserverCert, err := os.ReadFile(config.GetPath(\"peer.tls.cert.file\"))\n\t\tif err != nil {","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/peer/config.go#L366-L402","documentation":"getLocalIP enumerated the host's network interface addresses and found none that is a non-loopback IPv4 address — typically a container/VM with only IPv6 or loopback interfaces, so no advertised IP can be auto-detected.","triggerScenarios":"Thrown at core/peer/config.go:384 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure an explicit peer.address instead of relying on auto-detect","Attach an IPv4 network interface to the host/container"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}