ansible-role-mongodb icon indicating copy to clipboard operation
ansible-role-mongodb copied to clipboard

unable to start replica

Open priyanka1628 opened this issue 4 years ago • 3 comments

}, 
"item": {
    "host_name": "mongo_master", 
    "host_port": 27017, 
    "host_type": "replica"
}, 
"msg": "Unable to initiate replica set: This node was not started with the replSet option"

} added the above params in vars, but on starting mongo it gives this error. please help how to fix

priyanka1628 avatar Jan 18 '21 06:01 priyanka1628

hi anyone can please help on the issue of connection refused .

"module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_MoaOAr/ansible_module_mongodb_replication.py\", line 466, in <module>\r\n    main()\r\n  File \"/tmp/ansible_MoaOAr/ansible_module_mongodb_replication.py\", line 425, in main\r\n    client['admin'].command('replSetInitiate', config)\r\n  File \"/home/ubuntu/.local/lib/python2.7/site-packages/pymongo/database.py\", line 611, in command\r\n    read_preference) as (sock_info, slave_ok):\r\n  File \"/usr/lib/python2.7/contextlib.py\", line 17, in __enter__\r\n    return self.gen.next()\r\n  File \"/home/ubuntu/.local/lib/python2.7/site-packages/pymongo/mongo_client.py\", line 1099, in _socket_for_reads\r\n    server = topology.select_server(read_preference)\r\n  File \"/home/ubuntu/.local/lib/python2.7/site-packages/pymongo/topology.py\", line 224, in select_server\r\n    address))\r\n  File \"/home/ubuntu/.local/lib/python2.7/site-packages/pymongo/topology.py\", line 183, in select_servers\r\n    selector, server_timeout, address)\r\n  File \"/home/ubuntu/.local/lib/python2.7/site-packages/pymongo/topology.py\", line 199, in _select_servers_loop\r\n    self._error_message(selector))\r\npymongo.errors.ServerSelectionTimeoutError: 0.0.0.0:27017: [Errno 111] Connection refused\r\n", 
"msg": "MODULE FAILURE", 
"rc": 1

priyanka1628 avatar Jan 22 '21 05:01 priyanka1628

Hi I work with this role and ALMA8 and can confirm it works perfect! If you want help, please provide all information for us to "test your case" (whole ansible project). cu chris

joe-speedboat avatar Dec 02 '21 04:12 joe-speedboat

#254 my example from here may solve your problem?

joe-speedboat avatar Dec 02 '21 04:12 joe-speedboat