我尝试使用esvm
工具运行两个群集。但是,我一直收到这个错误:
esvm --list 2m3d 2m3d-v2
> /usr/lib/node_modules/esvm/node_modules/rcfinder/index.js:138
> if (sync && err) throw err;
> ^
>
> SyntaxError: Unexpected string in JSON at position 780
> at Object.parse (native)
> at RcFinder.loader (/usr/lib/node_modules/esvm/node_modules/rcfinder/index.js:20:17)
> at get (/usr/lib/node_modules/esvm/node_modules/rcfinder/index.js:68:18)
> at respond (/usr/lib/node_modules/esvm/node_modules/rcfinder/index.js:112:37)
> at RcFinder.find (/usr/lib/node_modules/esvm/node_modules/rcfinder/index.js:158:14)
> at RcLoader.for (/usr/lib/node_modules/esvm/node_modules/rcloader/index.js:76:43)
> at Object.<anonymous> (/usr/lib/node_modules/esvm/bin/esvm.js:19:26)
> at Module._compile (module.js:541:32)
> at Object.Module._extensions..js (module.js:550:10)
> at Module.load (module.js:458:32)
> at tryModuleLoad (module.js:417:12)
> at Function.Module._load (module.js:409:3)
> at Module.runMain (module.js:575:10)
> at run (bootstrap_node.js:352:7)
> at startup (bootstrap_node.js:144:9)
> at bootstrap_node.js:467:3
表示.esvmrc
,内容如下:
{
"clusters": {
"2m3d": {
"plugins": ["mobz/elasticsearch-head"],
"nodes": [
{
"cluster": { "name": "2m3d" },
"node": { "name": "master-1", "data": false, "master": true }
},
{
"cluster": { "name": "2m3d" },
"node": { "name": "master-2", "data": false, "master": true }
},
{
"cluster": { "name": "2m3d" },
"node": { "name": "data-1", "data": true, "master": false }
},
{
"cluster": { "name": "2m3d" },
"node": { "name": "data-2", "data": true, "master": false }
},
{
"cluster": { "name": "2m3d" },
"node": { "name": "data-3", "data": true, "master": false }
}
]
}
"2m3d-v2": {
"plugins": ["mobz/elasticsearch-head"],
"nodes": [
{
"cluster": { "name": "2m3d-v2" },
"node": { "name": "master-1", "data": false, "master": true }
},
{
"cluster": { "name": "2m3d-v2" },
"node": { "name": "master-2", "data": false, "master": true }
},
{
"cluster": { "name": "2m3d-v2" },
"node": { "name": "data-1", "data": true, "master": false }
},
{
"cluster": { "name": "2m3d-v2" },
"node": { "name": "data-2", "data": true, "master": false }
},
{
"cluster": { "name": "2m3d-v2" },
"node": { "name": "data-3", "data": true, "master": false }
}
]
}
}
}