mongo replica set - data not replicating
<p>I setup a test replcia set using mongo v3.2 on a single node and the rs.status() command in the mongo shell seems to indicate that the replica set is established (output below).  </p>

<p>However, when I insert data into the primary, I can see that it gets inserted into the primary but I cannot seem to run the find operation on any of the secondary processes (message given below)</p>

<p><strong>message on secondary</strong></p>

<pre><code>Error: error: { "ok" : 0, "errmsg" : "not master and slaveOk=false", "code" : 13435 }
</code></pre>

<p><strong>rs.status()</strong></p>

<pre><code>{
    "set" : "set0",
    "date" : ISODate("2016-07-21T19:53:41.882Z"),
    "myState" : 1,
    "term" : NumberLong(1),
    "heartbeatIntervalMillis" : NumberLong(2000),
    "members" : [
        {
            "_id" : 0,
            "name" : "127.0.0.1:27049",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 2388,
            "optime" : {
                "ts" : Timestamp(1469130790, 2),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-07-21T19:53:10Z"),
            "electionTime" : Timestamp(1469128700, 1),
            "electionDate" : ISODate("2016-07-21T19:18:20Z"),
            "configVersion" : 1,
            "self" : true
        },
        {
            "_id" : 1,
            "name" : "127.0.0.1:27050",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 2132,
            "optime" : {
                "ts" : Timestamp(1469130790, 2),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-07-21T19:53:10Z"),
            "lastHeartbeat" : ISODate("2016-07-21T19:53:40.964Z"),
            "lastHeartbeatRecv" : ISODate("2016-07-21T19:53:40.823Z"),
            "pingMs" : NumberLong(0),
            "syncingTo" : "127.0.0.1:27049",
            "configVersion" : 1
        },
        {
            "_id" : 2,
            "name" : "127.0.0.1:27051",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 2132,
            "optime" : {
                "ts" : Timestamp(1469130790, 2),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-07-21T19:53:10Z"),
            "lastHeartbeat" : ISODate("2016-07-21T19:53:40.963Z"),
            "lastHeartbeatRecv" : ISODate("2016-07-21T19:53:40.823Z"),
            "pingMs" : NumberLong(0),
            "syncingTo" : "127.0.0.1:27049",
            "configVersion" : 1
        }
    ],
    "ok" : 1
}
</code></pre>

<p><strong>output from rs.conf() on primary</strong></p>

<pre><code>{
    "_id" : "set0",
    "version" : 1,
    "protocolVersion" : NumberLong(1),
    "members" : [
        {
            "_id" : 0,
            "host" : "127.0.0.1:27049",
            "arbiterOnly" : false,
            "buildIndexes" : true,
            "hidden" : false,
            "priority" : 1,
            "tags" : {

            },
            "slaveDelay" : NumberLong(0),
            "votes" : 1
        },
        {
            "_id" : 1,
            "host" : "127.0.0.1:27050",
            "arbiterOnly" : false,
            "buildIndexes" : true,
            "hidden" : false,
            "priority" : 1,
            "tags" : {

            },
            "slaveDelay" : NumberLong(0),
            "votes" : 1
        },
        {
            "_id" : 2,
            "host" : "127.0.0.1:27051",
            "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("57911ff0bd131f1aeb2ef878")
    }
}
</code></pre>