Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to launch locally - MongoDB not connecting on Accounts #25

Open
pavlosidelov opened this issue Jun 27, 2019 · 0 comments
Open

Failed to launch locally - MongoDB not connecting on Accounts #25

pavlosidelov opened this issue Jun 27, 2019 · 0 comments

Comments

@pavlosidelov
Copy link

pavlosidelov commented Jun 27, 2019

From the Article for Local launch a lot of things is unclear.
For example about DB

Get your mongo connection string. Almost all your microservices need it; keep it safe!
Ok, I save it in .env:
MONGO_URL=mongodb://$USERNAME:$PASSWORD@e07eca23-91af-413b-8bf6-3e3f9825717c-0.497129fd685f442ca4df759dd55ec01b.databases
BASE_PATH=e07eca23-91af-413b-8bf6-3e3f9825717c-0.497129fd685f442ca4df759dd55ec01b.databases.appdomain.cloud

When I do "npm start" on /accounts/ folder, I got a lot of missing components and I setup all of them, but the error still threw.

Running on e07eca23-91af-413b-8bf6-3e3f9825717c-0.497129fd685f442ca4df759dd55ec01b.databases.appdomain.cloud:3400, connecting to mongodb://$USERNAME:$PASSWORD@e07eca23-91af-413b-8bf6-3e3f9825717c-0.497129fd685f442ca4df759dd55ec01b.databases.appdomain.cloud:31892,e07eca23-91af-413b-8bf6-3e3f9825717c-1.497129fd685f442ca4df759dd55ec01b.databases.appdomain.cloud:31892/ibmclouddb?authSource=admin&replicaSet=replset
(node:20293) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'onOpen' of undefined
at /home/pavlo/prj/innovate-digital-bank/accounts/server.js:12:16
at promise.then.err (/home/pavlo/prj/innovate-digital-bank/accounts/node_modules/mongoose/lib/connection.js:394:53)
at
at runMicrotasksCallback (internal/process/next_tick.js:121:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

What I'm doing wrong and how to resolve it?
Thank you!

faizalak added a commit to faizalak/innovate-digital-bank that referenced this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant