# Error when trying to insert into the elastic index from java program

**URL:** <https://discuss.elastic.co/t/error-when-trying-to-insert-into-the-elastic-index-from-java-program/277787>\
**Category:** Elasticsearch\
**Created:** [July 5, 2021, 8:17am UTC](https://discuss.elastic.co/t/error-when-trying-to-insert-into-the-elastic-index-from-java-program/277787 "2021-07-05T08:17:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karim.zahar](https://avatars.discourse-cdn.com/v4/letter/k/7cd45c/32.png) [@karim.zahar](https://discuss.elastic.co/u/karim.zahar)\
**Post date:** [July 5, 2021, 8:17am UTC](https://discuss.elastic.co/t/error-when-trying-to-insert-into-the-elastic-index-from-java-program/277787/1 "2021-07-05T08:17:50Z")

</div>

hello,

I am getting the error bellow when trying to insert new rows into the elastic index, from a java program, the error is random:

```auto
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{X-6AmoEXTTe3AA0mZlVwbw}{10.100.115.XXX}{10.100.115.XXX:9300}]
        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:240) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:44) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:380) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:402) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:390) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:34) ~[elasticsearch-7.13.2.jar!/:7.13.2]
        at ma.eai.logloading.DbLoader.loadMapProxy(DbLoader.java:720) ~[classes!/:13.0]
        at ma.eai.logloading.FileLoader.loadProxyFileToDb(FileLoader.java:366) [classes!/:13.0]
        at ma.eai.logloading.FileLoader.loadFileToDb(FileLoader.java:49) [classes!/:13.0]
        at ma.eai.elastic.standaloneelastic.LogLoaderCommandLineRunner.run(LogLoaderCommandLineRunner.java:289) [classes!/:13.0]
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:781) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at ma.eai.elastic.standaloneelastic.StandaloneElasticExampleApplication.main(StandaloneElasticExampleApplication.java:12) [classes!/:13.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) ~[na:1.8.0]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[na:1.8.0]
        at java.lang.reflect.Method.invoke(Method.java:508) ~[na:1.8.0]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [standalone-elastic-12.0.jar:13.0]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [standalone-elastic-12.0.jar:13.0]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [standalone-elastic-12.0.jar:13.0]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [standalone-elastic-12.0.jar:13.0]

```

the elastic version used is 7.8.0 on a redhat 8.1

**here is my elastic config yml:**

cluster.name: myapplikibana  
node.name: node-1  
path.data: /elastic/data  
path.logs: /elastic/logs  
transport.tcp.port: 9300  
http.port: 9200  
network.host: 10.100.115.XXX  
http.bind\_host: 0.0.0.0  
http.publish\_host: 10.100.115.XXX  
transport.host: 0.0.0.0  
cluster.initial\_master\_nodes: ["node-1"]  
http.cors.enabled : true  
http.cors.allow-origin : "\*"  
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE  
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length

thank you

---

<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 2, 2021, 8:17am UTC](https://discuss.elastic.co/t/error-when-trying-to-insert-into-the-elastic-index-from-java-program/277787/2 "2021-08-02T08:17:56Z")

</div>

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