123MwanjeMike / ansible-mongodb

An Ansible role for creating a MongoDB sharded cluster from scratch.
https://blog.mikemwanje.dev/configure-a-mongodb-cluster-with-ansible
Other
1 stars 1 forks source link

Run the create_database.js script task failing #17

Closed 123MwanjeMike closed 11 months ago

123MwanjeMike commented 11 months ago

Describe the bug The create database task is failing

To Reproduce Run the create database playbook

Expected behavior Create the database without fail

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

fatal: [mongod-shard-0-2.europe-north1-a.c.oceanic-muse-408212.internal]: FAILED! => {"changed": true, "cmd": ["mongosh", "--host", "mongod-shard-0-2.c.oceanic-muse-408212.internal", "--port", "27018", "<", "/tmp/create_database.js"], "delta": "0:00:00.681009", "end": "2023-12-29 07:55:59.182490", "msg": "non-zero return code", "rc": 1, "start": "2023-12-29 07:55:58.501481", "stderr": "MongoNetworkError: connect ECONNREFUSED 10.0.0.8:27018", "stderr_lines": ["MongoNetworkError: connect ECONNREFUSED 10.0.0.8:27018"], "stdout": "Current Mongosh Log ID:\t658e7b8e860b092c60a6ceb3\nConnecting to:\t\tmongodb://mongod-shard-0-2.c.oceanic-muse-408212.internal:27018/%3C?directConnection=true&appName=mongosh+2.1.1", "stdout_lines": ["Current Mongosh Log ID:\t658e7b8e860b092c60a6ceb3", "Connecting to:\t\tmongodb://mongod-shard-0-2.c.oceanic-muse-408212.internal:27018/%3C?directConnection=true&appName=mongosh+2.1.1"]}