I would like to use a GUI instead of just the Mongo shell on my cloud nine instance. Is there a way I can connect a tool like Mongo chef to the Mongo server that's running on cloud nine?
Currently Cloud9 workspaces only forward one port, port 8080. So in order for your GUI app to gain access to your mongodb, it will have to be listening on 0.0.0.0:8080 and you have set your application url to public (if you don't know how to do that, just click on 'Share' near the top left of the IDE, and click 'Public' next to 'Application').
However, the problem is that since you're also probably running your application on port 8080, you'll have to do some housekeeping and use different ports for Mongodb while your app is running and when you need to access the db using your GUI app.
Related
I have MongoDB installed on my desktop, using which I have developed a web application. I want to now deploy this webapp on an EC2 linux instance and test it. I don't want to setup another mongoDB on the EC2 separately, rather use the one on my desktop. I understand that it is not that simple to put my ip and mongo port and just connect.
I have added port-forwarding settings on my router like this -
Also I have opened my firewall for this port by adding an inbound rule.
Yet I'm not able to connect. What am I missing here?
Thanks in advance
I've just finished setting up a Free Tier Cluster on MongoDB Atlas and wanted to play with MongoDB Charts so I followed the official installation guide.
It all went well (with a few glitches) but now I don't know where do I go to access the Charts Dashboard. It doesn't say anywhere. Any help?
Thanks!
MongoDB Charts beta runs as a web server in a Docker container, and it is exposed over port 80 on the host.
If you are logged into the host running the container you can simply go to http://localhost in a web browser.
If you are logged into a different machine, you can use the host's name or IP address. E.g. if the server is called "chartsserver" you would access it via http://chartsserver.
I was using Galaxy to host my meteor app and recently decided to host my app with Amazon Cloudfront serving static webpage (angular client) and connect that to my meteor app running on an EC2 container.
I have the static page working and I have the meteor app on the EC2 container, which points to a remote mongo server, working as well. I am using the meteor-client-bundler package to attempt to connect the client (static cloudfront) to the Meteor server via DDP URL. Here is where I am stuck.
The DDP Url should be my meteor server correct? Hosted at ec2....amazonaws.com)? I feel like it has to be because I have publications and methods on the server I will need to hit constantly. If that is correct, then what if I also want to have two EC2 containers running the same Meteor app? Just like in Galaxy, in case 1 is getting maintenance work done or goes down, I want the backup to take over. How can I set up two different DDP urls?
You should use a custom domain for the server, and use that custom domain in the DDP URL. While using the EC2 address will work, it's better to use a different address, especially if you ever want to move to another provider.
You can use NGINX as a reverse proxy to have 2 or more Meteor apps on the one box. It's not too difficult to set up.
You can also use Meteor up (aka mup) to do multiple deployments to the same box. http://meteor-up.com/ Meteor up will give you a very simple way to deploy, it will even revert to the previous version if something goes wrong automatically. You can even configure it to run letsencrypt to give you https security, and automatically renew the certs.
For anyone who is new to this stuff like I am, I figured out to buy another domain name, use dns (route 53) to a load balancer (elastic beanstalk) which handles multiple ec2s for 1 domain, and then point your ddp from the client to the domain. Boom. Thanks for the help #Mikkel
I have been stuck trying to figure out why my Cloud SQL VM is refusing my connection from my machine (whom ip address I have added as a subnet). I cann SSH into the VM but i cannot access the VM from a browser to make SQLs. I have scoured the internet for days trying to find a fix but i cannot seem to get pass this point. My apache listens to port 80. Also Id like to add that I have been connecting to my Mysql db for months through php and making sqls so I do not believe the problem is with apache. However if it is please point me to where i should be looking.
It sounds like you have MySQL running on a GCE VM, not an actual CloudSQL instance (that is a different service from GCE). Is that right?
If so, then if you are trying to connect from your local machine directly to the mysql instance, you are probably getting blocked by the firewall. Go to the networks tab (under Compute Engine) on the cloud console and see what firewall rules you have enabled. You might need to add one for 3306 or whatever port you are using.
Im reading the mongodb guide, but I dont get this:
mongodb://fred:foobar#localhost
It says I can connect to the mongodb through web browser.
I have tried this, but it doesn't work. Safari/Firefox can't recognize the mongodb protocol.
And why should I do it?
Isn't the mongodb server just for connecting through the command line?
And what is the difference between port 27017 and 28017?
Should I connect through http or mongodb protocol?
When you start mongod (the MongoDB daemon), it starts listening on two ports by default.
27017: the default port accessed by the various MongoDB drivers.
28017: a port that handles HTTP requests and provides some general monitoring.
What you've listed mongodb://fred:foobar#localhost actually represents this: mongodb://fred:foobar#localhost:27017 and this is the access protocol for MongoDB drivers.
The other "thing" you're seeing is port 28017. This is (by default) simply an overview of what's happening with the mongod instance on that server. Requests made from a web browser to this port will show an HTML output of the server overview.
If you start mongod with a different port number (i.e.: 7777), the "monitor" port will always be 1000 higher (i.e.: 8777).
If you want some advanced features like the ability to query via the web browser, you can start mongod with the --rest switch. You will then be able to run certain queries with a simple http get requestlink text (http://localhost:8777/mydb/mycollection/?filter_a=1).
If you're using language-specific MongoDB drivers (like most people will). Then you'll find that you'll have "connection strings" of the form mongodb://user:pwd#host:port/. These are similar in purpose to the usual connection strings you're used to for other Database products.
Increment by one thousand (28017), and use HTTP, not mongodb.
Note that this will "connect" you to the mongodb process, but it's not like phpMyAdmin or anything.