apache/skywalking · critical · ModuleStartException

No host setting.

Error message

No host setting.

What it means

ModuleStartException thrown by the gRPC configuration-sync provider during OAP startup when the target 'host' is null or empty. This provider makes the OAP act as a configuration client fetching dynamic config from a remote gRPC endpoint, and it refuses to start without a host to connect to. Fail-fast validation in initConfigReader() before constructing GRPCConfigWatcherRegister.

Source

Thrown at oap-server/server-configuration/grpc-configuration-sync/src/main/java/org/apache/skywalking/oap/server/configuration/grpc/GRPCConfigurationProvider.java:57

    @Override
    public ConfigCreator newConfigCreator() {
        return new ConfigCreator<RemoteEndpointSettings>() {
            @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

  1. Set host under configuration.grpc in application.yml, e.g. host: config-server.internal
  2. Verify the selector line matches the block name (grpc) and indentation is correct
  3. If using ${SW_GRPC_HOST}, confirm the environment variable is set in the container/service definition
  4. Restart OAP

Example fix

# before
configuration:
  selector: grpc
  grpc:
    port: 9555

# after
configuration:
  selector: grpc
  grpc:
    host: config-server.internal
    port: 9555
Defensive patterns

Strategy: validation

Validate before calling

String host = System.getenv().getOrDefault("SW_CONFIGURATION_GRPC_HOST", "");
if (host == null || host.trim().isEmpty()) {
    throw new IllegalStateException("configuration.grpc host is required when selector=grpc");
}

Prevention

When it happens

Trigger: Setting configuration.selector to grpc in application.yml while the host entry under the grpc block is missing or empty. The settings object is populated from the module config; Strings.isNullOrEmpty(settings.getHost()) triggers the throw.

Common situations: Switching the config center from apollo/consul/nacos to grpc and forgetting the host field; env-var substitution for the host resolving to empty; wrong YAML nesting under the grpc sub-block.

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/7803fc3e06a04154. Report an issue: GitHub.