Mongo connection error

Hi all,

I am trying to deploy genieacs in kubernetes, I have mongo running perfectly fine without any problems but genieacs-gui, genieacs-cwmp, genieacs-nbi, genieacs-fs are all giving me the same mongo connection error as shown below. Any leads on how to solve this error would be really appreciated
.
thank you.

sudo kubectl logs -n netlinq genieacscwmp-0
2022-02-07 17:13:19,201 INFO Set uid to user 0 succeeded
2022-02-07 17:13:19,203 INFO supervisord started with pid 1
2022-02-07 17:13:20,206 INFO spawned: ‘genieacs-cwmp’ with pid 9
2022-02-07 17:13:21,208 INFO success: genieacs-cwmp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-02-07T17:13:22.358Z [INFO] genieacs-cwmp starting; pid=9 version=“1.2.8+20220112123519”
2022-02-07T17:13:54.661Z [ERROR] Uncaught exception; pid=28 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:54.673Z [ERROR] Worker died; pid=28 exitCode=1
2022-02-07T17:13:54.765Z [ERROR] Uncaught exception; pid=69 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:54.779Z [ERROR] Worker died; pid=69 exitCode=1
2022-02-07T17:13:54.840Z [ERROR] Uncaught exception; pid=94 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:54.842Z [ERROR] Uncaught exception; pid=49 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:54.851Z [ERROR] Worker died; pid=94 exitCode=1
2022-02-07T17:13:54.861Z [ERROR] Worker died; pid=49 exitCode=1
2022-02-07T17:13:54.865Z [ERROR] Uncaught exception; pid=22 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:54.886Z [ERROR] Worker died; pid=22 exitCode=1
2022-02-07T17:13:55.067Z [ERROR] Uncaught exception; pid=114 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.087Z [ERROR] Worker died; pid=114 exitCode=1
2022-02-07T17:13:55.184Z [ERROR] Uncaught exception; pid=16 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.207Z [ERROR] Worker died; pid=16 exitCode=1
2022-02-07T17:13:55.219Z [ERROR] Uncaught exception; pid=83 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.230Z [ERROR] Worker died; pid=83 exitCode=1
2022-02-07T17:13:55.337Z [ERROR] Uncaught exception; pid=90 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.352Z [ERROR] Worker died; pid=90 exitCode=1
2022-02-07T17:13:55.485Z [ERROR] Uncaught exception; pid=59 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.497Z [ERROR] Worker died; pid=59 exitCode=1
2022-02-07T17:13:55.587Z [ERROR] Uncaught exception; pid=35 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"
2022-02-07T17:13:55.606Z [ERROR] Worker died; pid=35 exitCode=1
2022-02-07T17:13:55.733Z [ERROR] Uncaught exception; pid=41 exceptionName=“MongoServerSelectionError” exceptionMessage=“connect ECONNREFUSED 127.0.0.1:27017” exceptionStack="/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610\n const timeoutError = new MongoServerSelectionError(\n ^\n\nMongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017\n at Timeout._onTimeout (/opt/genieacs/node_modules/mongodb/src/sdam/topology.ts:610:30)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"

Hi Radha

I’m also trying to deploy GenieACS in kubernetes.
I’m having a lot of problems but not connecting to MongoDB.
I would be happy to share our experiences.
For mongodb I made a separate deployment
I pass the login url via genieacs.env
GENIEACS_MONGODB_CONNECTION_URL=mongodb://mongodb-genieacs.genieacs/genieacs
something like mongodb://servicename.namespace/genieacs

For my tests I disabled authentication in MongoDB and the connection is made.
This is where other problems come in.