shading rs.initiate() 오류

mongoDB 에서 sharding 설정시,


첫번째 node를 primary로 설정시 rs.initiate()로 설정할 수 있으나, 아래와 같은 오류가 발생하는 경우가 발생


 







[root@loony22-test1 mongodb]# ./mongo mongodbtest:30000
MongoDB shell version: 2.0.6
connecting to: mongodbtest:30000/test


 > rs.initiate()
{
        “info2” : “no configuration explicitly specified — making one”,
        “me” : “mongodbtest:30000”,
        “errmsg” : “couldn’t initiate : can’t find self in the replset config my port: 30000”,
        “ok” : 0
}


 






$ sudo hostname (name chosen above including the .local at the end)

LINUX에서 HOSTNAME확인후 표시되는 HOSTNAME으로 mongo 접근


[root@mongodbtest mongodb]# ./mongo hostname:30000
MongoDB shell version: 2.0.6
connecting to: hostname:30000/test
> rs.initiate()
{
        “info2” : “no configuration explicitly specified — making one”,
        “me” : “hostname:30000”,
        “info” : “Config now saved locally.  Should come online in about a minute.”,
        “ok” : 1
}
>


 


참고 URL :  http://www.mongodb.org/display/DOCS/Replica+Sets+Troubleshooting

답글 남기기

이메일 주소는 공개되지 않습니다.