ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

DX-Gateway and RESTMon not working


Article ID: 208866


Updated On:


DX Operational Intelligence


Installed the 1.0.6 version of the DX-Gateway and enabled the RESTmon component. Everything starts fine but when I add a profile to RESTmon it fails to start the schedule. I have tried this with a number of different OOTB profiles and they all fail. This is not an issue with the endpoint as I cannot see any attempt to contact the endpoint from RESTMon,

Attached the RESTmon logs a copy of the restmon.json file.


Release : 20.2

Component : CA DOI Foundations


From Engineering:

Looked bit more into this Exception in the log:

[MetricCollector|alanelasticsearch~~elasticsearch|1|1613132672615] ERROR TaskUtils\$LoggingErrorHandler:96 - Unexpected error occurred in scheduled task.
java.lang.ExceptionInInitializerError: null
    at java.base/java.util.concurrent.Executors\$
    at java.base/java.util.concurrent.FutureTask.runAndReset(
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor\$
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.base/java.util.concurrent.ThreadPoolExecutor\$
    at java.base/
Caused by: java.lang.IllegalArgumentException: null
    at java.base/java.util.concurrent.ThreadPoolExecutor.<init>(
    at java.base/java.util.concurrent.ThreadPoolExecutor.<init>(
    at java.base/java.util.concurrent.Executors.newFixedThreadPool(
    ... 8 common frames omitted
 Engineering downloaded the binary and decompiled the code, and think they found the place:

  private static final int NO_CORES_AVAILABLE = Runtime.getRuntime().availableProcessors();
  private static final ExecutorService STREAM_BATCH_PROCESS_EXECUTOR = Executors.newFixedThreadPool(NO_CORES_AVAILABLE - 1, (new BasicThreadFactory.Builder());

Basically we were trying to create a thread pool with size of (# of cores - 1). So if the # of cores is less than 2, then it will fail. Possibly the customer's environment has only 1 core or for some reason the JVM API told us so.

Changing the core count fixed the issue

Additional Information