[JAVA-2292] Integrated with Spring Boot - automatic connection localhost:27017 Created: 30/Aug/16 Updated: 11/Sep/19 Resolved: 30/Aug/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management, Internal |
| Affects Version/s: | 3.3.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical - P2 |
| Reporter: | shengyao | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Spring Boot |
||
| Description |
|
It will automatic recursive connect to localhost:27017 Here is the stack
|
| Comments |
| Comment by shengyao [ 31/Aug/16 ] |
|
Hi Ross 2> I notice the Server Discover cause this issue, I am trying to add the code in DefaultServerMonitor.java line 115 I know it is not a good way to prevent the issue. If there is any configuration place I missed, please let me know. Thanks again~ shengyao |
| Comment by Ross Lawley [ 30/Aug/16 ] |
|
Hi shengyao15, Thanks for the ticket, it looks like you haven't configured the MongoDB instance in Spring and the default setting for the Mongo connection is to use localhost and port 27107. Please see the Spring Data MongoDB documentation for more information about configuring Spring Data, specifically the connecting to MongoDB with Spring. Regarding, seeing multiple connection attempts, this is working as expected as the underlying driver follows the Server Discover and Monitoring Specification. Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailing list or stackoverflow as you will reach a boarder audience there. I know the Spring data community also monitors questions tagged in StackOverflow. If your business requires an answer from MongoDB within a set time frame then we do offer production support. I hope that helps, Ross |