{"record":{"id":"7140c9025a06bbcc","repo":"apache/skywalking","slug":"no-port-setting","errorCode":null,"errorMessage":"No port setting.","messagePattern":"No port setting\\.","errorType":"exception","errorClass":"ModuleStartException","httpStatus":null,"severity":"critical","filePath":"oap-server/server-configuration/grpc-configuration-sync/src/main/java/org/apache/skywalking/oap/server/configuration/grpc/GRPCConfigurationProvider.java","lineNumber":60,"sourceCode":"            @Override\n            public Class type() {\n                return RemoteEndpointSettings.class;\n            }\n\n            @Override\n            public void onInitialized(final RemoteEndpointSettings initialized) {\n                settings = initialized;\n            }\n        };\n    }\n\n    @Override\n    protected ConfigWatcherRegister initConfigReader() throws ModuleStartException {\n        if (Strings.isNullOrEmpty(settings.getHost())) {\n            throw new ModuleStartException(\"No host setting.\");\n        }\n        if (settings.getPort() < 1) {\n            throw new ModuleStartException(\"No port setting.\");\n        }\n\n        return new GRPCConfigWatcherRegister(settings);\n    }\n}\n","sourceCodeStart":42,"sourceCodeEnd":66,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/server-configuration/grpc-configuration-sync/src/main/java/org/apache/skywalking/oap/server/configuration/grpc/GRPCConfigurationProvider.java#L42-L66","documentation":"ModuleStartException thrown by the gRPC configuration-sync provider when the configured port is less than 1 (unset ports default to 0). It is the port counterpart of the host check in initConfigReader() and fails fast before a gRPC channel is created, since port 0 is never a valid explicit target for the config client.","triggerScenarios":"configuration.selector: grpc with the port key omitted (defaults to 0), set to 0 or a negative number, or a port placeholder variable that parses to 0. settings.getPort() < 1 triggers the throw.","commonSituations":"Template config that ships with port commented out; port defined as a string with a typo (parsed back to default); copying host but not port when migrating from another provider.","solutions":["Set a valid port under configuration.grpc, e.g. port: 9555","Check the env substitution variable (e.g. ${SW_GRPC_PORT}) is set and numeric","Restart OAP"],"exampleFix":"# before\ngrpc:\n  host: config-server.internal\n# port missing\n\n# after\ngrpc:\n  host: config-server.internal\n  port: 9555","handlingStrategy":"validation","validationCode":"int port = Integer.parseInt(System.getenv().getOrDefault(\"SW_CONFIGURATION_GRPC_PORT\", \"0\"));\nif (port < 1 || port > 65535) {\n    throw new IllegalStateException(\"configuration.grpc port must be 1-65535\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Co-validate host and port in the same pre-flight step","Prefer numeric env vars with explicit defaults in the container spec so a missing var cannot silently become 0","Document the exact minimal grpc configuration block next to the selector option"],"tags":["grpc","configuration-sync","startup","oap-server"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}