Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needingPoll resource not available #11

Closed
angelbotto opened this issue May 16, 2012 · 22 comments
Closed

needingPoll resource not available #11

angelbotto opened this issue May 16, 2012 · 22 comments

Comments

@angelbotto
Copy link

[Error: http://localhost:8082/api/check/needingPoll resource not available: getHostByName ENOTFOUND]

help me :c

@fzaninotto
Copy link
Owner

localhost doesn't seem to be accessible by Node. Do you have a custom YAML configuration? What hjappens if you paste this URL in a browser?

@angelbotto
Copy link
Author

mongodb:
  server:   localhost
  database: up-time
  user:     root 
  password:

monitor:
  name:                   origin
  apiUrl:                 'http://localhost:8082/api'
  pollingInterval:        10000      # ten seconds
  timeout:                5000       # five seconds

analyzer:
  updateInterval:         60000      # one minute
  qosAggregationInterval: 600000     # ten minutes
  pingHistory:            8035200000 # three months

autoStartMonitor: true

server:
  port:     8082

verbose: true # only used in dev

the default configuration file, do not change anything

@angelbotto
Copy link
Author

open url in browser and parse json data

[
{
"type": "http",
"name": "bottico",
"url": "http://botti.co",
"_id": "4fb3ea199ff8af3b65000002",
"downtime": 0,
"uptime": 0,
"isPaused": false,
"tags": [
"testing"
],
"maxTime": 1500,
"interval": 60000
}
]

and other error is tags

500 Error: failed to load tag testing
at Promise. (/home/labs/proyectos/nodejs/uptime/app/dashboard/app.js:112:27)
at Promise. (/home/labs/proyectos/nodejs/uptime/node_modules/mongoose/lib/promise.js:120:8)

@fzaninotto
Copy link
Owner

If your browser can reach the resource but Node can't, can it be because of a http proxy setting? Are you testing locally? What's your server system? Are you on the master HEAD?

@fzaninotto
Copy link
Owner

As for your tag resource returning an error, it disappears after a few minutes - Uptime computes stats for tags but doesn't create them with empty stats.

@angelbotto
Copy link
Author

I'm testing with ubuntu 12.04 m on my pc in local mode

the problem is that it does not save the information, nor does it create the tags, I guess ah not be stored.

@fzaninotto
Copy link
Owner

Are you on HEAD? This reminds me of #6.

@behrendtio
Copy link

Same here using the current HEAD and default config.

@fzaninotto
Copy link
Owner

And mongodb is installed and mongod started? No proxy, firewall or anything of that kind?

@behrendtio
Copy link

Mongodb is running (other node.js applications using mongodb running fine on the same server). No proxy, firewall or anything else. Tried it with both localhost:8082 and a named subdomain.

Edit: Btw: Using Node 0.4.13 (debian), maybe too old? Do I need 0.6.x?

@fzaninotto
Copy link
Owner

Can you contact me on my private email to give me an access to your dev box? I don't see how I can debug that otherwise, considering that I can't reproduce the issue in the 3 systems I've tested.

@behrendtio
Copy link

See edit in my comment above, maybe node.js version?

@fzaninotto
Copy link
Owner

aaah yes, I've had problems with Mongoose using Node 0.4. Maybe the http lib works differently, too. Please test with Node 0.6 and report. If it solves the problem, I'll update the package.json and documentation accordingly.

@behrendtio
Copy link

Just compiled 0.6.18. Works great on both Linux and MacOS X.

@behrendtio
Copy link

@angelbotto: Does an upgrade fix your problem, too?

@angelbotto
Copy link
Author

no, still can not get fix :/

@fzaninotto
Copy link
Owner

@angelbotto What's the latest Node.js version you've tested?

@angelbotto
Copy link
Author

v0.5.10-pre

@fzaninotto
Copy link
Owner

Uptime will only work on Node 0.6+, you must upgrade

@angelbotto
Copy link
Author

fixed upgrade to 0.6 and working :D

thanks

@gitbenb
Copy link

gitbenb commented Jul 30, 2014

i have the same issue but i'm on latest version of mongo/node, what can it be ?

my node version : v0.10.29
mongo version : MongoDB shell version: 2.4.10
npm : 1.4.14

it worked fine just before going offline & moving to another place, then restarted it (node monitor && node app) after reboot and now I get this error :

~/uptime $ node monitor && node app
loading plugin ./plugins/patternMatcher on monitor
loading plugin ./plugins/httpOptions on monitor
Monitor origin started
[Error: http://localhost:8082/api/checks/needingPoll resource not available: connect ECONNREFUSED]

I'm probably missing something obvious, thanks if anyone can redirect me to good direction

@sraupach
Copy link

sraupach commented Aug 5, 2014

Got the same issue:
node: v0.10.20
npm: 1.4.23
mongo: 2.6.3

root@:/opt/uptime/uptime# node app.js
loading plugin ./plugins/console on app
loading plugin ./plugins/patternMatcher on app
loading plugin ./plugins/httpOptions on app
info - socket.io started
loading plugin ./plugins/patternMatcher on monitor
loading plugin ./plugins/httpOptions on monitor
Monitor origin started
Express server listening on host .eu, port 80 in production mode
[Error: http://localhost:8082/api/checks/needingPoll resource not available: connect ECONNREFUSED]

A simple node.js http-server on port 8082 can be opened easily.

SOLVED: Same port fixed my issue! so API & Web Port need to be the same..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants