[SERVER-19084] ShardingTest REST Interface Port Conflict Created: 23/Jun/15 Updated: 29/Oct/15 Resolved: 29/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | 3.1.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | start a ShardingTest |
||||||||
| Participants: | |||||||||
| Description |
|
There are a couple places in ShardingTest that may cause port conflicts 1. Now that config servers are replica sets, they are started with a "--rest" which uses up a port 1000 + mongod port. Since config servers are started on 29000 by default and shards are 30000 by default. This could potentially cause a shard to fail to start (usually the shards start first so the REST interface fails instead). 2. similarly shards with more than 10 replset members won't start, since their ports are assigned as follows: startPort : 31100 + ( i * 100 ) |
| Comments |
| Comment by Max Hirschhorn [ 29/Oct/15 ] |
|
This was fixed by the change to the allocatePorts() function to start allocating port from the same contiguous range, regardless of the MongoDB process type. Additionally, while the ReplSetTest.prototype.getOptions() function specifies --rest, it doesn't accurately represent the command line options of the mongod processes that are started. |