0
votes

I am using Cloud Foundry and I deployed my Spring boot application on Cloud. I have bound the Mongodb Service with my application. When my application is trying to read the data from mongodb I am seeing below error.

Query failed with error code 13 and error message 'not authorized for query on cfe5cb4d-2ca8-40f3-9f83-0cc8321e8c19.ACCOUNT_DETAILS' on server IP:Port

At the same time when I am connecting to this db with application deployed on my local systems its working fine.

Please help me if I need to modify anything here in Configuration to make the application on Cloud work ?

1
maybe this question is similar: stackoverflow.com/questions/23619018/… - user152468
I am also having the same problem. It's because once your application is on cloud foundry. It cannot make the connection to mongodb. - Jesse

1 Answers

0
votes

I think you should check your VCAP_SERVICES, probably locally you are using the connection parameters directly but on Bluemix you have to use VCAP_SERVICES parsing. Please if possible, copy and paste the code section used to connect to MongoDB.