0

我正在尝试使用传输器插件来创建一个管道来同步 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。然后我运行我的传输器 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

4

0 回答 0