[SERVER-42229] Unable to start service when binding private ip address Created: 14/Jul/19  Updated: 27/Oct/23  Resolved: 17/Jul/19

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

Type: Question Priority: Minor - P4
Reporter: Hasil Kasim Assignee: Dmitry Agranat
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi Team,

I am trying to enable remote connection to Mongodb server from internal network ip address. I was able to reach server when binding with 0.0.0.0, but unable to start when adding private ip address.

Config file - 
net:
port: 27017
bindIp:10.10.x.x, 10.10.x.x

Logs -

2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] allocator: tcmalloc
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] modules: none
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] build environment:
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] distmod: ubuntu1604
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] distarch: x86_64
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] target_arch: x86_64
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net:

{ bindIp: "10.10.102.70,10.10.100.123", port: 27017 }

, operationProfiling: { slowOpThresholdMs: 10000 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/data/mongodb", journal:

{ enabled: true }

}, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } }
2019-07-14T16:48:16.750+0400 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] now exiting
2019-07-14T16:48:16.750+0400 I CONTROL [initandlisten] shutting down with code:48

 

 



 Comments   
Comment by Dmitry Agranat [ 17/Jul/19 ]

Hi hasil.kasim@nagarro.com,

You need to bind values with appropriate internal IP or resolvable hostname.

The SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag

Thank you,
Dima

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