mongodb-org-4.0.repo : No such file or directory al instalar el mongo shell en mi AWS Cloud9
I try to connect to my cluster DocumentDB on AWS from AWS C9 with this tutorial. But every time I try to connect I get connection failed after 6 attempts:
(scr_env) me:~/environment/sephora $ mongo --ssl --host xxxxxxxxxxxxx:xxxxx --sslCAFile rds-combined-ca-bundle.pem --username username --password mypassword
MongoDB shell version v3.6.3
connecting to: mongodb://xxxxxxxxxxxxx:xxxxx/
2022-03-22T23:12:38.725+0000 W NETWORK [thread1] Failed to connect to xxx.xx.xx.xxx:xxxxx after 5000ms milliseconds, giving up.
2022-03-22T23:12:38.726+0000 E QUERY [thread1] Error: couldn't connect to server xxxxxxxxxxxxx:xxxxx, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Indeed it seems to be missing the VPC configuration. So I tried to do with this documentation. But I do not know how to install the mongo shell on my AWS Cloud9. Indeed, it seems that I cannot create the repository file with the echo -e "[mongodb-org-4.0] \name=MongoDB repository baseurl=...
.
returns: mongodb-org-4.0.repo: No such file or directory
.
Also, when I tried to install the mongo shell with sudo yum install -y mongodb-org-shell
which I did not have, and which I installed, it returns repolist 0
.
Hello, Can you confirm the full echo command? It should be:
echo -e "[mongodb-org-4.0] \nname=MongoDB Repository\nbaseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.0/x86_64/\ngpgcheck=1 \nenabled=1 \ngpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc" | sudo tee /etc/yum.repos.d/mongodb-org-4.0.repo
For connecting to Amazon DocumentDB I recommend following the getting started guide, which details the VPC and security group configuration.
It looks that you're missing the /etc/yum.repos.d
directory. Are you on a Ubuntu 18 Cloud9 environment by any chance?
If this is the case, then the steps to install the mongo client on Ubuntu are:
- Add the MongoDB GPG key:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
- Add MongoDB repository:
sudo add-apt-repository 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse'
- Refresh packages list and install mongo client and tools:
sudo apt update
sudo apt install mongodb-org-shell mongodb-org-tools
Relevant questions
Can't use terminal in Cloud9 (tmux: invalid LC_ALL, LC_CTYPE or LANG)
asked a year agoI tried to migrate from C9.io and it's not showing any of my files
asked 3 years agoConnect Amazon DocumentDB Cluster from Outside Amazon VPC
asked 4 months agounable to connect to VPN in linux OS on django app on amazon lightsail
asked 4 months agomongodb-org-4.0.repo : No such file or directory al instalar el mongo shell en mi AWS Cloud9
asked 2 months ago"Connect failed" when trying to connect to the DocumentDB cluster from AWS C9
asked 2 months agoDocumentDB 4.0 vs mongo client
asked a year agoissue with $push aggregation operator
asked 3 years agocloud9 environment not visible
asked 3 years agoRDS certificate bundle is no longer trusted by MacOS Catalina
asked 2 years ago
I confirm, Here is the full output: