{"record":{"id":"590b8afa3904fa4c","repo":"hyperledger/fabric","slug":"peer-address-is-not-in-the-format-of-host-port-v","errorCode":null,"errorMessage":"peer address is not in the format of host:port: %v","messagePattern":"peer address is not in the format of host:port: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/peer/node/start.go","lineNumber":253,"sourceCode":"\terr = opsSystem.Start()\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to initialize operations subsystem\")\n\t}\n\tdefer opsSystem.Stop()\n\n\tmetricsProvider := opsSystem.Provider\n\tlogObserver := floggingmetrics.NewObserver(metricsProvider)\n\tflogging.SetObserver(logObserver)\n\n\tchaincodeInstallPath := filepath.Join(coreconfig.GetPath(\"peer.fileSystemPath\"), \"lifecycle\", \"chaincodes\")\n\tccStore := persistence.NewStore(chaincodeInstallPath)\n\tccPackageParser := &persistence.ChaincodePackageParser{\n\t\tMetadataProvider: ccprovider.PersistenceAdapter(ccprovider.MetadataAsTarEntries),\n\t}\n\n\tpeerHost, _, err := net.SplitHostPort(coreConfig.PeerAddress)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"peer address is not in the format of host:port: %v\", err)\n\t}\n\n\tlistenAddr := coreConfig.ListenAddress\n\tserverConfig, err := peer.GetServerConfig()\n\tif err != nil {\n\t\tlogger.Fatalf(\"Error loading secure config for peer (%s)\", err)\n\t}\n\n\tserverConfig.Logger = flogging.MustGetLogger(\"core.comm\").With(\"server\", \"PeerServer\")\n\tserverConfig.ServerStatsHandler = comm.NewServerStatsHandler(metricsProvider)\n\tserverConfig.UnaryInterceptors = append(\n\t\tserverConfig.UnaryInterceptors,\n\t\tgrpcmetrics.UnaryServerInterceptor(grpcmetrics.NewUnaryMetrics(metricsProvider)),\n\t\tgrpclogging.UnaryServerInterceptor(flogging.MustGetLogger(\"comm.grpc.server\").Zap()),\n\t)\n\tserverConfig.StreamInterceptors = append(\n\t\tserverConfig.StreamInterceptors,\n\t\tgrpcmetrics.StreamServerInterceptor(grpcmetrics.NewStreamMetrics(metricsProvider)),","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/node/start.go#L235-L271","documentation":"In serve(), the peer parses CORE_PEER_ADDRESS (coreConfig.PeerAddress) with net.SplitHostPort to validate it has host:port form; a parse error is wrapped into this error and aborts peer startup. The peer address must be a valid host:port pair because it is advertised and used for gRPC bindings.","triggerScenarios":"Setting CORE_PEER_ADDRESS (or peer.address in core.yaml) to a value without a port, with an extra colon, with an invalid IPv6 literal without brackets, or otherwise unparsable by net.SplitHostPort.","commonSituations":"Writing `peer0.org1.example.com` with no `:7051` suffix; double-colon typos; unbracketed IPv6 addresses; leftover protocol prefixes like `http://` or trailing slashes; empty address value.","solutions":["Set the address to a valid host:port, e.g. CORE_PEER_ADDRESS=peer0.org1.example.com:7051.","For IPv6, bracket the literal: [fd00::1]:7051, and strip any scheme prefix.","Check core.yaml peer.address and the resolved env override for stray whitespace or empty values, then restart the peer."],"exampleFix":"// before\nCORE_PEER_ADDRESS=peer0.org1.example.com\n// after\nCORE_PEER_ADDRESS=peer0.org1.example.com:7051","handlingStrategy":"validation","validationCode":"addr := os.Getenv(\"CORE_PEER_ADDRESS\")\nif _, _, err := net.SplitHostPort(addr); err != nil {\n    return fmt.Errorf(\"CORE_PEER_ADDRESS must be host:port, got %q\", addr)\n}","typeGuard":null,"tryCatchPattern":"if err := startPeer(); err != nil && strings.HasPrefix(err.Error(), \"peer address is not in the format of host:port\") {\n    return fmt.Errorf(\"check CORE_PEER_ADDRESS / peer.address in core.yaml: %w\", err)\n}","preventionTips":["Always include an explicit port in CORE_PEER_ADDRESS / core.yaml peer.address.","Bracket IPv6 literals and strip http:// prefixes and whitespace.","Validate host:port format in deployment scripts before launching the peer."],"tags":["fabric","peer","configuration","startup"],"backgroundTag":"invalid-host-port-address","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"}