Elasticdump中的'现在不能切换到旧模式'错误
我尝试使用elasticdump(在Node.js上)备份和恢复Elasticsearch中的json索引:
[备份]
elasticdump --input=http://cred:entials@myserver.com:9200/.kibana --output=kibana.json --type=data
(Works)
[恢复]
elasticdump --output=http://cred:entials@myserver.com:9200/.kibana --input=kibana.json --type=data
(给出错误)
错误是:
_stream_readable.js:749 throw new Error('Cannot switch to old mode now.'); ^ Error: Cannot switch to old mode now. at emitDataEvents (_stream_readable.js:749:11) at ReadStream.Readable.pause (_stream_readable.js:740:3) at file.completeBatch (/usr/lib/node_modules/elasticdump/lib/transports/file.js:75:19) at Stream.<anonymous> (/usr/lib/node_modules/elasticdump/lib/transports/file.js:65:10) at Stream.emit (events.js:117:20) at drain (/usr/lib/node_modules/elasticdump/node_modules/through/index.js:34:23)
有谁知道发生了什么事以及如何解决?
您的节点版本已过时。
尝试运行node --version
,如果你得到任何低于1.0.0,那么你需要升级您的本地版本的节点。
为了在本地pipe理多个节点版本,您可以使用n
模块 。 只需运行以下步骤
sudo npm install -gn sudo n stable
然后您将安装最新版本的节点,并且elasticdump将再次运行。
- RangeError:在node_modules – > elasticsearch中超出最大调用堆栈大小
- 弹性search在启动时嗅探没有活的连接
- ElasticSearch – 聚合/分组:通过sorting和分页
- 弹性search返回IndexMissingException
- Elasticsearch部署在2服务器负载均衡节点js应用程序设置中
- Elasticsearch聚合部分string,而不是全部string
- 如何删除使用node.js的弹性search中的所有索引?
- Mac OS X上的ElasticSearch + Node Yosemite:JRE崩溃?
- 在nodejs中使用elasticsearch获取基于属性值的文档