无法在Ubuntu中启动副本集 [英] Can't initiate replica set in Ubuntu

查看:126
本文介绍了无法在Ubuntu中启动副本集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我输入: rs.initiate(),我得到以下错误信息:

  {
info2:没有明确指定配置 - 制作一个,
me:VMHOSTNAME:27017,
ok:0 ,
errmsg:没有在新配置1中描述的副本集rs0映射到此节点的主机,
code:93
}

我在谷歌云引擎下运行最新的MongoDB。



任何关于如何解决这个问题的建议?

解决方案

您的VMHOSTNAME必须是/ etc / hosts文件中的127.0.0.1的别名,让它工作。



请看这里 https://jira.mongodb .org / browse / SERVER-16157

Whenever I type: rs.initiate(), I get the following error message:

{
    "info2" : "no configuration explicitly specified -- making one",
    "me" : "VMHOSTNAME:27017",
    "ok" : 0,
    "errmsg" : "No host described in new configuration 1 for replica set rs0 maps to this node",
    "code" : 93
}

I'm running under google-cloud-engine with latest MongoDB.

Any suggestions on how to solve this?

解决方案

Your VMHOSTNAME must be an alias for 127.0.0.1 in your /etc/hosts file to make it work.

See here https://jira.mongodb.org/browse/SERVER-16157

这篇关于无法在Ubuntu中启动副本集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆