# \[Benchmark\] fail 50% throw exception None of the configured nodes were available

**URL:** <https://discuss.elastic.co/t/benchmark-fail-50-throw-exception-none-of-the-configured-nodes-were-available/242502>\
**Category:** Elasticsearch\
**Created:** [July 24, 2020, 11:24am UTC](https://discuss.elastic.co/t/benchmark-fail-50-throw-exception-none-of-the-configured-nodes-were-available/242502 "2020-07-24T11:24:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dongtuhust](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Dongtuhust](https://discuss.elastic.co/u/Dongtuhust)\
**Post date:** [July 24, 2020, 11:24am UTC](https://discuss.elastic.co/t/benchmark-fail-50-throw-exception-none-of-the-configured-nodes-were-available/242502/1 "2020-07-24T11:24:07Z")

</div>

```auto
I use PreBuiltXPackTransportClient in my java code
public class EsUtil {
    
    private static Logger logger = LoggerFactory.getLogger(EsUtil.class);
    private static final String PROP_NAME = "config.properties";
    private static Client client = null;
    public static Client getTransportClient() {
        Properties properties = getProperties();
        try {
            if (client == null || ((TransportClient) client).connectedNodes().isEmpty()) {
                synchronized (EsUtil.class) {
                    if (client == null || ((TransportClient) client).connectedNodes().isEmpty()) {
                        Settings settings = Settings.builder()
                                .put("xpack.security.user", PassTranformer.decrypt((String) properties.get("ESAuthen")))
                                .put("cluster.name", (String) properties.get("clusterESName"))
                                .put("request.headers.X-Found-Cluster", (String) properties.get("clusterESName"))
// .put("xpack.ssl.keystore.path", "../resources/elasticsearch.keystore")
                                .put("xpack.security.transport.ssl.enabled", "true")
                                .put("xpack.security.transport.ssl.keystore.type", "PKCS12")
                                .put("xpack.security.transport.ssl.truststore.type", "PKCS12")
                                .put("xpack.security.transport.ssl.keystore.path", "elastic-certificates.p12")
                                .put("xpack.security.transport.ssl.truststore.path", "elastic-certificates.p12")
                                .put("xpack.security.transport.ssl.keystore.password", PassTranformer.decrypt((String) properties.get("SslESPass")))
                                .put("xpack.security.transport.ssl.truststore.password", PassTranformer.decrypt((String) properties.get("SslESPass")))
                                .put("xpack.security.transport.ssl.verification_mode", "certificate")
                                .put("client.transport.sniff", true)
                                /* .put("client.transport.nodes_sampler_interval", 10000)
		            .put("client.transport.sniff", true)*/
// .put("thread_pool.search.type", "fixed")
                                .put("thread_pool.search.size", 300)
                                .put("thread_pool.search.queue_size", 1000)
                                .build();
                        client = new PreBuiltXPackTransportClient(settings)
                        		.addTransportAddress(new TransportAddress(InetAddress.getByName(PassTranformer.decrypt((String) properties.get("AdressES"))), Integer.parseInt((String) properties.get("PortES"))))
                        		.addTransportAddress(new TransportAddress(InetAddress.getByName(PassTranformer.decrypt((String) properties.get("AdressES2"))), Integer.parseInt((String) properties.get("PortES"))))
                        		.addTransportAddress(new TransportAddress(InetAddress.getByName(PassTranformer.decrypt((String) properties.get("AdressES3"))), Integer.parseInt((String) properties.get("PortES"))));

                        logger.error("[SYSTEM] Khoi tao Transport Client");
                    }
                }
            }
        } catch (UnknownHostException e) {
            logger.error("unknown host " + properties.get("elasticsearch.url") + e);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return client;
    }

```

```auto

**When test benchmark by jmester tool with 10 CCU. App throw exception**
None of the configured nodes were available: [{node_1}{ITQP74KIQ32Jq_HOAOJ8Rw}{MyqcJ244R
-WG9TUgqYtt-g}{10.60.110.42}{10.60.110.42:9300}{ml.machine_memory=68719009792, ml.max_op
en_jobs=20, xpack.installed=true, ml.enabled=true}]

Please give me advice !

```

---

<div class="post-metadata">

**Author:** ![Dongtuhust](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@Dongtuhust](https://discuss.elastic.co/u/Dongtuhust)\
**Post date:** [July 24, 2020, 11:25am UTC](https://discuss.elastic.co/t/benchmark-fail-50-throw-exception-none-of-the-configured-nodes-were-available/242502/2 "2020-07-24T11:25:31Z")

</div>

```auto
This my elasticsearch.yml config:

```

```auto
#cluster.name: elasticsearch
node.name: 'node_1'
network.host: 0.0.0.0
network.bind_host: 0.0.0.0
discovery.type: single-node
#discovery.zen.ping.unicast.hosts: ["10.60.110.42","10.60.110.23"]
indices.recovery.max_bytes_per_sec: 10000mb
cluster.routing.allocation.node_concurrent_recoveries: 10
node.master: true
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
#xpack.license.self_generated.type: basic

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 21, 2020, 11:25am UTC](https://discuss.elastic.co/t/benchmark-fail-50-throw-exception-none-of-the-configured-nodes-were-available/242502/3 "2020-08-21T11:25:41Z")

</div>

Closed on August 21, 2020, 11:25am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
