Intermittent unknown host exception in elasticsearch

Hi Team,

I am getting intermittently, unknown host exception while bulk inserting data in elasticsearch.

[INFO ] 2019-08-05 07:29:54.859 [pool-4-thread-1] ElasticSearchRestClient - Total Time taken: 1326
[INFO ] 2019-08-05 07:29:55.158 [pool-4-thread-2] ElasticSearchRestClient - Total Time taken: 1074

These were success messages and suddenly the error started

[ERROR] 2019-08-05 07:29:55.418 [pool-4-thread-4] ElasticSearchRestClient - Error in bulkUpdate with Type: java.net.UnknownHostException: xxxxxxxx.southcentralus.cloudapp.azure.com: unknown error
[ERROR] 2019-08-05 07:29:55.418 [pool-4-thread-4] ElasticSearchRestClient - Error in bulkUpdate with Type: java.net.UnknownHostException: xxxxxxxx: unknown error
[ERROR] 2019-08-05 07:29:55.418 [pool-4-thread-4] EsMessageHandler - ES-INGEST-FAILURE	
java.net.UnknownHostException: xxxxxxxx.southcentralus.cloudapp.azure.com: unknown error

at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_77]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[?:1.8.0_77]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[?:1.8.0_77]
at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[?:1.8.0_77]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_77]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_77]
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar!/:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.3.jar!/:4.5.3]
at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:136) ~[jest-6.3.0.jar!/:?]
at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:70) ~[jest-6.3.0.jar!/:?]
at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:63) ~[jest-6.3.0.jar!/:?]

What can be the reasons for these. my ES cluster is deployed in Azure Kubernetes and in pod logs nothing is there.

The code -

try {
Bulk bulk = new Bulk.Builder().defaultIndex(indexName).setHeader("Authorization","Basic xxxxxxxxxxxxxxxxxxxx").defaultType(DEFAULT_DOC_TYPE).addAction(indexDocList).build();
		BulkResult bulkResult = client.execute(bulk);
		if (bulkResult.isSucceeded()) {
			LOG.info("Total Time taken: " + (endTime - startTime));
		} else {
			endTime = System.currentTimeMillis();
			LOG.error("Error in bulk Request: " + bulkResult.getErrorMessage());
			for (BulkResultItem bulkResultItem : bulkResult.getFailedItems()) {
				LOG.error("Error while uploading item " + bulkResultItem.id + " error: " + bulkResultItem.error);
			}
		}
} catch (Exception ex) {
		LOG.error("Total Time taken on failure: " + (endTime - startTime));
		LOG.error("Error in bulkUpdate with Type: " + ex);
	}