elasticsearch.exceptions.TransportError:TransportError(N / A,'无法嗅探主机。')

时间:2016-12-06 02:09:29

标签: python elasticsearch

我在ubuntu VM上安装了Elasticsearch,只有一个节点。当我索引数据时,错误如下:

  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/client/__init__.py", line 452, in update
    doc_type, id, '_update'), params=params, body=body)
  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/transport.py", line 324, in perform_request
    connection = self.get_connection()
  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/transport.py", line 181, in get_connection
    self.sniff_hosts()
  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/transport.py", line 250, in sniff_hosts
    node_info = self._get_sniff_data(initial)
  File "/data/apps/ecoboost/eggs/elasticsearch-2.4.0-py2.7.egg/elasticsearch/transport.py", line 213, in _get_sniff_data
    raise TransportError("N/A", "Unable to sniff hosts.")
elasticsearch.exceptions.TransportError: TransportError(N/A, 'Unable to sniff hosts.')

ES客户端配置:

es_client = Elasticsearch(settings.ELASTICSEARCH_DATA_NODES,
                                 sniff_on_start=False,
                                 sniff_on_connection_fail=True,
                                 sniffer_timeout=60)

如何理解嗅探主机?如何解决这个问题呢?希望有人能帮助我,提前谢谢!

0 个答案:

没有答案