Launching Mongod

Hi ,

Due to memory issues on my personal laptop , i installed and configured mongo on my office/work server . I am not able bind ip 192.168.103.100 due to firewall rules . I am able to start mongod by just using bind_ip as localhost . When i execute validate_lab_launch_mongod command it is asking me to bind_ip 192.168.103.100 as well which i wont be able to do because of above mentioned restriction . Is there a way i can edit validate* scripts to look only for bind_ip localhost and generate the key so that i can submit by Labs . Please let me know .

Thanks in Advance

Validation scripts are locked down and can’t be changed. What memory issues are you having on your personal laptop?

Actually my laptop is already overloaded so i cannot install any new softwares ,setups

Are you using Vagrant or local host for your work?
Can you paste the screenshots of both cases with and without bind_ip

I am using local host for my work .

./mongod --port 27017 --bind_ip localhost --auth
2020-04-04T22:22:45.770-0400 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’
2020-04-04T22:22:45.770-0400 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-04-04T22:22:45.773-0400 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] MongoDB starting : pid=78680 port=27017 dbpath=/data/db 64-bit host=xxxxxxxxxxxxxxxxxxxxx
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] db version v4.2.5
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] git version: 2261279b51ea13df08ae708ff278f0679c59dc32
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] allocator: tcmalloc
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] modules: enterprise
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] build environment:
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] distmod: rhel70
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] distarch: x86_64
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] target_arch: x86_64
2020-04-04T22:22:45.773-0400 I CONTROL [initandlisten] options: { net: { bindIp: “localhost”, port: 27017 }, security: { authorization: “enabled” } }
2020-04-04T22:22:45.774-0400 I STORAGE [initandlisten] Detected data files in /data/db created by the ‘wiredTiger’ storage engine, so setting the active storage engine to ‘wiredTiger’.

./mongod --port 27000 --bind_ip 192.168.103.100
2020-04-04T22:28:04.029-0400 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’
2020-04-04T22:28:04.036-0400 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-04-04T22:28:04.042-0400 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] MongoDB starting : pid=79288 port=27000 dbpath=/data/db 64-bit host=nnnnnnnnnnnnnnnn
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] db version v4.2.5
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] git version: 2261279b51ea13df08ae708ff278f0679c59dc32
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] allocator: tcmalloc
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] modules: enterprise
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] build environment:
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] distmod: rhel70
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] distarch: x86_64
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] target_arch: x86_64
2020-04-04T22:28:04.043-0400 I CONTROL [initandlisten] options: { net: { bindIp: “192.168.103.100”, port: 27000 } }
2020-04-04T22:28:04.043-0400 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2020-04-04T22:28:04.044-0400 I CONTROL [initandlisten] now exiting
2020-04-04T22:28:04.044-0400 I CONTROL [initandlisten] shutting down with code:48

What is your os?Where is your prompt
Why it is showing different host?Did you edit the log
27017 is default port and uses default path /data/db
How come it is trying is use the same path for port 27000?

Is the issue with bind_ip or using same directory for dbpath
Did you try to use alternate path?

It is recommended to use only Vagrant for these courses

Looks like your work laptop is a RHEL distribution.

If you’re absolutely sure that your corporate firewall is blocking specific IPs/ranges (e.g. 192.168.103.100), then you have two potential solutions that will still be able to use this IP:

  1. Work laptop: Vagrant + Internal Network on VirtualBox. The host machine will know nothing of this IP and it will only be accessible within the guest VM. Let me know if you’d like more info on this setup.
  2. Personal laptop: Free up some space and setup Vagrant and VirtualBox as per course instructions