Error 13436 node is not in primary or recovering state

I cannot access a MongoDB on a remote server. The MongoDB is created by Meteor. I can see the database and its collections with Studio 3T through an ssh tunnel using connection type standalone.

But accessing a collection with connection type standalone results in the error

Query failed with error code 13436 and error message ‘node is not in primary or recovering state’ on server localhost:27017

Connecting with connection type Replica set results in

Client view of cluster state is {type=REPLICA_SET, servers=[{address=localhost:27017, type=REPLICA_SET_OTHER, roundTripTime=109.6 ms, state=CONNECTED}, {address=mongodb:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]

Anything I can do (preferably with the Studio 3T tools)?

Further Info:
I managed to log into the mongodb docker container as root and run a mongo shell.
Running rs.slaveOk() had no effect.
Running rs.status() gave

"ok" : 0,
"errmsg" : "Our replica set config is invalid or we are not a member of it",
"code" : 93,
 "codeName" : "InvalidReplicaSetConfig"

I also have the output of rs.config() which, among other infos, gives a replicaSetId but I don’t know, which of its fields might be helpful or how to proceed further.
Any hint is appreciated.

It says invalid replicaset configuration
Yes show us rs.conf()
What are the nodes in your replica,replicaset name,ports etc
Config file contents

Here comes rs.config() output:

        "_id" : "meteor",
        "version" : 2,
        "protocolVersion" : NumberLong(1),
        "members" : [
                        "_id" : 0,
                        "host" : "mongodb:27017",
                        "arbiterOnly" : false,
                        "buildIndexes" : true,
                        "hidden" : false,
                        "priority" : 1,
                        "tags" : {

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

                "getLastErrorDefaults" : {
                        "w" : 1,
                        "wtimeout" : 0
                "replicaSetId" : ObjectId("622a5da750afe25fdb50ebfd")

Additional info:
When I call the mongo shell as root in the docker container on the VM it says as prompt meteor:OTHER
The container is called Enterprise/mongodb.
Just in case this may be useful.

Please check this link

Replica Set primary in state OTHER

Thanks!!! I succeeded with the 2nd option of the linked solution using the hostname shown in /etc/hosts inside the container.