elasticsearch-Elasticsearch修改集群名字后索引数据失败
Jun 06, 2016 am 09:37 AMelasticsearchmysql集群river
我在公司局域网里面搭了两个es,默认的cluster.name都是elasticsearch,他们自动建集群了,然而这不是想要的结果,我要他们各自同步不同的数据,于是我改了elasticsearch.yml文件,只修改了cluster.name值,但是改了之后同步脚本执行不了,同步脚本如下:
<code>echo '{ "type" : "jdbc", "jdbc" : { "url" : "'$kburl'", "user" : "'$kbuser'", "password" : "'$kbpassword'", "sql" : "select t.id as _id,t.title,t.keyword,t.contentText,t.releaseUser,t.releaseDate from tb_information t where t.status=3", "index" : "kb", "type" : "tb_information" }}' | java \ -cp "${lib}/*" \ -Dlog4j.configurationFile=${bin}/log4j2.xml \ org.xbib.tools.Runner \ org.xbib.tools.JDBCImporter</code>
登录后复制
org.xbib.tools.JDBCImporter这里面报错了,异常如下:
<code> [11:43:58,484][INFO ][BaseTransportClient ][pool-2-thread-1] trying to connect to [inet[localhost/127.0.0.1:9300]][11:43:58,601][WARN ][org.elasticsearch.client.transport][pool-2-thread-1] [importer] node [#transport#-1][vhost001.szrjk][inet[localhost/127.0.0.1:9300]] not part of the cluster Cluster [elasticsearch], ignoring...[11:43:58,602][ERROR][importer ][pool-2-thread-1] error while getting next input: no cluster nodes available, check settings {cluster.name=elasticsearch, port=9300, sniff=false, autodiscover=false, name=importer, client.transport.ignore_cluster_name=false, client.transport.ping_timeout=5s, client.transport.nodes_sampler_interval=5s}org.elasticsearch.client.transport.NoNodeAvailableException: no cluster nodes available, check settings {cluster.name=elasticsearch, port=9300, sniff=false, autodiscover=false, name=importer, client.transport.ignore_cluster_name=false, client.transport.ping_timeout=5s, client.transport.nodes_sampler_interval=5s} at org.xbib.elasticsearch.support.client.BaseTransportClient.createClient(BaseTransportClient.java:53) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.support.client.BaseIngestTransportClient.newClient(BaseIngestTransportClient.java:22) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.support.client.transport.BulkTransportClient.newClient(BulkTransportClient.java:88) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext$1.create(StandardContext.java:440) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardSink.beforeFetch(StandardSink.java:94) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext.beforeFetch(StandardContext.java:207) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.elasticsearch.jdbc.strategy.standard.StandardContext.execute(StandardContext.java:188) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.tools.JDBCImporter.process(JDBCImporter.java:117) ~[elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.tools.Importer.newRequest(Importer.java:241) [elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.tools.Importer.newRequest(Importer.java:57) [elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:86) [elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at org.xbib.pipeline.AbstractPipeline.call(AbstractPipeline.java:17) [elasticsearch-jdbc-1.6.0.0-uberjar.jar:?] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79][11:43:58,622][WARN ][BulkTransportClient ][Thread-1] no client</code>
登录后复制
从上面可以看出他还是找elasticsearch这个集群,感觉设置那个cluster.name没生效,但是在页面上看到cluster.name已经改过来了。
在同步脚本上加上下面属性也是一样:
<code> "elasticsearch" : { "cluster" : "elastic search.dev", "host" : "localhost", "port" : 9300 },</code>
登录后复制
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热门文章
仓库:如何复兴队友
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
击败分裂小说需要多长时间?
3 周前
By DDD
R.E.P.O.能量晶体解释及其做什么(黄色晶体)
1 周前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
公众号网页更新缓存难题:如何避免版本更新后旧缓存影响用户体验?
3 周前
By 王林

热门文章
仓库:如何复兴队友
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
击败分裂小说需要多长时间?
3 周前
By DDD
R.E.P.O.能量晶体解释及其做什么(黄色晶体)
1 周前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
公众号网页更新缓存难题:如何避免版本更新后旧缓存影响用户体验?
3 周前
By 王林

热门文章标签

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

在 Linux 中运行 MySQl(有/没有带有 phpmyadmin 的 podman 容器)

哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什么?
