将我的复制设置到远程弹性搜索集群时出现问题
Posted
技术标签:
【中文标题】将我的复制设置到远程弹性搜索集群时出现问题【英文标题】:Problem setting up my replication to my remote elasticsearch cluster 【发布时间】:2019-08-22 14:56:30 【问题描述】:我在设置复制到我创建的 elasticsearch 远程集群时遇到问题。这是我在 cb UI 和 curl 中遇到的错误。
"errors":"toBucket":"验证目标存储桶'bankable'时出错。err=获取存储桶信息失败。"
运行 Couchbase Community Edition 5.0.1 build 5003
运行 ElasticSearch 版本“5.4.0”
“名称”:“MtQ6ijh”, “cluster_name”:“弹性搜索”, “cluster_uuid”:“rKKA-zCvQGCGZN_tCUm8dQ”, “版本” : “数字”:“5.4.0”, “build_hash”:“780f8c4”, “build_date”:“2017-04-28T17:43:27.229Z”, “build_snapshot”:假, “lucene_version”:“6.5.0” , “标语”:“你知道,搜索”
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
couchbase.password: [correctPass]
couchbase.username: [correctUser]
couchbase.port: 9091
couchbase.maxConcurrentRequests: 1024
http.cors.enabled: true
http.cors.allow-origin : /http://localhost(:[0-9]+)?/
couchbase.ignoreFailures: true
couchbase.keyFilter: org.elasticsearch.transport.couchbase.capi.RegexKeyFilter
couchbase.keyFilter.type: exclude
couchbase.keyFilter.keyFiltersRegex.Histoty: ^Histo.*$
【问题讨论】:
我一定错过了像 ES 存储桶创建或分片创建这样的东西,不确定是否有任何帮助。 【参考方案1】:Couchbase Elasticsearch 连接器的版本 3 要求目标索引已经存在。您需要先在 Elasticsearch 中创建“可银行”索引。
如果这不是问题,请查看 Elasticsearch 日志;版本 3 的任何连接器错误消息都会出现在此处。
顺便说一句,我强烈建议升级到连接器的第 4 版。它使用更强大的复制机制,是未来发展的重点。
免责声明:我在 Couchbase 工作并维护 Elasticsearch 连接器。
【讨论】:
以上是关于将我的复制设置到远程弹性搜索集群时出现问题的主要内容,如果未能解决你的问题,请参考以下文章
如何将本地elasticsearch实例复制/复制/同步/备份到远程elasticsearch实例
在 AWS 上将 AJAX 用于弹性搜索时出现 CORS 问题
如何正确使用 pg_dump 将我的本地数据库复制到远程服务器
将 db 从资产复制到设备数据文件夹时出现 FileNotFoundException