Re: Azure Worker Role: How to open the MongoDB for remote connections?

224 views
Skip to first unread message

Daniel Moqvist

unread,
Feb 11, 2013, 7:45:45 AM2/11/13
to mongod...@googlegroups.com
I'm facing the same issue, running a MongoDB replica set as three worker roles. How do I connect to it outside the Azure Cloud?
 
Feels like I tried all combinations of endpoints...
 
Is there anyone who can point me into right direction?
 
/Daniel

On Thursday, October 4, 2012 8:59:34 PM UTC+2, Miksu wrote:
After changing the endpoint configuration I'm now able to connect to the server from my dev machine using mongo.exe:

<InputEndpoint name="MongodPort" protocol="tcp" port="27017" localPort="27017" />

The problem though is that the replica set doesn't seem to work. I think this is somehow related to the hosts-file so that the service is not able to update the file if the InternalEndPoint is changed to InputEndPoint.

torstai, 4. lokakuuta 2012 15.19.29 UTC+3 Miksu kirjoitti:
Thanks to the "MongoDB on Azure Worker Role" guides, I was able to create a 3xinstance deployment to Azure and the sample app is working nicely. What I wonder now is how can I "open" those MongoDB instances so that I can access them from outside this one Cloud Service?

For example, I have couple Virtual Machines running executables which need access to the MongoDB. Also during development, I would like to be able to access these instances from my dev machine. I wonder what are the steps in order to open up the server, so that some kind of an authentication mechanism (username/password is fine) is used?

Sridhar Nanjundeswaran

unread,
Mar 1, 2013, 10:09:11 AM3/1/13
to mongod...@googlegroups.com
The default setting for the endpoints is Internal which is why they are blocked from external access. Having said that changing this to an Input Endpoint (similar to the endpoints in the web role) does not help due to the Azure Load Balancer. Hence there is currently  no way to do this from Cloud Services using the default MongoDB Azure Worker Role code.
To do this in Cloud Services you would need to create a sharded cluster and expose the mongos endpoint as input endpoints. https://jira.mongodb.org/browse/AZURE-20 is the tracking ticket for this to be available in the baseline code. 

KARTIK VERMA

unread,
Aug 6, 2014, 12:50:56 AM8/6/14
to mongod...@googlegroups.com, sri...@10gen.com
Hi Sridhar,

Has this issue been resolved?

Stephen Steneker

unread,
Aug 8, 2014, 1:25:01 AM8/8/14
to mongod...@googlegroups.com, sri...@10gen.com
On Wednesday, 6 August 2014 14:50:56 UTC+10, KARTIK VERMA wrote:
Has this issue been resolved?

Hi Kartik,

The AZURE-20 issue you linked to (support for sharded cluster via Worker Role code) is still unresolved. There are a number of open issues for the Azure Worker Role code, which is currently not being actively developed and is using an older version of the Azure SDK.

I believe one of the historical challenges was not being able to reserve public IPs for Worker Roles, but as of the Azure 2.3 SDK (April, 2014) that should now be possible: http://azure.microsoft.com/blog/2014/05/14/reserved-ip-addresses/.

I'm not sure what is involved in updating the Worker Role code to the latest API; as a shorter path I would recommend deploying VMs on Azure instead.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages