Data Exploration using Elastic Search and Kibana

dataexploration

#1

Friends,
My machine has ES as folloiws
{
“name” : “HlcvjJU”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “cRu6TDQNSkW9jFeF6IvvyQ”,
“version” : {
“number” : “6.3.1”,
“build_flavor” : “default”,
“build_type” : “tar”,
“build_hash” : “eb782d0”,
“build_date” : “2018-06-29T21:59:26.107521Z”,
“build_snapshot” : false,
“lucene_version” : “7.3.1”,
“minimum_wire_compatibility_version” : “5.6.0”,
“minimum_index_compatibility_version” : “5.0.0”
},
“tagline” : “You Know, for Search”
}

I am using Kibana version : 6.3.1

While doing the tutorial to perform Data Exploration using Elastic Search and Kibana (using Python), I am getting the following errors.

DELETE /loan_prediction_train [status:404 request:0.004s]
PUT /loan_prediction_train [status:406 request:0.003s]

TransportError Traceback (most recent call last)
~/anaconda3/lib/python3.6/site-packages/pyelasticsearch/client.py in send_request(self, method, path_components, body, query_params)
275 for k, v in iteritems(query_params)),
–> 276 body=body)
277 except SerializationError as exc:

~/anaconda3/lib/python3.6/site-packages/elasticsearch/transport.py in perform_request(self, method, url, params, body)
306 try:
–> 307 status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
308

~/anaconda3/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py in perform_request(self, method, url, params, body, timeout, ignore)
92 self.log_request_fail(method, url, body, duration, response.status)
—> 93 self._raise_error(response.status, raw_data)
94

~/anaconda3/lib/python3.6/site-packages/elasticsearch/connection/base.py in _raise_error(self, status_code, raw_data)
104
–> 105 raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
106

TransportError: TransportError(406, ‘Content-Type header [] is not supported’)

During handling of the above exception, another exception occurred:

ElasticHttpError Traceback (most recent call last)
in ()
----> 1 index_data(train_data_path, CHUNKSIZE, index_name_train, doc_type_train) # Indexing train data

in index_data(data_path, chunksize, index_name, doc_type)
7 except :
8 pass
----> 9 es.create_index(index_name)
10 #es.index(index=‘index_name_test’,doc_type=‘people’, id=1 , body={‘author’: ‘John Doe’,
11 #‘blog’: ‘Learning Elasticsearch’,

~/anaconda3/lib/python3.6/site-packages/pyelasticsearch/client.py in decorate(*args, **kwargs)
91 elif k in convertible_args:
92 query_params[k] = kwargs.pop(k)
—> 93 return func(*args, query_params=query_params, **kwargs)
94 return decorate
95 return decorator

~/anaconda3/lib/python3.6/site-packages/pyelasticsearch/client.py in create_index(self, index, settings, query_params)
1032 “”"
1033 return self.send_request(‘PUT’, [index], body=settings or {},
-> 1034 query_params=query_params)
1035
1036 @es_kwargs()

~/anaconda3/lib/python3.6/site-packages/pyelasticsearch/client.py in send_request(self, method, path_components, body, query_params)
283 status = exc.args[0]
284 error_message = exc.args[1]
–> 285 self._raise_exception(status, error_message)
286
287 return prepped_response

~/anaconda3/lib/python3.6/site-packages/pyelasticsearch/client.py in _raise_exception(self, status, error_message)
298 error_class = IndexAlreadyExistsError
299
–> 300 raise error_class(status, error_message)
301
302 def _encode_json(self, value):

ElasticHttpError: (406, ‘Content-Type header [] is not supported’)

Please help to resolve this issue.

Sachin