当前位置: 首页 > 工具软件 > Mongo Search > 使用案例 >

mongo连接oracle,使用mongo-connector连接mongodb和elasticsearch

元玮
2023-12-01

我是弹性搜索的新手,我试图将它与mongodb连接起来 . 我试着用mongo-connector做到这一点 . 所以我正在运行mongod,这是我得到的输出:

2016-11-21T10:03:24.213+0200 I CONTROL [initandlisten] MongoDB starting : pid=7244 port=27017 dbpath=C:\data\db\ 64-bit host=DESKTOP-7QLMJRC

2016-11-21T10:03:24.215+0200 I CONTROL [initandlisten] targetMinOS: Windows Vista/Windows Server 2008

2016-11-21T10:03:24.216+0200 I CONTROL [initandlisten] db version v3.2.4

2016-11-21T10:03:24.216+0200 I CONTROL [initandlisten] git version: e2ee9ffcf9f5a94fad76802e28cc978718bb7a30

2016-11-21T10:03:24.217+0200 I CONTROL [initandlisten] allocator: tcmalloc

2016-11-21T10:03:24.217+0200 I CONTROL [initandlisten] modules: none

2016-11-21T10:03:24.217+0200 I CONTROL [initandlisten] build environment:

2016-11-21T10:03:24.217+0200 I CONTROL [initandlisten] distarch: x86_64

2016-11-21T10:03:24.217+0200 I CONTROL [initandlisten] target_arch: x86_64

2016-11-21T10:03:24.218+0200 I CONTROL [initandlisten] options: {}

2016-11-21T10:03:24.220+0200 I - [initandlisten] Detected data files in C:\data\db\ created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.

2016-11-21T10:03:24.223+0200 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=8G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),

2016-11-21T10:03:24.886+0200 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker

2016-11-21T10:03:24.886+0200 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/data/db/diagnostic.data'

2016-11-21T10:03:24.891+0200 I NETWORK [initandlisten] waiting for connections on port 27017

然后我运行elasticsearch,这是我得到的输出:

[2016-11-21T10:07:33,859][INFO ][o.e.n.Node ] [] initializing ...

[2016-11-21T10:07:33,945][INFO ][o.e.e.NodeEnvironment ] [YzvQTk1] using [1] data paths, mounts [[(C:)]], net usable_space [66.7gb], net total_space [223.1gb], spins? [unknown], types [NTFS]

[2016-11-21T10:07:33,946][INFO ][o.e.e.NodeEnvironment ] [YzvQTk1] heap size [1.9gb], compressed ordinary object pointers [true]

[2016-11-21T10:07:33,947][INFO ][o.e.n.Node ] [YzvQTk1] node name [YzvQTk1] derived from node ID; set [node.name] to override

[2016-11-21T10:07:33,954][INFO ][o.e.n.Node ] [YzvQTk1] version[5.0.1], pid[6968], build[080bb47/2016-11-11T22:08:49.812Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_111/25.111-b14]

[2016-11-21T10:07:35,406][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [aggs-matrix-stats]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [ingest-common]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [lang-expression]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [lang-groovy]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [lang-mustache]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [lang-painless]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [percolator]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [reindex]

[2016-11-21T10:07:35,407][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [transport-netty3]

[2016-11-21T10:07:35,408][INFO ][o.e.p.PluginsService ] [YzvQTk1] loaded module [transport-netty4]

[2016-11-21T10:07:35,408][INFO ][o.e.p.PluginsService ] [YzvQTk1] no plugins loaded

[2016-11-21T10:07:39,324][INFO ][o.e.n.Node ] [YzvQTk1] initialized

[2016-11-21T10:07:39,325][INFO ][o.e.n.Node ] [YzvQTk1] starting ...

[2016-11-21T10:07:39,924][INFO ][o.e.t.TransportService ] [YzvQTk1] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}

[2016-11-21T10:07:44,059][INFO ][o.e.c.s.ClusterService ] [YzvQTk1] new_master {YzvQTk1}{YzvQTk1WT_asjjzSFEeaOw}{DhwO889xQDGHqsQuKBkq4Q}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)

[2016-11-21T10:07:44,145][INFO ][o.e.g.GatewayService ] [YzvQTk1] recovered [0] indices into cluster_state

[2016-11-21T10:07:44,577][INFO ][o.e.h.HttpServer ] [YzvQTk1] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}

[2016-11-21T10:07:44,577][INFO ][o.e.n.Node ] [YzvQTk1] started

然后我运行mongo-connector用这个命令连接它们:“mongo-connector -m localhost:27017 -t localhost:9200 -d elastic_doc_manager”

输出为: Logging to mongo-connector.log.

我得到的输出是:

"error" : {

"root_cause" : [

{

"type" : "index_not_found_exception",

"reason" : "no such index",

"resource.type" : "index_or_alias",

"resource.id" : "foo",

"index_uuid" : "_na_",

"index" : "foo"

}

],

"type" : "index_not_found_exception",

"reason" : "no such index",

"resource.type" : "index_or_alias",

"resource.id" : "foo",

"index_uuid" : "_na_",

"index" : "foo"

},“状态”:404}

所以连接失败了,但我不知道为什么 .

我的弹性搜索没有插件,我读了一些有关副本集的内容,但我不确定我知道它是什么,也许这就是problam . 我的mongo数据库在我的内部存储中 .

请帮我!我做错了什么,或者我应该怎么做才能在mongo和elasticsearch之间同步数据 . 我已经阅读了关于河流插件的内容,但是我没有安装它,所以如果这是答案,请告诉我如何在Windows上安装它,我找到的所有教程都在linux上 .

我真的需要一些帮助,因为我坚持了太长时间 .

 类似资料: