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

CloudFoundry + MongoDB is broken #4363

Closed
jdubois opened this issue Oct 20, 2016 · 10 comments
Closed

CloudFoundry + MongoDB is broken #4363

jdubois opened this issue Oct 20, 2016 · 10 comments
Milestone

Comments

@jdubois
Copy link
Member

jdubois commented Oct 20, 2016

From my stats, very few people are using CloudFoundry (10 times less than Heroku!), which is probably why we didn't see this.
Besides, there is only a "free" plan, which is very limited and not production-ready, on the CloudFoundry marketplace.

Choosing CloudFoundry + MongoDB doesn't work as we have both CloudDatabaseConfiguration and CloudMongoDbConfiguration which get configured, and which configure the same bean, so Spring crashes at startup. This just cannot work!!

It also seems Spring Cloud has changed its MongoDB support, so the CloudMongoDbConfiguration doesn't seem to work anymore: when using it, I have connection exceptions to the MongoDB database, so it's clear that the MongoDB configuration isn't automatically setup from Spring Cloud.

Of course it works if you code directly database credentials in the application-prod.yml.

I'm also pinging @jkutner as there might be the same kind of issue on Heroku, as it's very similar.

@jkutner
Copy link
Contributor

jkutner commented Oct 20, 2016

No problem on Heroku (from what I can see with a smoke test of 3.9.1). Please let me know if there is something more subtle.

EDIT

I see why. The heroku generator references the Mongo URI (w/ credentials) in the application-heroku.yml.

@jdubois
Copy link
Member Author

jdubois commented Oct 20, 2016

I will commit a fix soon

@jdubois
Copy link
Member Author

jdubois commented Oct 20, 2016

I will merge this with #4349 as it's related

@ehillis
Copy link

ehillis commented Oct 21, 2016

I made a comment on this "old issue" because I didn't see it resolved anywhere else.. is the circular reference fixed (or about to be?) I'm using bluemix because it offers a free (30 day trial), and I assumed that to use heroku with mongodb I would need to pay $18/month just to "try" it... heroku did NOT seem to work for me (out of the box), it was getting an error with a MONGODB environmental variable or some such.. so I assumed I needed to add the Mongo DB Compose or whatever.. if I don't need to do that, would appreciate help on this also.. don't have any attachment to bluemix (other than someone offers to pay for it and it give 30 days free).

@jdubois
Copy link
Member Author

jdubois commented Oct 21, 2016

@ehillis it should work now on Cloud Foundry
There shouldn't be such a problem on Heroku, as it's not working the same way (or this is a whole different issue)

@jdubois
Copy link
Member Author

jdubois commented Oct 25, 2016

Yes I'm going to fix this for CloudFoundry, and test if it still works for
Heroku.
I have everything working, but I need time to test. And I have no idea when
I will have some free time.

Le 21 oct. 2016 8:33 AM, "ehillis" notifications@github.com a écrit :

I made a comment on this "old issue" because I didn't see it resolved
anywhere else.. is the circular reference fixed (or about to be?) I'm using
bluemix because it offers a free (30 day trial), and I assumed that to use
heroku with mongodb I would need to pay $18/month just to "try" it...
heroku did NOT seem to work for me (out of the box), it was getting an
error with a MONGODB environmental variable or some such.. so I assumed I
needed to add the Mongo DB Compose or whatever.. if I don't need to do
that, would appreciate help on this also.. don't have any attachment to
bluemix (other than someone offers to pay for it and it give 30 days free).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4363 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATVo1JbDY7kwrdewV-B9rKVGwF1qYn_ks5q2FzNgaJpZM4KcNx4
.

@ehillis
Copy link

ehillis commented Oct 25, 2016

Thanks!
Do I need to update Jhipster and recreate my project to get mine to work?

On Friday, October 21, 2016, Julien Dubois notifications@github.com wrote:

@ehillis https://github.com/ehillis it should work now on Cloud Foundry
There shouldn't be such a problem on Heroku, as it's not working the same
way (or this is a whole different issue)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4363 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ASRYWZgx1HanZzot8F7LrfPMf-QdOdRXks5q2K0vgaJpZM4KcNx4
.

@jdubois
Copy link
Member Author

jdubois commented Oct 25, 2016

You need to wait for the next release, probably very soon

@jdubois jdubois modified the milestone: 3.10.0 Oct 27, 2016
@vhiguita
Copy link

Hi,
My app is deployed in Pivotal web services with the default mlab plan sandbox which it's very limited. I have created a new account with mlab directly with a different plan, is it possible that the deployed app in pivotal could connect directly to this new mlab account?, I modified these lines in the file application-prod.ym and deployed in pivotal again but it's not working.

mongodb:
uri: mongodb://:@ds137760.mlab.com:37760
database: database_name

Thank you very much.
attachment

@jdubois
Copy link
Member Author

jdubois commented Mar 24, 2017

@vhiguita please, don't pollute old issues, with some other question. Have a look at our guidelines - for me this isn't a bug, you should go to StackOverflow

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

4 participants