apache/skywalking · critical · ModuleStartException
No port setting.
Error message
No port setting.
What it means
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.
Source
Thrown at oap-server/server-configuration/grpc-configuration-sync/src/main/java/org/apache/skywalking/oap/server/configuration/grpc/GRPCConfigurationProvider.java:60
@Override
public Class type() {
return RemoteEndpointSettings.class;
}
@Override
public void onInitialized(final RemoteEndpointSettings initialized) {
settings = initialized;
}
};
}
@Override
protected ConfigWatcherRegister initConfigReader() throws ModuleStartException {
if (Strings.isNullOrEmpty(settings.getHost())) {
throw new ModuleStartException("No host setting.");
}
if (settings.getPort() < 1) {
throw new ModuleStartException("No port setting.");
}
return new GRPCConfigWatcherRegister(settings);
}
}
View on GitHub (pinned to 102af09b4a)
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
Example fix
# before grpc: host: config-server.internal # port missing # after grpc: host: config-server.internal port: 9555
Defensive patterns
Strategy: validation
Validate before calling
int port = Integer.parseInt(System.getenv().getOrDefault("SW_CONFIGURATION_GRPC_PORT", "0"));
if (port < 1 || port > 65535) {
throw new IllegalStateException("configuration.grpc port must be 1-65535");
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No host setting.
- admin-server: gRPCPort must be > 0 when the module is enable
- admin-server: failed to start gRPC server
- Zookeeper hostPort cannot be null or empty.
- Zookeeper namespace cannot be null or empty.
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/7140c9025a06bbcc.
Report an issue: GitHub.