Adding a .NET with redirect crashes server. #97

Closed
rjayako opened this Issue Jan 28, 2013 · 6 comments

Projects

None yet

3 participants

@rjayako
rjayako commented Jan 28, 2013

Adding a url with .NET application with redirect seems to crash the app.js server.
We checked the ping table in Mongo db, it was empty, our guess is that you index the pings somewhere and when the ping didn't get stored, it's pointing to a null object.

@rjayako
rjayako commented Jan 28, 2013

To test this issue, we cleared up the whole db, and adding just one link (the problematic link, .asp with redirect) found that it's find when right after added, and it will crash once the page redirects to the Check page.

Here is the error code on the console

Mongoose: checks.update({ _id: ObjectId("5106af53bdefffaccc000002") }) { '$set': { lastTested: new Date("Mon, 28 Jan 2013 17:03:18 GMT") } } { safe: true }

https.js:97
throw new Error('Protocol:' + options.protocol + ' not supported.');
^
Error: Protocol:http: not supported.
at Object.exports.request (https.js:97:11)
at Object.exports.get (https.js:109:21)
at HttpsPoller.poll (/Users/rjayako/uptime/lib/pollers/https.js:53:24)
at HttpsPoller.onResponseCallback (/Users/rjayako/uptime/lib/pollers/https.js:75:12)
at ClientRequest.g (events.js:192:14)
at ClientRequest.EventEmitter.emit (events.js:96:17)
at HTTPParser.parserOnIncomingClient as onIncoming
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at CleartextStream.socketOnData as ondata
at CleartextStream.CryptoStream._push (tls.js:544:27)

@fzaninotto
Owner

is the original check in http or https? What's the redirection like? Are you using the latest Node & Uptime versions?

@rjayako
rjayako commented Jan 28, 2013

We are using Node verison 0.8.18
and uptime is latest build as well.
The original check is https and it direct from https://www.xxx.com to https://www.xxx.com/login.asp

@2004028
2004028 commented Jan 28, 2013

When Uptime do a check, it must indexed the check @ some place, even if the returned result doesn't fit in the format to be store in Mongodb's Pings table.
Then the index created when checking will be pointing @ a null object.
The server seems to stop there.

Similar issue observed with TCP links

@fzaninotto
Owner

Could you test the fix I committed in branch https_redirect?

@rjayako
rjayako commented Jan 29, 2013

This seems to solve the crash issue. Thank you.

@fzaninotto fzaninotto added a commit that closed this issue Jan 30, 2013
@fzaninotto Fix redirection from https to http
Closes #97
6df1ced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment