[SERVER-38127] BindIp option does not work correctly in a config file when moving from 3.6.2 to 3.6.8 Created: 14/Nov/18  Updated: 15/Nov/18  Resolved: 15/Nov/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ian Hannah [X] Assignee: Danny Hatcher (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File mongod.cfg    
Operating System: ALL
Participants:

 Description   

Hi,

I was using 3.6.2 and the attached configuration file worked correctly.

When moving to 3.6.8 it no longer works - I get the following error:

2018-11-14T14:19:03.839+0000 I CONTROL [initandlisten] target_arch: x86_64
2018-11-14T14:19:03.839+0000 I CONTROL [initandlisten] options: \{ config: "C:\Program Files\MongoDB\Server\3.6\bin\mongod.cfg", net: { bindIp: "192.168.45.107,192.168.45.106", port: 27057 }, replication: \{ replSetName: "MAP" }, security: \{ authorization: "enabled", keyFile: "C:\Program Files\MongoDB\Server\3.6\bin\keyfile" }, service: true, storage: \{ dbPath: "D:\MongoData\DB", engine: "wiredTiger", wiredTiger: { engineConfig: { cacheSizeGB: 4.0 } } }, systemLog: \{ destination: "file", path: "D:\MongoData\Log\mongod.log" } }
2018-11-14T14:19:03.841+0000 E STORAGE [initandlisten] Failed to set up listener: SocketException: The requested address is not valid in its context.
2018-11-14T14:19:03.842+0000 I CONTROL [serviceStopWorker] now exiting

Has the way that the IP address list has to be specified changed at all?

Thanks

Ian

mongod.cfg



 Comments   
Comment by Danny Hatcher (Inactive) [ 15/Nov/18 ]

Hello Ian,

The contents of bindIp should be whatever addresses are valid to contact the process on. For example, if your process was located at a server that was assigned the IP of 192.168.45.107 and you would expect clients to use that address, then you would set bindIp to 192.168.45.107.

Thank you,

Danny

Comment by Ian Hannah [X] [ 15/Nov/18 ]

Hi Danny,

The issue was that I specified two ip addresses in the BindIp option. I was confused and thought that is where the primary and secondary IP addresses should have been put. Now I only have one IP address in there it is working fine.

I suspect that if you specify 127.0.0.1 (even though you don't need to) and the server IP address you may get the same issue but this was my mistake.

Comment by Ian Hannah [X] [ 14/Nov/18 ]

My apologies - I did understand the bindIp option correctly. This can be closed.

Generated at Thu Feb 08 04:48:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.