Breaking

Code Gripper
Responsive Advertisement
  • Home
Home

Network is unreachable. Reason: couldn't connect to server 13.55.62.12:27017, connection attempt failed: SocketException: Error connecting to 13.55.62.12:27017 :: caused by :: No connection could be made because the target machine actively refused it.

byMahabubur Rahman -December 20, 2022
0

Open up mongodb config file:

Ubuntu:

sudo nano /etc/mongod.conf

Window:

MongoDB_installation_Directory/Server/{version}/bin/mongod.cfg 
// MongoDB_installation_Directory could be C://MongoDB or C://Program Files/MongoDB

Edit:

# network interfaces
net:
    port: 27017
    bindIp: 0.0.0.0   #default value is 127.0.0.1

Restart MongoDB Server:

sudo service mongod restart

By default mongodb is configured to allow connections only from localhost. We need to allow remote connections. In the config file, go to the network interfaces section and change the bindIp from 127.0.0.1 to 0.0.0.0 which means allow connections from all IP addresses.

  • Facebook
  • Twitter

You may like these posts

Post a Comment

Previous Post Next Post

Follow Us

Popular Posts

Subscribe Us

Facebook

Categories

Main Tags

Code Gripper

September 30, 2023

Total Pageviews

Search This Blog

CODE GRIPPER

Code Gripper
CODE GRIPPER

  • Home
  • Python
  • PHP

Menu Footer Widget

  • Home
  • About
  • Contact Us
Code Gripper

About Us

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's.

Categories

Main Tags

Latest Posts

Most Popular

Design by Blogger | Distributed by Gooyaabi
  • Home
  • About Us
  • Contact Us
  • RTL Version

Contact Form