How to get past the MongoDB port error to launch the examples? - meteor

I'm getting started with Meteor, using the examples:
https://www.meteor.com/examples/parties
If I deploy and load the deployment url ( http://radically-finished-parties-app.meteor.com/ ) , the app runs ... nothing magic there... it was an easy example
My issue occurs when I want to run it locally, I get the following message
"You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number"
I got meteor running through the terminal command:
meteor --port 3004
Setup:
- Mac OS 10.9
- Chrome 31

This is happening because you are accessing the mongodb port in your web browser.
When you run a meteor app, e.g on port 3004
Port 3004 would be a web proxy to port 3005
Port 3005 would be the meteor app in a 'raw' sort of sense (without the websockets part.. i think)
Port 3006 would be the mongodb (which you are accessing).
Try using a different port. Or use a simpler port e.g just run meteor and access port 3000 in your web browser.
If the reason you moved the port number up because it said the port is in use the meteor app may not have exited properly on your computer. Restart your machine or have a look at activity monitor to kill the rogue node process.
I think what might have happened is you ran in on 3000, then moved the ports up and the previous one may have not been exited correctly so what you're seeing is a mongodb instance of a previous meteor instance.

This happens when you run another meteor on port 2999, forget about it and try to start a second instance on the usual port.

Try making sure Meteor is using the local embedded mongo db, which it will manage on its own:
export MONGO_URL=''

Something changed in my bash settings that I didn't copy over to zsh. I uninstalled zsh and meteor can now find and access mongo.

Related

Meteor ddp-client.js socksjs ERR_CONNECTION_REFUSED on local

The problem
I'm having an issue where when I start my local dev server with meteor, about 3/5 times the client's socksjs connection via ddp-client.js isn't able to connect and gets an ERR_CONNECTION_REFUSED error. All other connections work fine (websocket, JS, css, etc).
I'm seeing this in the console
The socks is attempting to connect to 192.168.1.14, which is my correct internal ip.
What I've tried
setting the port manually with meteor --port 3000
waiting for Meteor.status().status === 'connected' on the client before making any calls
If you'd like to recreate the problem yourself you can pull down the package I'm working on, ProseMeteor at commit 51c0a304338228102edc75427f72e689a7aafb8a and try running the app yourself by running the bash run_demo script, you should see the problem when you visit http://localhost:3000.
I appreciate any help!

How to get the PORT number it is listening on?

I tried process.env['PORT'], but this returns an unrelated number.
I'm using Meteor 0.9.2.2.
I guess you're running your app using meteor command. When you do that, it will first start a proxy server which will listen on the port you give (by default 3000) and forward requests to your meteor application which listens on some random available port. Meteor does this to automatically refreshes the server when you modify a file and for some other cool features.
If you build your app using meteor build --directory /my/build/path/ and run it, process.env.PORT will have the correct port number.

Meteor 0.9.2 remote connection issue

Not sure if it's just a coincidence or a bug but after updating to 0.9.2 I lost my remote connections to any of my Meteor apps. localhost:3000 works fine but remote access to host:3000 or any other port I try cannot connect.
I had exactly the same symptoms with the new Meteor (0.9.2.1), I was able to connect fine on my development server using localhost:3000, but I received an error when attempting to connect to that server using the NETBIOS name (which I have been doing successfully since Blaze). Example URL:
v-as-nodejs:3000
This worked fine before but does not with the latest Meteor.
I was also able to overcome this issue by specifying an IP address and port explicitly in the Meteor server startup command:
meteor --port 192.168.1.108:3000
What is interesting is that it seems as long as the IP address in the --port parameter matches the private network address of the server, you can still connect to your server using a logical name. In my case, my server is in a DMZ on my private network, and I can use the public domain name to get to the server. I can also use the server's NETBIOS name, both work fine.
I don't fully understand why this would work unless node.js or Meteor is doing some internal comparison. It is certain though that this is a matter of either the Meteor upgrade or the Node.js upgrade.
Use --port:host:port
example: meteor run --port:192.168.168.164:6969
Binding to a specific IP seems to solve the problem:
meteor run -p 192.168.2.3:8080

how can I troubleshoot meteor just hanging?

Hi I am trying out meteor for first time today.
my symptoms: meteor just hangs when trying to connect to port 3000 (it is listening, checked with lsof and looking at ps) a mongo instance is started on port 3002 but i can not connect to it with mongo (so perhaps neither can node ?)
background: I do already have mongo 2.0.3 installed and running (can it be a conflict?)
What can I do to troubleshoot and get meteor started ?
Site was bugging me to accept an answer or start a bounty...So here is explanation of my comment:
localhost on my machine resolves to ipv6 address first and meteor
binds only to 127.0.0.1.
So to answer the specific question of "how to troubleshoot":
I used lsof -i to verify that the meteor mongo instance was actually listening. This showed me that is was listening on 127.0.0.1. This eliminated the concept of mongo not listening. next i did host my machine's name and noticed the ipv6 came back first. this sparked a hunch and led me to force meteor to connect to 127.0.0.1 instead of localhost and it worked.
Well, check that port 3000 is open netstat -a
try a telnet localhost 3000
Use firefox extension TamperData or any other flow analysis tools to see what's going on at the HTTP level http://tamperdata.mozdev.org/
Have you tried to run against the bundled node and mongodb ?

Heroku run console get "Timeout awaiting process"

No way to have console wired with Heroku lately:
lsoave#ubuntu:~/rails/github/gitwatcher$ heroku run console
Running console attached to terminal...
Timeout awaiting process
lsoave#ubuntu:~/rails/github/gitwatcher$
Does it happen to anyone else ?
I had the same problem on the ISP FastWeb, which is an ISP here in Italy. Based on my Googling, it appears that they block port 5000.
To get around it for now, I am running the following:
heroku run:detached rake db:migrate
That tells it to run without waiting to connect to my machine on port 5000.
Then, you can examine the logs for your process you just kicked off. (The heroku command will tell you this after you run it):
heroku logs -p run.1
That tells it to output the logs for the running process.
But I found that the logs command was exiting even though my process was still running.
To get around that, you can add "-t" if you want to "tail" the logs:
heroku logs -p run.1 -t
You'll know your process is done when you see something like this in the logs:
2012-10-14T15:36:41+00:00 heroku[run.1]: Process exited with status 0
2012-10-14T15:36:41+00:00 heroku[run.1]: State changed from up to complete
I'm sure someone could whip up a script that would
Run the given heroku command with run:detached
Examine the output to determine what its process name was (run.1, run.2, etc)
run heroku logs -p run.1 -t and show me the output
exit the logs process when it sees something like State changed from up to complete
From: http://devcenter.heroku.com/articles/oneoff-admin-ps
The heroku run process opens a connection to Heroku on port 5000. If
your local network or ISP is blocking port 5000, or you are
experiencing a connectivity issue, you will see an error similar to:
$ heroku run rails console
Running rails console attached to terminal...
Timeout awaiting process
You can test your connection to Heroku by trying to connect directly
to port 5000 by using telnet to rendezvous.heroku.com. A successful
session will look like this:
$ telnet rendezvous.heroku.com 5000
Trying 50.19.103.36...
Connected to ec2-50-19-103-36.compute-1.amazonaws.com.
Escape character is '^]'.
If you do not get this output, your computer is being blocked from
accessing our services. We recommend contacting your IT department,
ISP, or firewall manufacturer to move forward with this issue.
There's a way to bypass this restriction by executing commands you were going to execute with 'heroku run ...' directly as system calls.
For this heroku command:
heroku run rake db:migrate
One could make a call in Ruby
system("rake db:migrate")
This call could be done as a result on some HTTP GET request - you better protect by some means, so that it wouldn't be accessible for strangers.
It's not a nice way - but when you don't have a choice - it works.
I had the same problem on the ISP FastWeb, which is an ISP here in Italy.
The most simple way to overcome the problem is set a VPN when you are using heroku run (something)
Personally I use Tunnel Bear that offer you 0.5GB of internet traffic for free
I've just connected successfully to a console on Heroku
Is it all apps or just a single one? I'd suggest checking your heroku gem is up to date, that you can run other commands like heroku ps, restart your application via heroku restart - if you've tried these then get in touch with Heroku support as something is wrong with your application.

Resources