node is not in primary or recovering state
You've configured this node as a replica set member:

 replication:
     replSetName: "rs0"


On startup a new MongoDB server does not have a replica set configuration yet. The server will be in an
unknown replica set member state
until you either add this member to an existing replica set configuration or
use rs.initiate() to establish it as the first member of a new replica set.

You can confirm the current state using rs.status(). A server without any
configuration will report something similar to the following in MongoDB 4.0
(the exact output may vary by server version):

&gt; rs.status()
{
    "operationTime" : Timestamp(0, 0),
    "ok" : 0,
    "errmsg" : "no replset config has been received",
    "code" : 94,
    "codeName" : "NotYetInitialized",
    "$clusterTime" : {
        "clusterTime" : Timestamp(0, 0),
        "signature" : {
            "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
            "keyId" : NumberLong(0)
        }
    }
}


Once added to a replica set, you can use rs.status() and rs.conf() to check the current replica set status and configuration respectively.