Connect to the Coordinator with TLS1.2


You want to connect to a Coordinator requiring a secured connection.


If the Coordinator and Agent(s) are using secured communications, any client code submitting jobs must also enable the option to use SSL. To do this, set the ClusterJobScheduler's UseSsl property to true. If using self-signed certificates, also set the AllowSelfSignedCertificates property to true.

Note Note

The trusted root certificate used to sign the Coordinator's certificate must be in either a custom TrustStore or the Java system TrustStore. If using a custom TrustStore, set the Java system property to the filepath of the custom TrustStore.

To enable Certificate Revocation List checks, set the and Java system properties to true. These properties can be set in client code, as in the example below, or passed as command line arguments to the JVM.

If the Coordinator and Agent(s) are using mutual SSL, any client code must provide a client certificate. To do this, set the ClusterJobScheduler's setProvideClientCertificate property to true. Specify the certificates to provide using the following Java System Properties:

  • set to the filepath of the key file to use
  • set to the type of keystore being used
  • set to the password of the keystore being used

To verify the Coordinator's certificate, set the CoordinatorThumbprint property to the Coordinator's certificate thumbprint (found on the Coordinator's connection settings page).

package stkscalabilitysdk.howto;

import java.text.SimpleDateFormat;
import java.util.GregorianCalendar;

import agi.parallel.client.ClusterJobScheduler;
import agi.parallel.client.IJobScheduler;
import agi.parallel.client.Job;
import agi.parallel.infrastructure.Task;

public class SslExample {
    public static void main(String[] args) {
        ClusterJobScheduler scheduler = new ClusterJobScheduler("localhost");
        scheduler.setProvideClientCertificate(true); // Only needed if using mutual SSL
        scheduler.setCoordinatorThumbprint("CoordinatorThumbprint"); // Only needed if the coordinator certificate should be verified.
        try {

            Job job = scheduler.createJob();
            job.addTask(new AddTask(1, 1));

        } finally {

    public static class AddTask extends Task {
      int a, b;
      public AddTask(int a, int b) {
        this.a = a;
        this.b = b;

      public void execute() {
        this.setResult(a + b);

STK Scalability 1.4 API for Java