[jira] Updated: (COUCHDB-393) Cannot discover currently running http port if ini file specifies port 0
[ https://issues.apache.org/jira/browse/COUCHDB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis updated COUCHDB-393: -- Attachment: couchctl.patch This patch is a completely working implementation of grabbing the port using RPC. It adds an installed 'couchctl' command that you can use to print the port. Currently, this is the only functionality supported but if there's other stuff needed then that can be added easily. Of note is that this patch now gives couchdb a default node name of 'co...@host' so that it can be pinged by the RPC call. As such I included the patch on COUCHDB-381 so that the node name can be set to something else. couchctl requires knowing the node name to ping. This patch adds some bits to the build system so I'm adding it and assigning to Noah to get his opinion before committing. > Cannot discover currently running http port if ini file specifies port 0 > > > Key: COUCHDB-393 > URL: https://issues.apache.org/jira/browse/COUCHDB-393 > Project: CouchDB > Issue Type: Improvement > Components: HTTP Interface >Affects Versions: 0.9 > Environment: Ubuntu 9.04 >Reporter: Stuart Langridge > Attachments: couchctl.patch > > > It is currently not possible, if the ini file specifies port 0 as the http > port (so that the OS chooses a random port) to discover which port the OS > actually chose. > It would be nice if the currently running port was made available in the > statusline output (couchdb -s), but a log statement would be adequate; some > way that an external script can discover which port a running CouchDB is > listening on. > Edited discussion from #couchdb: > aquarius: well at a glance it appears couch_http passes the 0 to > mochiweb_http which passes it to the mochiweb_socket_server, which passes it > to gen_tcp, an erlang module that lets the underlying OS assign it. > mochiweb_socket_server then grabs that port and stores it. It has a get > method to retrieve properties but that needs to be exposed to mochiweb_http > so it would take a little work to do it. It's probably a JIRA ticket, unless > someone else sees a quicker approach > bitdiddle: you got that far and didn't find it? > davisp: is there a better way to find the port? > oh, is that not the bind port? > I was just thinking a log statement > davisp: the problem is if you specify 0 as the bind port (so the > OS chooses a port), how do you find out what was chosen? > aquarius: you have to look at the port returned by the socket > aquarius: in other words, CouchDB was never written to do that > AFAIK > davisp: I found it, just needs some work to expose it > aquarius: and by do that, I mean, we never put in a statement to log > that > mochiweb_http is the module that needs to bubble it up > davisp: I don't really mind whether it's a log statement or it's > exposed to couchdb -s (the latter seems tidier to me, but whichever), I just > want to be able to start couch on port 0 and then later find out which port > got chosen :) > aquarius: for the time being you can use something like netstat or > lsof, but we'll get a log statement in there or something -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Assigned: (COUCHDB-393) Cannot discover currently running http port if ini file specifies port 0
[ https://issues.apache.org/jira/browse/COUCHDB-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis reassigned COUCHDB-393: - Assignee: Noah Slater JIRA sure does make me want to break things. > Cannot discover currently running http port if ini file specifies port 0 > > > Key: COUCHDB-393 > URL: https://issues.apache.org/jira/browse/COUCHDB-393 > Project: CouchDB > Issue Type: Improvement > Components: HTTP Interface >Affects Versions: 0.9 > Environment: Ubuntu 9.04 >Reporter: Stuart Langridge >Assignee: Noah Slater > Attachments: couchctl.patch > > > It is currently not possible, if the ini file specifies port 0 as the http > port (so that the OS chooses a random port) to discover which port the OS > actually chose. > It would be nice if the currently running port was made available in the > statusline output (couchdb -s), but a log statement would be adequate; some > way that an external script can discover which port a running CouchDB is > listening on. > Edited discussion from #couchdb: > aquarius: well at a glance it appears couch_http passes the 0 to > mochiweb_http which passes it to the mochiweb_socket_server, which passes it > to gen_tcp, an erlang module that lets the underlying OS assign it. > mochiweb_socket_server then grabs that port and stores it. It has a get > method to retrieve properties but that needs to be exposed to mochiweb_http > so it would take a little work to do it. It's probably a JIRA ticket, unless > someone else sees a quicker approach > bitdiddle: you got that far and didn't find it? > davisp: is there a better way to find the port? > oh, is that not the bind port? > I was just thinking a log statement > davisp: the problem is if you specify 0 as the bind port (so the > OS chooses a port), how do you find out what was chosen? > aquarius: you have to look at the port returned by the socket > aquarius: in other words, CouchDB was never written to do that > AFAIK > davisp: I found it, just needs some work to expose it > aquarius: and by do that, I mean, we never put in a statement to log > that > mochiweb_http is the module that needs to bubble it up > davisp: I don't really mind whether it's a log statement or it's > exposed to couchdb -s (the latter seems tidier to me, but whichever), I just > want to be able to start couch on port 0 and then later find out which port > got chosen :) > aquarius: for the time being you can use something like netstat or > lsof, but we'll get a log statement in there or something -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-408) Futon _view URLs should be similar to the HTTP interface
[ https://issues.apache.org/jira/browse/COUCHDB-408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Volker Mische updated COUCHDB-408: -- Attachment: (was: futon-view-url.patch) > Futon _view URLs should be similar to the HTTP interface > > > Key: COUCHDB-408 > URL: https://issues.apache.org/jira/browse/COUCHDB-408 > Project: CouchDB > Issue Type: Improvement > Components: Administration Console >Affects Versions: 0.9.1 >Reporter: Volker Mische > Attachments: futon-view-url-2.patch > > > URLs of view in Futon normally look like: > http://localhost:5984/_utils/database.html?db/_design/designdocname/viewname > The HTTP interface is: > http://localhost:5984/db/_design/desigdocname/_view/viewname > The patch changes the URLs to: > http://localhost:5984/_utils/database.html?db/_design/designdocname/_view/viewname > It changes the dropdown menu on the top right to use this new URL, are there > any other places where you can get to a view? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-408) Futon _view URLs should be similar to the HTTP interface
[ https://issues.apache.org/jira/browse/COUCHDB-408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Volker Mische updated COUCHDB-408: -- Attachment: futon-view-url-2.patch Updated patch ("save view as" redirected to the wrong URL). > Futon _view URLs should be similar to the HTTP interface > > > Key: COUCHDB-408 > URL: https://issues.apache.org/jira/browse/COUCHDB-408 > Project: CouchDB > Issue Type: Improvement > Components: Administration Console >Affects Versions: 0.9.1 >Reporter: Volker Mische > Attachments: futon-view-url-2.patch > > > URLs of view in Futon normally look like: > http://localhost:5984/_utils/database.html?db/_design/designdocname/viewname > The HTTP interface is: > http://localhost:5984/db/_design/desigdocname/_view/viewname > The patch changes the URLs to: > http://localhost:5984/_utils/database.html?db/_design/designdocname/_view/viewname > It changes the dropdown menu on the top right to use this new URL, are there > any other places where you can get to a view? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: svn mirror returns 403 Forbidden
On 11 Jul 2009, at 20:26, alec resnick wrote: When trying to check out couchdb via `svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb` I get: svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://svn.apache.org/repos/asf/couchdb/trunk' Confirmed issue with jasondavies on #couchdb Saturday afternoon. I'm running svn 1.5.4 on ubuntu Jaunty x86 64 The issue seems to have been sorted now, for both US and EU servers. Cheers, -- Jason Davies www.jasondavies.com
svn mirror returns 403 Forbidden
When trying to check out couchdb via `svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb` I get: > svn: Server sent unexpected return value (403 Forbidden) in response to > OPTIONS request for 'http://svn.apache.org/repos/asf/couchdb/trunk' Confirmed issue with jasondavies on #couchdb Saturday afternoon. I'm running svn 1.5.4 on ubuntu Jaunty x86 64 -a. -- alec resnick a...@sproutward.org http://alecresnick.org 617.229.5036 256 Brookline St. / #2 Cambridge, MA 02139 --
[jira] Resolved: (COUCHDB-409) $.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined on error, causing a new doc to be created if the same doc is modified and saved again
[ https://issues.apache.org/jira/browse/COUCHDB-409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis resolved COUCHDB-409. --- Resolution: Fixed Assignee: Paul Joseph Davis Comitted in r793218 and backported to the 0.9.x branch > $.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined > on error, causing a new doc to be created if the same doc is modified and > saved again > - > > Key: COUCHDB-409 > URL: https://issues.apache.org/jira/browse/COUCHDB-409 > Project: CouchDB > Issue Type: Bug > Components: Administration Console >Affects Versions: 0.9.1, 0.10 >Reporter: Jason Davies >Assignee: Paul Joseph Davis > Fix For: 0.9.1 > > Attachments: jquery.couch.saveDoc.diff > > > Simple fix attached. Recommend that we include this in 0.9.1 as it's a > non-obvious annoyance that occurs when saving docs in Futon. > For example, if I try and save a doc and validation fails, and I fix the doc > and save again, it will be saved with a NEW document id, since doc._id is set > to undefined. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-410) JavaScript errors in validate_doc_update should be handled more gracefully
[ https://issues.apache.org/jira/browse/COUCHDB-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Davies updated COUCHDB-410: - Description: For example, if I create validate_doc_update: function (oldDoc, newDoc, userCtx) { doc.foo; } I am greeted by an "OS process timed out" message. In the logs, all I see is: OS Process :: Error converting object to JSON: TypeError: {Array:function (v) {var buf = [];for (var i = 0; i < v.length; i++) {buf.push(toJSON(v[i]));}return "[" + buf.join(",") + "]";}, Boolean:function (v) {return v.toString();}, Date:function (v) {var f = function (n) {return n < 10 ? "0" + n : n;};return "\"" + v.getUTCFullYear() + "-" + f(v.getUTCMonth() + 1) + "-" + f(v.getUTCDate()) + "T" + f(v.getUTCHours()) + ":" + f(v.getUTCMinutes()) + ":" + f(v.getUTCSeconds()) + "Z\"";}, Number:function (v) {return isFinite(v) ? v.toString() : "null";}, Object:function (v) {if (v === null) {return "null";}var buf = [];for (var k in v) {if (!v.hasOwnProperty(k) || typeof k !== "string" || v[k] === undefined) {continue;}buf.push(toJSON(k, val) + ": " + toJSON(v[k]));}return "{" + buf.join(",") + "}";}, String:function (v) {if (/["\\\x00-\x1f]/.test(v)) {v = v.replace(/([\x00-\x1f\\"])/g, function (a, b) {var c = subs[b];if (c) {return c;}c = b.charCodeAt();return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);});}return "\"" + v + "\"";}}[val != null ? val.constructor.name : "Object"] is not a function When really the problem is a ReferenceError (I should have used newDoc.foo or oldDoc.foo). The attached patch modifies toJSON() in utils.js so that it converts anything that isn't a String, Array, Date, Object etc. into a String. This makes the error appear in the popup in Futon when saving. This isn't necessarily the best thing to do as it modifies the semantics of toJSON(), and also we might want to keep the exception info in the logs, and not propagate it to the user. Perhaps it would be better to modify respond(obj) to produce a better error message in the logs (simply adding something that tried to log obj.toString() would suffice). was: For example, if I create validate_doc_update: function (oldDoc, newDoc, userCtx) { doc.myUndefinedProperty; } I am greeted by an "OS process timed out" message. In the logs, all I see is: OS Process :: Error converting object to JSON: TypeError: {Array:function (v) {var buf = [];for (var i = 0; i < v.length; i++) {buf.push(toJSON(v[i]));}return "[" + buf.join(",") + "]";}, Boolean:function (v) {return v.toString();}, Date:function (v) {var f = function (n) {return n < 10 ? "0" + n : n;};return "\"" + v.getUTCFullYear() + "-" + f(v.getUTCMonth() + 1) + "-" + f(v.getUTCDate()) + "T" + f(v.getUTCHours()) + ":" + f(v.getUTCMinutes()) + ":" + f(v.getUTCSeconds()) + "Z\"";}, Number:function (v) {return isFinite(v) ? v.toString() : "null";}, Object:function (v) {if (v === null) {return "null";}var buf = [];for (var k in v) {if (!v.hasOwnProperty(k) || typeof k !== "string" || v[k] === undefined) {continue;}buf.push(toJSON(k, val) + ": " + toJSON(v[k]));}return "{" + buf.join(",") + "}";}, String:function (v) {if (/["\\\x00-\x1f]/.test(v)) {v = v.replace(/([\x00-\x1f\\"])/g, function (a, b) {var c = subs[b];if (c) {return c;}c = b.charCodeAt();return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);});}return "\"" + v + "\"";}}[val != null ? val.constructor.name : "Object"] is not a function When really the problem is a ReferenceError. The attached patch modifies toJSON() in utils.js so that it converts anything that isn't a String, Array, Date, Object etc. into a String. This makes the error appear in the popup in Futon when saving. This isn't necessarily the best thing to do as it modifies the semantics of toJSON(), and also we might want to keep the exception info in the logs, and not propagate it to the user. Perhaps it would be better to modify respond(obj) to produce a better error message in the logs (simply adding something that tried to log obj.toString() would suffice). Clarified what the error is in my example. > JavaScript errors in validate_doc_update should be handled more gracefully > -- > > Key: COUCHDB-410 > URL: https://issues.apache.org/jira/browse/COUCHDB-410 > Project: CouchDB > Issue Type: Bug > Components: Database Core >Affects Versions: 0.9.1, 0.10 >Reporter: Jason Davies > Fix For: 0.9.1 > > Attachments: util.js.diff > > > For example, if I create validate_doc_update: > function (oldDoc, newDoc, userCtx) { > doc.foo; > } > I am greeted by an "OS process timed out" message. In the logs, all I see is: > OS Process :: Error converting object to JSON: TypeError: {Array:function (v) > {var buf = [];for (v
[jira] Updated: (COUCHDB-410) JavaScript errors in validate_doc_update should be handled more gracefully
[ https://issues.apache.org/jira/browse/COUCHDB-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Davies updated COUCHDB-410: - Attachment: util.js.diff Patch that modifies toJSON() so that toJSON(ReferenceError("doc.foo is not defined")) works. > JavaScript errors in validate_doc_update should be handled more gracefully > -- > > Key: COUCHDB-410 > URL: https://issues.apache.org/jira/browse/COUCHDB-410 > Project: CouchDB > Issue Type: Bug > Components: Database Core >Affects Versions: 0.9.1, 0.10 >Reporter: Jason Davies > Fix For: 0.9.1 > > Attachments: util.js.diff > > > For example, if I create validate_doc_update: > function (oldDoc, newDoc, userCtx) { > doc.myUndefinedProperty; > } > I am greeted by an "OS process timed out" message. In the logs, all I see is: > OS Process :: Error converting object to JSON: TypeError: {Array:function (v) > {var buf = [];for (var i = 0; i < v.length; i++) > {buf.push(toJSON(v[i]));}return "[" + buf.join(",") + "]";}, Boolean:function > (v) {return v.toString();}, Date:function (v) {var f = function (n) {return n > < 10 ? "0" + n : n;};return "\"" + v.getUTCFullYear() + "-" + > f(v.getUTCMonth() + 1) + "-" + f(v.getUTCDate()) + "T" + f(v.getUTCHours()) + > ":" + f(v.getUTCMinutes()) + ":" + f(v.getUTCSeconds()) + "Z\"";}, > Number:function (v) {return isFinite(v) ? v.toString() : "null";}, > Object:function (v) {if (v === null) {return "null";}var buf = [];for (var k > in v) {if (!v.hasOwnProperty(k) || typeof k !== "string" || v[k] === > undefined) {continue;}buf.push(toJSON(k, val) + ": " + toJSON(v[k]));}return > "{" + buf.join(",") + "}";}, String:function (v) {if > (/["\\\x00-\x1f]/.test(v)) {v = v.replace(/([\x00-\x1f\\"])/g, function (a, > b) {var c = subs[b];if (c) {return c;}c = b.charCodeAt();return "\\u00" + > Math.floor(c / 16).toString(16) + (c % 16).toString(16);});}return "\"" + v + > "\"";}}[val != null ? val.constructor.name : "Object"] is not a function > When really the problem is a ReferenceError. The attached patch modifies > toJSON() in utils.js so that it converts anything that isn't a String, Array, > Date, Object etc. into a String. This makes the error appear in the popup in > Futon when saving. > This isn't necessarily the best thing to do as it modifies the semantics of > toJSON(), and also we might want to keep the exception info in the logs, and > not propagate it to the user. Perhaps it would be better to modify > respond(obj) to produce a better error message in the logs (simply adding > something that tried to log obj.toString() would suffice). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (COUCHDB-410) JavaScript errors in validate_doc_update should be handled more gracefully
JavaScript errors in validate_doc_update should be handled more gracefully -- Key: COUCHDB-410 URL: https://issues.apache.org/jira/browse/COUCHDB-410 Project: CouchDB Issue Type: Bug Components: Database Core Affects Versions: 0.9.1, 0.10 Reporter: Jason Davies Fix For: 0.9.1 For example, if I create validate_doc_update: function (oldDoc, newDoc, userCtx) { doc.myUndefinedProperty; } I am greeted by an "OS process timed out" message. In the logs, all I see is: OS Process :: Error converting object to JSON: TypeError: {Array:function (v) {var buf = [];for (var i = 0; i < v.length; i++) {buf.push(toJSON(v[i]));}return "[" + buf.join(",") + "]";}, Boolean:function (v) {return v.toString();}, Date:function (v) {var f = function (n) {return n < 10 ? "0" + n : n;};return "\"" + v.getUTCFullYear() + "-" + f(v.getUTCMonth() + 1) + "-" + f(v.getUTCDate()) + "T" + f(v.getUTCHours()) + ":" + f(v.getUTCMinutes()) + ":" + f(v.getUTCSeconds()) + "Z\"";}, Number:function (v) {return isFinite(v) ? v.toString() : "null";}, Object:function (v) {if (v === null) {return "null";}var buf = [];for (var k in v) {if (!v.hasOwnProperty(k) || typeof k !== "string" || v[k] === undefined) {continue;}buf.push(toJSON(k, val) + ": " + toJSON(v[k]));}return "{" + buf.join(",") + "}";}, String:function (v) {if (/["\\\x00-\x1f]/.test(v)) {v = v.replace(/([\x00-\x1f\\"])/g, function (a, b) {var c = subs[b];if (c) {return c;}c = b.charCodeAt();return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);});}return "\"" + v + "\"";}}[val != null ? val.constructor.name : "Object"] is not a function When really the problem is a ReferenceError. The attached patch modifies toJSON() in utils.js so that it converts anything that isn't a String, Array, Date, Object etc. into a String. This makes the error appear in the popup in Futon when saving. This isn't necessarily the best thing to do as it modifies the semantics of toJSON(), and also we might want to keep the exception info in the logs, and not propagate it to the user. Perhaps it would be better to modify respond(obj) to produce a better error message in the logs (simply adding something that tried to log obj.toString() would suffice). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-409) $.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined on error, causing a new doc to be created if the same doc is modified and saved again
[ https://issues.apache.org/jira/browse/COUCHDB-409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Davies updated COUCHDB-409: - Attachment: jquery.couch.saveDoc.diff > $.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined > on error, causing a new doc to be created if the same doc is modified and > saved again > - > > Key: COUCHDB-409 > URL: https://issues.apache.org/jira/browse/COUCHDB-409 > Project: CouchDB > Issue Type: Bug > Components: Administration Console >Affects Versions: 0.9.1, 0.10 >Reporter: Jason Davies > Fix For: 0.9.1 > > Attachments: jquery.couch.saveDoc.diff > > > Simple fix attached. Recommend that we include this in 0.9.1 as it's a > non-obvious annoyance that occurs when saving docs in Futon. > For example, if I try and save a doc and validation fails, and I fix the doc > and save again, it will be saved with a NEW document id, since doc._id is set > to undefined. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (COUCHDB-409) $.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined on error, causing a new doc to be created if the same doc is modified and saved again
$.couch.saveDoc() in jquery.couch.js sets doc._id and doc._rev to undefined on error, causing a new doc to be created if the same doc is modified and saved again - Key: COUCHDB-409 URL: https://issues.apache.org/jira/browse/COUCHDB-409 Project: CouchDB Issue Type: Bug Components: Administration Console Affects Versions: 0.9.1, 0.10 Reporter: Jason Davies Fix For: 0.9.1 Attachments: jquery.couch.saveDoc.diff Simple fix attached. Recommend that we include this in 0.9.1 as it's a non-obvious annoyance that occurs when saving docs in Futon. For example, if I try and save a doc and validation fails, and I fix the doc and save again, it will be saved with a NEW document id, since doc._id is set to undefined. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.