问题描述
我正在尝试使用传输器插件创建一个管道来同步 MongoDB 数据库和 ElasticSearch。为此,我使用了 Linux 虚拟机 (ubuntu)。
我创建了一个包含以下数据的 MongoDB 集合 my_application:
db.users.find().pretty();
{
"_id" : ObjectId("6008153cf979ac0f18681765"),"firstName" : "Sammy","lastName" : "Shark"
}
{
"_id" : ObjectId("60081544f979ac0f18681766"),"firstName" : "Gilly","lastName" : "Glowfish"
}
我配置了 ElasticSearch 和传输管道,现在导出了 MongoDB_URI 和 Elastic_URI。 然后我运行我的 transporter pipeline.js 来获得这个:
INFO[0005] metrics source records: 2 path=source ts=1611154492641006368
INFO[0005] metrics source/sink records: 2 path="source/sink" ts=1611154492641013556
然后我尝试查看我的 ElasticSearch 但得到这个错误:
curl $ELASTICSEARCH_URI/_search?pretty=true
{
"error" : {
"root_cause" : [
{
"type" : "cluster_block_exception","reason" : "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"
}
],"type" : "cluster_block_exception","reason" : "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"
},"status" : 503
}
这是我的 elasticsearch.yml:
# Use a descriptive name for the node:
node.name: node-1
path.data: /var/lib/elasticsearch
# Path to log files:
path.logs: /var/log/elasticsearch
# Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 0.0.0.0
# Set a custom port for HTTP:
http.port: 9200
# Bootstrap the cluster using an initial set of master-eligible nodes:
cluster.initial_master_nodes: ["node-1","node-2"]
这是我的弹性搜索节点:
{
"name" : "node-1","cluster_name" : "elasticsearch","cluster_uuid" : "_na_","version" : {
"number" : "7.7.1","build_flavor" : "default","build_type" : "deb","build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423","build_date" : "2020-05-28T16:30:01.040088Z","build_snapshot" : false,"lucene_version" : "8.5.1","minimum_wire_compatibility_version" : "6.8.0","minimum_index_compatibility_version" : "6.0.0-beta1"
},"tagline" : "You KNow,for Search"
}
我尝试删除索引并重新启动服务器,但错误重复出现。想知道这个问题的解决办法。我正在使用弹性搜索 7.10
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)