-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
None
-
Affects Version/s: 1.8.3, 1.9
-
Component/s: Configuration, Connectivity, Error Handling, Setup
-
Environment:Localhost windows 7
Server: Windows sever 2012
Hi
Using this simple lines code the driver is throwing an exception related with the socket timeout.
// var client = new MongoClient("mongodb://10.30.41.50/DocumentManagerDataBase");
var client = new MongoClient("mongodb://10.30.41.50/DocumentManagerDataBase/?socketTimeoutMS=30000");
var server = client.GetServer();
try
catch (Exception e)
{ throw; }Stacktrace information:
Unable to connect to server 10.30.41.50:27017:
A connection attempt failed because the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond 10.30.41.50:27017.
at MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)
at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout)
at MongoDB.Driver.MongoServer.Connect()
at UsingDocumentManagerAPI.API.Main(String[] args) in c:\PathAppsProjects\UsingDocumentManagerAPI\UsingDocumentManagerAPI\API.cs:line 30
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
If I change to my localhost it working fine, but for the other hots does not work.
I dont have anny firewwal in the midlle, etc.
My mongoDb database it hoted on Windows server 2012.
If try to conect using any front end like RoboMongo or the shell, it workig fine, and I can retrive data from collection. but not through the api.
Thanks
MIKE