rancher / catalog-dockerfiles

Dockerfiles for Rancher Catalog containers
Apache License 2.0
131 stars 102 forks source link

MongoDb - cluster running on one machine #93

Open lezi1022 opened 7 years ago

lezi1022 commented 7 years ago

i run mongo-cluster on one machine, but the cluster seems not ready.

here is an mongo instance

rs0:PRIMARY> rs.conf()
{
    "_id" : "rs0",
    "version" : 1,
    "protocolVersion" : NumberLong(1),
    "members" : [
        {
            "_id" : 0,
            "host" : "MongoDB-mongo-cluster-1:27017",
            "arbiterOnly" : false,
            "buildIndexes" : true,
            "hidden" : false,
            "priority" : 1,
            "tags" : {

            },
            "slaveDelay" : NumberLong(0),
            "votes" : 1
        }
    ],
    "settings" : {
        "chainingAllowed" : true,
        "heartbeatIntervalMillis" : 2000,
        "heartbeatTimeoutSecs" : 10,
        "electionTimeoutMillis" : 10000,
        "getLastErrorModes" : {

        },
        "getLastErrorDefaults" : {
            "w" : 1,
            "wtimeout" : 0
        },
        "replicaSetId" : ObjectId("589ae4c47a9700c0bd526102")
    }
}

and another

> rs.conf()
2017-02-08T10:56:30.593+0000 E QUERY    [thread1] Error: Could not retrieve replica set config: {
    "info" : "run rs.initiate(...) if not yet done for the set",
    "ok" : 0,
    "errmsg" : "no replset config has been received",
    "code" : 94
} :
rs.conf@src/mongo/shell/utils.js:1197:11

@galal-hussein

brettneese commented 7 years ago

i also have this problem.

i think https://github.com/rancher/catalog-dockerfiles/pull/92 solves this, but it's been open for over a month.

cc: @cloudnautique