NoNodeAvailableException error with Hadoop

There is a wired problem that when I run my jar using java command,the code can run without any error.But it throws NoNodeAvailableException when I use hadoop or spark-submit.I'v checked all the configurations.Someone tell me what I missed?

Details:
If I run the jar like:
java -jar es-1.0-SNAPSHOT.jar 6 2016 11 21 elasticsearch wireless
It fetches hits successfully.

[hadoop@hadoop10 ~]$ hadoop jar es-1.0-SNAPSHOT.jar 1 2016 1 1 elasticsearch wireless
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{89xrLH2hRjG6u9aViy9GVQ}{hadoop10}{192.168.100.60:9300}, {#transport#-2}{SMjopmY2TTuuW5fS0CYMcA}{hadoop5}{192.168.100.55:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:348)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:246)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:366)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
at ES.Search.search(Search.java:53)
at test.main(test.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

I even changed "client.transport.sniff" to false.There are the client connecting codes:
Settings settings = Settings.builder()
.put("cluster.name", INDXInfo.CLUSTER)
.put("client.transport.sniff", false)
.build();
client = new PreBuiltTransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(INDXInfo.HOST), INDXInfo.PORT))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(INDXInfo.HOST1), INDXInfo.PORT));

@Songling_Lau Could you increase the logging level of the elasticsearch packages and post their output here? This doesn't seem to be related to ES-Hadoop specifically, but I'll try and take a look at it if you can provide any logs.

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