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

mongodb ConnectException: in mac with branch 2 (dockerization example) #9

Open
srinivasbellarichenna opened this issue Jul 11, 2021 · 2 comments

Comments

@srinivasbellarichenna
Copy link

com.mongodb.MongoSocketOpenException: Exception opening socket
Caused by: java.net.ConnectException: Connection refused (Connection refused)

@srinivasbellarichenna srinivasbellarichenna changed the title mongodb ConnectException: in mac with branch 2 mongodb ConnectException: in mac with branch 2 (dockerization example) Jul 11, 2021
@sirAlexander
Copy link

@srinivasbellarichenna did you by any chance get this working?

@sirAlexander
Copy link

@srinivasbellarichenna I figured it out. One needs to update their applications.properties file to use EnVars i.e. spring.data.mongodb.uri=${MONGO_URL:mongodb://localhost:27017/dev}

You then need to:

  1. do a new maven clean and install
  2. re build the knote-java docker image again. Use the no cache flag i.e. docker build --no-cache -t knote-java .

Hopefully this should fix your issue. If so please feel free to close this issue :)

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

2 participants