Mongo reps do not work on ubuntu 14.04 on aws - "stateStr" : "FATAL",

25 views
Skip to first unread message

Tampa312

unread,
Nov 10, 2014, 11:36:05 PM11/10/14
to mongod...@googlegroups.com

Hi

Why is this happening?  ]I am very concerned with mongo given that I have done the best I can trying to follow the docs. 
 
in /etc/hosts the ip and hostname are set for both servers

and yet..adding a node using this command leads to a corrupt cluster when this shouod be soooo easy.  Both servers have the same config.
'
mongo 111.111.111.111 --eval 'printjson(rs.add("2-shard1-mongo-aws-development-sydney:27017"))'

The mongo docs leave me with no where to go on how to to make a rep set to work


Thanks




mongo 111.111.111.111 --eval 'printjson(rs.status())'
MongoDB shell version: 2.6.5
connecting to: 54.66.146.54/test
{
    "set" : "devSiteminder",
    "date" : ISODate("2014-11-11T04:21:10Z"),
    "myState" : 4,
    "members" : [
        {
            "_id" : 0,
            "name" : "1-shard1-mongo-aws-development-sydney:27017",
            "health" : 1,
            "state" : 4,
            "stateStr" : "FATAL",
            "uptime" : 539,
            "optime" : Timestamp(1415678624, 1),
            "optimeDate" : ISODate("2014-11-11T04:03:44Z"),
            "self" : true
        },
        {
            "_id" : 1,
            "name" : "2-shard1-mongo-aws-development-sydney:27017",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 523,
            "optime" : Timestamp(1415677283, 1),
            "optimeDate" : ISODate("2014-11-11T03:41:23Z"),
            "lastHeartbeat" : ISODate("2014-11-11T04:21:09Z"),
            "lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
            "pingMs" : 1,
            "electionTime" : Timestamp(1415679145, 11),
            "electionDate" : ISODate("2014-11-11T04:12:25Z")
        }
    ],
    "ok" : 1
}




On the other node
 mongo 222.222.222.222  --eval 'printjson(rs.status())'
MongoDB shell version: 2.6.5
connecting to: 54.66.234.102/test
{
    "set" : "devSiteminder",
    "date" : ISODate("2014-11-11T04:20:57Z"),
    "myState" : 1,
    "members" : [
        {
            "_id" : 0,
            "name" : "2-shard1-mongo-aws-development-sydney:27017",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 512,
            "optime" : Timestamp(1415677283, 1),
            "optimeDate" : ISODate("2014-11-11T03:41:23Z"),
            "electionTime" : Timestamp(1415679145, 11),
            "electionDate" : ISODate("2014-11-11T04:12:25Z"),
            "self" : true
        }
    ],
    "ok" : 1
}






Will Berkeley

unread,
Nov 11, 2014, 11:09:18 AM11/11/14
to mongod...@googlegroups.com
111.111.111.111 is in state 4 - FATAL, meaning it encountered some error from which it cannot recover (as a member of the replica set). Is there anything in the logs indicating what the error is? Did you receive any errors while setting up the replica set? What steps did you take to setup the replica set? What version of MongoDB is this?

-Will
Reply all
Reply to author
Forward
0 new messages