{"record":{"id":"de953464a586d22d","repo":"thanos-io/thanos","slug":"listen-grpc-on-address-s","errorCode":null,"errorMessage":"listen gRPC on address %s","messagePattern":"listen gRPC on address (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/server/grpc/grpc.go","lineNumber":158,"sourceCode":"\tmet.InitializeMetrics(s)\n\treg.MustRegister(met)\n\n\tgrpc_health.RegisterHealthServer(s, probe.HealthServer())\n\treflection.Register(s)\n\n\treturn &Server{\n\t\tlogger: logger,\n\t\tcomp:   comp,\n\t\tsrv:    s,\n\t\topts:   options,\n\t}\n}\n\n// ListenAndServe listens on the TCP network address and handles requests on incoming connections.\nfunc (s *Server) ListenAndServe() error {\n\tl, err := net.Listen(s.opts.network, s.opts.listen)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"listen gRPC on address %s\", s.opts.listen)\n\t}\n\ts.listener = l\n\n\tlevel.Info(s.logger).Log(\"msg\", \"listening for serving gRPC\", \"address\", s.opts.listen)\n\treturn errors.Wrap(s.srv.Serve(s.listener), \"serve gRPC\")\n}\n\nfunc (s *Server) Address() string {\n\tif s.listener != nil {\n\t\treturn s.listener.Addr().String()\n\t}\n\treturn \"\"\n}\n\n// Shutdown gracefully shuts down the server by waiting,\n// for specified amount of time (by gracePeriod) for connections to return to idle and then shut down.\nfunc (s *Server) Shutdown(err error) {\n\tlevel.Info(s.logger).Log(\"msg\", \"internal server is shutting down\", \"err\", err)","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/server/grpc/grpc.go#L140-L176","documentation":"Raised in grpc.Server.ListenAndServe when net.Listen fails to bind the configured network address (e.g., address already in use, permission denied for privileged ports, invalid address syntax). The gRPC server never starts and the error aborts component startup.","triggerScenarios":"Thrown at pkg/server/grpc/grpc.go:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the configured --grpc-address port is free (address already in use)","Verify the address syntax and that the process may bind it (privileged port/permissions)","Confirm no other instance of the service is running on the same address"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}