0

I have two VMs in a VMware cloud that belong to the same VApp and so are behind the same edge gateway. The both have their own different internal ip addresses but I route services from the outside to them using a combination of the edge gateway's ip address and port. I have a Grails application running on one VM which needs to work with an instance of MongoDB. I have that instance of MongoDB running as a service on the other VM. The issue is that when the Grails application starts up, it can't contact the MongoDB instance on the other VM by using the edge gateway's ip address and port 27017.

I have an appropriate NAT rule to forward such requests to the VM that has MongoDB on it at the same port 27017.I also have appropriate firewall rules set up.

Some helpful diagnostic information, the Grails application can successfully contact another instance of MongoDB I have running on the Amazon Web Services cloud.

And if I run Robomongo (a MongoDB gui client) on my local machine, it can contact the instance of MongoDB running on my VMware VM successfully.

I just can't get contact between my Grails application on one VM and MongoDB on the other VM. I get error from my Grails application that it couldn't find MongoDB.

EDIT: I also discovered that if from my local linux machine, I type the following at the prompt:

telnet [vmwareEdgeGateway's IP] 27017

it makes the connection. This would be supportive of the fact that I have my NAT and firewall settings configured correctly I would hope.

2
  • "I have an appropriate NAT rule to forward such requests to the VM that has MongoDB on it at the same port 27017.I also have appropriate firewall rules set up." It's not that we don't trust you, but posting the relevant information to this statement would expedite troubleshooting. Jan 21, 2015 at 14:46
  • @IVlint67 I will post another discovery I made to support that NAT and FW setting are working. If you still insist I can show that data.
    – user266207
    Jan 21, 2015 at 14:51

1 Answer 1

0

I solved this issue by using the internal ip address of the VM that is running MongoDB. Rather than using the edge gateway's ip address to get to it. I was also advised by those smarter than myself that this is a more secure way to do it as well. Just thought I'd put the answer up in case someone else comes looking for help in the future to this topic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .