[CSHARP-2070] A timeout occured after 30000ms selecting a server using CompositeServerSelector Created: 23/Oct/17 Updated: 27/Oct/23 Resolved: 22/Jan/18 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Configuration, Connectivity |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Ibnu Setiawan | Assignee: | Robert Stam |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | question | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
I want to learn C# ASP MVC 5 with mongodb . in Tutorial at http://www.c-sharpcorner.com/article/simple-crud-operation-using-asp-net-mvc-and-mongodb/ , My Connection in Attachment . at command : I have a Error : A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector { AllowedLatencyRange = 00:00:00.0150000 }}. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: " { ClusterId : 1, EndPoint : "Unspecified/localhost:27017" }", EndPoint: "Unspecified/localhost:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> MongoDB.Driver.MongoAuthenticationException: Unable to authenticate username 'demouser' on database 'CarDatabase'. ---> MongoDB.Driver.MongoCommandException: Command authenticate failed: auth failed. |
| Comments |
| Comment by James Kovacs [ 08/Mar/23 ] | |||
|
For more information, see Why Does the Driver Throw a Timeout During Server Selection? in the MongoDB .NET/C# Driver FAQ. | |||
| Comment by Jeffrey Yemin [ 23/Oct/17 ] | |||
|
It looks like the root cause is an authentication error:
Please double check whether a user with the name ''demouser'' is defined in the 'CarDatabase' database, and that the password that you provided is correct. You can confirm in the mongo shell like this:
|