Connect to Robomongo in a network proxy - mongodb

I had some connections on Robomongo that worked well, because network didn't have any type of restriction. Now, in the company, network is very restricted and they gave us a Network proxy and some specific IP's, but now, robomongo doesn't allow me to connect to any database, but local.
How can I configure robomongo with this parameters they gave us?
This is the message I get
Cannot connect to the MongoDB at c100.candidate.10.mongolayer.com:10101.
Error: Network is unreachable

Related

How to get the IP address of Heroku so that my Heroku hosted backend server can connect to MongoDB?

I'm trying to host my backend on Heroku, but after I tried deploying I was getting an "application error" . I checked the "heroku logs" and I think the problem is my MongoDB database only accepts connection to my specific IP address.
2023-02-07T09:34:05.807213+00:00 app[web.1]: MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
How do I get the IP address of Heroku so that I can add it to this whitelist?
https://i.imgur.com/K9k0TFk.png
This is the entire Heroku log just in case maybe I'm wrong about the reason it's crashing?
https://pastebin.com/btc79fQq
EDIT:
Also is there a way to connect to the mongo atlas database with username + password instead of IP address maybe?
It seems like it's very dynamic so you need an addon like Fixie socks which sets a static IP of your Heroku app for this exact purpose.

How to remote access gcp ports of mongodb on gcp VM?

I have installed and running mongodb on port 27017 of my VM on gcp. But I am not able to access database from my pc or any external client.
I have set firewall rules to allow ingress traffic with tcp protocol on port 27017(tcp:27017) from all ip ranges(0.0.0.0/0) and have set priority 1000.
firewall rules snapshot
Now when i am trying to access the database from external client I am not able to access it. I even tried mongodb compass and used ip address of VM and port 27017 to access the database. But unable to connect and showing(mongodb not running on provided host and port) however I am able to access to database when accessed from that VM itself in which I have installed the mongodb.
Please suggest if I am missing out anything.
By default, MongoDB doesn’t allow remote connections. So I would suggest you follow this tutorial to resolve your issue.
Let me know if this was helpful.
Add --bind_ip_all to mongodb server start command.

How to fix connection problems when nothing seems to work

I am trying to connect to my atlas cluster from the mongoshell within the windows terminal. The connection string is correctly written and I made sure that the clusters version (4.0.10) and the shell version (4.0.10) are the same. I have also made sure that my ip address is whitelisted and for testing purposes I have added "0.0.0.0/0" as well. Still it doesn't let me connect.
I have tried creating a new database, change user, create new users, change user permissions, changing ip whitelist, using different connection strings, turning off windows firewall, but still, the same error persists.
MongoDB shell version v4.0.10
Enter password:
connecting to: mongodb://charmsdb-shard-00-02-5s81x.mongodb.net.:27017,charmsdb-shard-00-01-5s81x.mongodb.net.:27017,charmsdb-shard-00-00-5s81x.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=CharmsDB-shard-0&ssl=true
2019-07-09T12:42:04.136+0200 I NETWORK [js] Starting new replica set monitor for CharmsDB-shard-0/charmsdb-shard-00-02-5s81x.mongodb.net.:27017,charmsdb-shard-00-01-5s81x.mongodb.net.:27017,charmsdb-shard-00-00-5s81x.mongodb.net.:27017
2019-07-09T12:42:04.256+0200 W NETWORK [js] Unable to reach primary for set CharmsDB-shard-0
2019-07-09T12:42:04.256+0200 I NETWORK [js] Cannot reach any nodes for set CharmsDB-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
I expect an established network connection but it doesn't let me connect to any.
The problem might be in Window's firewall. MongoDB uses port nr. 27017 so to make it work it has to be opened.
Also if u use Atlas, you can connect through their connection string. https://www.mongodb.com/

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html
In Security Group, I also added PostgreSQL and All traffic as below
The "publicly accessible" flag was enabled (updated after Mark B's comment)
I got the error from PGAdmin3
Very appreciate for any suggestion
******UPDATE*******
I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.
My concern is:
Was the port 5432 blocked by office wifi?
How can I configure/update the port without impacting to current API?
Note: My current API is working well (CRUD)
Can you can test your connection to a DB instance using common Linux or Windows tools first?
From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):
$nc -zv DB-instance-endpoint port
For example, the following shows a sample command and the return value:
$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299
Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com
8299 port [tcp/vvr-data] succeeded!
Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:
C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com
8299
Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not
open connection to the host, on port 819: Connect failed
If Telnet actions return success, then you are good to go.
If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system
You will also need to set Public accessibility true under Connect & security tab in RDS console.
Read this post.In your security group go to unbound rules and add my ip.
and make sure your database is public.
https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance

mongodb could not connect to server

I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help.
MongoDB shell version: 2.4.9
connecting to: linus.mongohq.com:10097/mydb
Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq.com:10097
at src/mongo/shell/mongo.js:147
exception: connect failed
As per question comments, your mongo shell client can't connect to the mongo instance. Assuming that your internet connectivity is fine, the most common reason for the failure is that the ports are blocked on your network.
Some ISPs automatically block these ports by default as an additional security protection for users that don't need them open. Contact your ISP or network admin, they should be able to help you out.