NoNodeAvailableException error with Hadoop

(Songling Lau) #1

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?

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}{}, {#transport#-2}{SMjopmY2TTuuW5fS0CYMcA}{hadoop5}{}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(
at org.elasticsearch.client.transport.TransportClientNodesService.execute(
at org.elasticsearch.client.transport.TransportProxyClient.execute(
at org.elasticsearch.client.transport.TransportClient.doExecute(
at org.elasticsearch.action.ActionRequestBuilder.execute(
at org.elasticsearch.action.ActionRequestBuilder.execute(
at test.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.hadoop.util.RunJar.main(

(Songling Lau) #2

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

(James Baiera) #3

@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.

(system) #4

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