apache/hadoop · critical · ServerException
S10
S10
Error message
Service [{0}] requires service [{1}] What it means
During initialization HttpFS Server calls checkServiceDependencies() for every loaded service: each Service's getServiceDependencies() must resolve to a service already in the server's services map. Error S10 is thrown when a dependency is missing, and startup aborts. For example FileSystemAccessService declares dependencies on Instrumentation and Scheduler, so it cannot run without InstrumentationService and SchedulerService.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/server/Server.java:600
this.services.put(service.getInterface(), service);
}
for (Service service : services) {
service.postInit();
}
}
/**
* Checks if all service dependencies of a service are available.
*
* @param service service to check if all its dependencies are available.
*
* @throws ServerException thrown if a service dependency is missing.
*/
protected void checkServiceDependencies(Service service) throws ServerException {
if (service.getServiceDependencies() != null) {
for (Class dependency : service.getServiceDependencies()) {
if (services.get(dependency) == null) {
throw new ServerException(ServerException.ERROR.S10, service.getClass(), dependency);
}
}
}
}
/**
* Destroys the server services.
*/
protected void destroyServices() {
List<Service> list = new ArrayList<Service>(services.values());
Collections.reverse(list);
for (Service service : list) {
try {
log.debug("Destroying service [{}]", service.getInterface());
service.destroy();
} catch (Throwable ex) {
log.error("Could not destroy service [{}], {}",
new Object[]{service.getInterface(), ex.getMessage(), ex});View on GitHub (pinned to 2add963021)
Solutions
- Look at the message: parameter 1 is the failing service, parameter 2 the missing dependency interface
- Add the service implementation for the missing dependency to the 'httpfs.services' property (e.g. InstrumentationService, SchedulerService)
- If the dependent service is not needed, remove it from httpfs.services instead
- Restart httpfs and confirm all dependencies resolve in the startup log
Example fix
<!-- before: FileSystemAccessService present but its dependencies removed -->
<property><name>httpfs.services</name>
<value>org.apache.hadoop.lib.service.hadoop.FileSystemAccessService</value></property>
<!-- after -->
<property><name>httpfs.services</name>
<value>org.apache.hadoop.lib.service.instrumentation.InstrumentationService,
org.apache.hadoop.lib.service.scheduler.SchedulerService,
org.apache.hadoop.lib.service.hadoop.FileSystemAccessService</value></property> Defensive patterns
Strategy: validation
Validate before calling
import org.apache.hadoop.lib.server.Service;
// Verify every declared dependency interface is satisfied by the services list
List<Service> loaded = instantiateAll(config.getStrings("httpfs.services", new String[0]));
Set<Class<?>> provided = loaded.stream().map(Service::getInterface).collect(Collectors.toSet());
for (Service s : loaded) {
if (s.getServiceDependencies() != null) {
for (Class<?> dep : s.getServiceDependencies()) {
if (!provided.contains(dep)) throw new IllegalStateException(s.getClass() + " missing " + dep);
}
}
} Try / catch
try {
server.init();
} catch (ServerException ex) {
if (ex.getError() == ServerException.ERROR.S10) {
// message: 'Service [<svc>] requires service [<missing-interface>]'
log.error("dependency check failed: {}", ex.getMessage(), ex);
}
throw ex;
} Prevention
- Start from the default httpfs.services list and only remove entries after checking getServiceDependencies() of the rest
- For custom services, declare getServiceDependencies() and document the required companion services
- Add a startup smoke test in CI that boots the Server with your production services list
When it happens
Trigger: Server init after loading services; a service in httpfs.services returns a non-null getServiceDependencies() containing an interface that no loaded service implements - e.g. enabling FileSystemAccessService while InstrumentationService or SchedulerService was dropped from httpfs.services, or a custom service declaring a dependency that is not listed.
Common situations: Trimming the default httpfs.services list to 'lighten' the server and accidentally removing a transitive dependency; adding a custom service without also adding the services it depends on; reordering or dedup rules removing an implementation that was believed unused.
Related errors
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/6e02c3d0117a3d48.
Report an issue: GitHub.