During desired nodes updates the system validates that the provided node settings are valid in order to avoid boot looping issues. If one of the node settings depends on a secure setting, the validation fails even when the secure setting is present and correct.
server/src/main/java/org/elasticsearch/node/Node.java
ExecutorSelector executorSelector,
        Tracer tracer
    ) {
        return new SearchService(
            clusterService,
            indicesService,
            threadPool,
            scriptService,
            bigArrays,
            fetchPhase,
            responseCollectorService,
            circuitBreakerService,
            executorSelector,
            tracer
        );
    }
    /**
     * Creates a new ScriptService. This method can be overwritten by tests to inject mock implementations.
     */
    protected ScriptService newScriptService(
        Settings settings,
        Map<String, ScriptEngine> engines,
        Map<String, ScriptContext<?>> contexts,
        LongSupplier timeProvider
    ) {
        return new ScriptService(settings, engines, contexts, timeProvider);
    }
    /**
     * Creates a new ReadinessService. This method can be overwritten by tests to inject mock implementations.
     */