status-code 404 on our iriscouch when we contact it using nano, but not when using curl or a browser #109
Comments
CouchDB doesn't listen on port 443. It's 5984 or 6984 (HTTPS). Maybe this is the problem? |
Can you send me a reproducible test case please? (like 20 lines of code showing your problem) |
Closing this issue. Please reopen when you have the time to answer to my questions |
This was Iris Couch downtime, sorry. |
@dscape sorry about the delay. CouchDB doesn't listen on port 443. It's 5984 or 6984 (HTTPS).
Today I will work on sending you a tiny node app containing the code necessary to reproduce the error so you can pick into it. It's not due to iriscouch being down... we still get the error. |
@cesine please make a concise test case, using express is surely not concise. You can't expect me to go and look at hundreds of lines of code for something that should look like: var nano = require('nano');
var users = nano("http://some.irisicouch.com/myusersdb");
users.view('users', 'aview', function (err, body) {
// some code
}); |
I don't know how to use multiple nano instances with password protection in your test suite, pathetic eh? I cut the fluff. It's now at 68 lines, if you want only the case that fails, here it is: var db = nano("https://admin:none@cesine.iriscouch.com:443/teststatus404error");
db.view("users", "usermasks", function(error, body) {
console.log("It should connect to pass protected iriscouch via 443 ");
if (error) {
console.log("Fail");
} else {
console.log("Pass");
}
}); The rest of the test cases are to show that this might not be desired behaviour: |
Some extra information. (Charles Proxy FTW.) For a URL of the format https://:443, both curl and the browsers Nano sets it to "something:443" So you can work around this by removing the ":443" (the "https" will still However on the Iris Couch side I feel like we could fix this too. But first On Sat, Nov 10, 2012 at 4:33 AM, cesine notifications@github.com wrote:
Iris Couch |
@jhs Have I mentioned that you are awesome! Thanks for digging. We are trying to keep all our couch connections paralel hence the port in all our configs. I was just going to switch our iris couches to 6984 but I think the right solution is to is to work around the Host header by going through our code and make sure we can use empty string ports as you suggested. We were originally doing that with our iris couches but for some reason we switched to specifying the ports... @dscape In an unrelated side note, we are now connecting to couches that are running out of directories too eg https://localhost/adirectory/:6984 which is pretty abnormal, but the server admin insists on running everything through apache (I know...) so he can use his existing DOS monitors, and virtual hosts weren't an option. These new couches aren't in production yet, but if we get hiccups I'll see if I can start contributing to nano by tests and a patch for this issue since our project is fast becoming an edge case, we'll probably need to contrib at some point. This issue seems small enough that its a good place to start learning the codebase. I'd say I'll know more in about a week or two... until then the workaround will work just fine for our case. |
2 weeks have passed... we are sticking with not specifying a port on iriscouch. no time to dig in deeper to the request library or nano since its not really necessary for this minor issue. |
New request landed in ff99077 |
We are getting a status-code 404 on our iriscouch when we contact it using nano in node.js at url like this:
https://adminuser:paswrod@xxxxx.iriscouch.com:443/_users/_design/users/_view/aview
It seems to redirect/work fine using curl or a browser. Everything else has been going great (~3 mos live), I suspect it's something with the nano library but its hard to contribute a solution since I'm not sure what iriscouch is doing to get us to our instance. I'd love any suggestions or if anyone has experienced something similar...
Here is the full error we are getting:
The text was updated successfully, but these errors were encountered: