[SERVER-65879] Mongos crashes while connecting to replica config set Created: 21/Apr/22 Updated: 26/Apr/22 Resolved: 26/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Wouter van der Meulen | Assignee: | Chris Kelly |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Steps To Reproduce: | My mongod config looks like this
And mongos
Am I missing something obvious here? |
||||||||||||||||||||||||||||
| Participants: |
| Description |
|
I'm trying to set up a config server for my sharded cluster. I've set up my replica set, and am trying to start my mongos instance. I'm greeted with the following error. Please note that there is nothing running on port 27017. This is running on a Ubuntu 20.04 arm64 server running MongoDB 4.2. The config replica set is spread out over 3 servers. I tried running mongos on the config server as well as on its own standalone server. Same result.
|
| Comments |
| Comment by Chris Kelly [ 26/Apr/22 ] |
|
Hello Wouter, I was able to reproduce your problem. In this case, it appears to be an easy fix. While you may not be running anything on 27017 on your servers, your mongos config is binding to both 0.0.0.0 and localhost. There is some nuance on the differences and similarities between these that are a good read here. To oversimplify a bit, you can think of 0.0.0.0 including 127.0.0.1 in this context, which basically means you were telling it to bind to 127.0.0.1 twice. This is because 0.0.0.0 generally means to listen on all available network interfaces. From the perspective of mongos, if told to listen on 0.0.0.0, it will accept connections on any interface including 127.0.0.1. Try giving it a shot by removing 127.0.0.1 from your bindIp, and feel free to consult our reference on deploying sharded clusters here, or consult our MongoDB Developer Community Forums for more information. Regards, |