Unable to export data to elastic search

log4j:WARN No appenders could be found for logger (org.elasticsearch.plugins).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Driver Correct
Connection Succesful
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{00.00.00.100}{00.00.00.100:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:290)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:207)
at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:288)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:348)
at org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:366)
at com.syrajson.test.TestSyra.main(TestSyra.java:81)

This looks like an unusual IP address. Is this really correct?

Ip addres is not correct .. actual ip address is different

Is it reachable from the host you are logging from?

Yes i am able to reach with my shell script and able to load the data into elastic search.

i am trying to load the data using java api .. my program failed to load the data into elastic search

	int count = 0;
	String ipAddress = "00.00.00.100"; // actual ip address is different 
	Settings settings = /*Immutable*/Settings.settingsBuilder()
            .put("client.transport.sniff",true)
            .build();
	
	Client client = new TransportClient.Builder().settings(settings).build()
    .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(ipAddress),9300));
	

	Connection connection = DatabasePlugin.getBRMConnection();
	try {
	
		String sql = "select name,poid_id0,descr from product_t";

		PreparedStatement preStatement = connection.prepareStatement(sql);

		ResultSet result = preStatement.executeQuery();

	
		while (result.next() && count < 1000) {
			
			JSONArray jsArr = convert(result);
			for (int i = 0; i < jsArr.length(); i++) {
				JSONObject jsObj = jsArr.getJSONObject(i);
				Product product = new Product();
				product.setName(jsObj.getString("NAME"));
				product.setPoidId0(jsObj.getInt("POID_ID0"));
				product.setDescr(jsObj.getString("DESCR"));
				
				IndexRequest indexRequest = new IndexRequest("catalogue_data1","product", UUID.randomUUID().toString());
				indexRequest.source(new Gson().toJson(product));
				IndexResponse response = client.index(indexRequest).actionGet();
				System.out.println(response.getIndex());
			    System.out.println(response.getType());
			    System.out.println(response.getVersion());
			}

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