连接Janusgraph时报Unable to determine Elasticsearch server version. Default to FIVE.异常

连接Janusgraph时报Unable to determine Elasticsearch server version. Default to FIVE.异常

采用的 janusgraph + hbase + es的集群模式,但通过gremlin.sh的console连接janusgraph服务时的如下错:

gremlin> graph = JanusGraphFactory.open('conf/janusgraph-hbase-es.properties');
12:17:34 WARN  org.janusgraph.diskstorage.es.rest.RestElasticSearchClient  - Unable to determine Elasticsearch server version. Default to FIVE.
java.net.ConnectException: Connection refused
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:952)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:274)
	at org.janusgraph.diskstorage.es.rest.RestElasticSearchClient.getMajorVersion(RestElasticSearchClient.java:118)
	at org.janusgraph.diskstorage.es.rest.RestElasticSearchClient.<init>(RestElasticSearchClient.java:101)
	at org.janusgraph.diskstorage.es.rest.RestClientSetup.getElasticSearchClient(RestClientSetup.java:107)
	at org.janusgraph.diskstorage.es.rest.RestClientSetup.connect(RestClientSetup.java:74)
	at org.janusgraph.diskstorage.es.ElasticSearchSetup$1.connect(ElasticSearchSetup.java:50)
	at org.janusgraph.diskstorage.es.ElasticSearchIndex.interfaceConfiguration(ElasticSearchIndex.java:379)
	at org.janusgraph.diskstorage.es.ElasticSearchIndex.<init>(ElasticSearchIndex.java:295)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:58)
	at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:440)
	at org.janusgraph.diskstorage.Backend.getIndexes(Backend.java:427)
	at org.janusgraph.diskstorage.Backend.<init>(Backend.java:150)

经过排查,原来是conf/janusgraph-hbase-es.properties配置有问题。

index.search.hostname=127.0.0.1
改成:
index.search.hostname=192.168.1.244,192.168.1.245,192.168.1.246

然后再启动情况如下:
在这里插入图片描述
发现hbase还是127.0.0.1不是集群的,所以再将hbase的配置改一下。
即将:storage.hostname=127.0.0.1
改成:storage.hostname=192.168.1.244,192.168.1.245,192.168.1.246
然后再次访问情况如下:
在这里插入图片描述

发布了32 篇原创文章 · 获赞 18 · 访问量 20万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览