You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been following along with the book at http://books.couchdb.org/relax/application-deployment and everything works fine with sudo port install couchdb, with an svn co of couchdb, and via couchdbx, EXCEPT I can't get the git pull of Sofa to work, no way no how. Tests of CouchDB itself passed essentially 100%, with a variation here or there, but this error never goes away.
Below is from the console in couchdbx:
1> [info] [<0.74.0>] OS Process Log Message: function raised error: TypeError: req has no properties
1> [info] [<0.74.0>] OS Process Log Message: stacktrace: listPath("index","recent-posts",[object Object])@:60
(null,null,[object Object],undefined)@:133
apply(null,[object Array])@:0
runRenderFunction(function (head, req) {var templates = {index:{head:"\n\n \n <title><%= title %></title>\n <link rel="stylesheet" href="../../screen.css" type="text/css"/>\n <link rel="alternate" type="application/atom+xml" \n title="Atom Feed" href="<%= feedPath %>"/>\n \n \n <div id="header">\n <a id="edit" href="../../_show/edit">Create new post\n
I've been following along with the book at http://books.couchdb.org/relax/application-deployment and everything works fine with sudo port install couchdb, with an svn co of couchdb, and via couchdbx, EXCEPT I can't get the git pull of Sofa to work, no way no how. Tests of CouchDB itself passed essentially 100%, with a variation here or there, but this error never goes away.
Below is from the console in couchdbx:
1> [info] [<0.74.0>] OS Process Log Message: function raised error: TypeError: req has no properties
1> [info] [<0.74.0>] OS Process Log Message: stacktrace: listPath("index","recent-posts",[object Object])@:60
(null,null,[object Object],undefined)@:133
apply(null,[object Array])@:0
runRenderFunction(function (head, req) {var templates = {index:{head:"\n\n \n <title><%= title %></title>\n <link rel="stylesheet" href="../../screen.css" type="text/css"/>\n <link rel="alternate" type="application/atom+xml" \n title="Atom Feed" href="<%= feedPath %>"/>\n \n \n <div id="header">\n <a id="edit" href="../../_show/edit">Create new post\n
<a href="<%= index %>"><%= title %>
\n \n <div id="tags-front">\n <div id="content">\nRecently...
\n <ul id="posts">\n", tail:" \n <a class="paginate" href="<%= older %>">older posts\n \n\n<script src="/_utils/script/json2.js"></script>\n<script src="/_utils/script/jquery.js"></script>\n<script src="/_utils/script/jquery.couch.js"></script>\n<script src="../../vendor/couchapp/jquery.couchapp.js"></script>\n<script type="text/javascript" charset="utf-8">\n $.CouchApp(function(app) {\n \n // this could be a real jQuery plugin. probably is. #lazycode\n $('.date').each(function() {\n $(this).text(app.prettyDate(this.innerHTML));\n });\n \n app.design.view("tags",{\n descending: true, \n group: true,\n success: function(json) {\n var total = 0;\n for(var idx in json.rows) {\n total += json.rows[idx].value;\n }\n var tags = [];\n for(var idx in json.rows) {\n var percent = Math.ceil(Math.pow((json.rows[idx].value / total), 0.25) * 200);\n tags.push('<span style="font-size:'+percent+'%;">' + json.rows[idx].key + '');\n }\n $("#tags-front").append(tags.join(", "));\n }\n });\n });\n</script>\n", row:"<a href="<%= link %>"><%= title %>
\n <span class="date"><%= date %>\n <div class="body"><%= summary %>\n<a href="<%= index %>"><%= title %>
\n \n <div id="tags-front">\n <div id="content">\nRecently...
\n <ul id="posts">\n", tail:" \n <a class="paginate" href="<%= older %>">older posts\n \n\n<script src="/_utils/script/json2.js"></script>\n<script src="/_utils/script/jquery.js"></script>\n<script src="/_utils/script/jquery.couch.js"></script>\n<script src="../../vendor/couchapp/jquery.couchapp.js"></script>\n<script type="text/javascript" charset="utf-8">\n $.CouchApp(function(app) {\n \n // this could be a real jQuery plugin. probably is. #lazycode\n $('.date').each(function() {\n $(this).text(app.prettyDate(this.innerHTML));\n });\n \n app.design.view("tags",{\n descending: true, \n group: true,\n success: function(json) {\n var total = 0;\n for(var idx in json.rows) {\n total += json.rows[idx].value;\n }\n var tags = [];\n for(var idx in json.rows) {\n var percent = Math.ceil(Math.pow((json.rows[idx].value / total), 0.25) * 200);\n tags.push('<span style="font-size:'+percent+'%;">' + json.rows[idx].key + '');\n }\n $("#tags-front").append(tags.join(", "));\n }\n });\n });\n</script>\n", row:"<a href="<%= link %>"><%= title %>
\n <span class="date"><%= date %>\n <div class="body"><%= summary %>\nfunction encodeOptions(options) {var buf = [];if (typeof options == "object" && options !== null) {for (var name in options) {if (!options.hasOwnProperty(name)) {continue;}var value = options[name];if (name == "key" || name == "startkey" || name == "endkey") {value = toJSON(value);}buf.push(encodeURIComponent(name) + "=" + encodeURIComponent(value));}}if (!buf.length) {return "";}return "?" + buf.join("&");}
function concatArgs(array, args) {for (var i = 0; i < args.length; i++) {array.push(args[i]);}return array;}
function makePath(array) {var options, path;if (typeof array[array.length - 1] != "string") {options = array.pop();}path = array.map(function (item) {return encodeURIComponent(item);}).join("/");if (options) {return path + encodeOptions(options);} else {return path;}}
function assetPath() {var p = req.path, parts = ["", p[0], p[1], p[2]];return makePath(concatArgs(parts, arguments));}
function showPath() {var p = req.path, parts = ["", p[0], p[1], p[2], "_show"];return makePath(concatArgs(parts, arguments));}
function listPath() {var p = req.path, parts = ["", p[0], p[1], p[2], "_list"];return makePath(concatArgs(parts, arguments));}
function olderPath(before_key) {if (!before_key) {return null;}var q = req.query;q.startkey = before_key;q.skip = 1;return listPath("index", "recent-posts", q);}
function makeAbsolute(req, path) {return "http://" + req.headers.Host + path;}
function f(n) {return n < 10 ? "0" + n : n;}
Date.prototype.rfc3339 = function () {return this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z";};Date.prototype.toJSON = function () {return this.getUTCFullYear() + "/" + f(this.getUTCMonth() + 1) + "/" + f(this.getUTCDate()) + " " + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + " +0000";};var cache = {};
function template(str, data) {var fn = cache[str] || new Function("obj", "var p=[],print=function(){p.push.apply(p,arguments);};" + "with(obj){p.push('" + str.replace(/\n/g, "\n").replace(/[\r\t]/g, " ").replace(/'(?=[^%]*%>)/g, "\t").split("'").join("'").split("\t").join("'").replace(/<%=(.+?)%>/g, "',$1,'").split("<%").join("');").split("%>").join("p.push('") + "');}return p.join('');");cache[str] = fn;return data ? fn(data) : fn;}
var indexPath = listPath("index", "recent-posts", {descending:true, limit:5});var feedPath = listPath("index", "recent-posts", {descending:true, limit:5, format:"atom"});return respondWith(req, {html:function () {send(template(templates.index.head, {title:blog.title, feedPath:feedPath, newPostPath:showPath("edit"), index:indexPath, assets:assetPath()}));var row, key;while ((row = getRow())) {var post = row.value;key = row.key;send(template(templates.index.row, {title:post.title, summary:post.summary, date:post.created_at, link:showPath("post", row.id), assets:assetPath()}));}return template(templates.index.tail, {assets:assetPath(), older:olderPath(key)});}, atom:function () {
function makeEntry(row) {var entry = ;entry.id = makeAbsolute(req, "/" + encodeURIComponent(req.info.db_name) + "/" + encodeURIComponent(row.id));entry.title = row.value.title;entry.content = row.value.html;entry.content.@type = "html";entry.updated = (new Date(row.value.created_at)).rfc3339();entry.author = {row.value.author};entry.link.@href = makeAbsolute(req, showPath("post", row.id));entry.link.@rel = "alternate";return entry;}
var f = ;f.title = blog.title;f.id = makeAbsolute(req, indexPath);f.link.@href = makeAbsolute(req, feedPath);f.link.@rel = "self";f.generator = "Sofa on CouchDB";var row = getRow();var date = row ? new Date(row.value.created_at) : new Date;f.updated = date.rfc3339();send(f.toXMLString().replace(/</feed>/, ""));row && send(makeEntry(row));while ((row = getRow())) {send(makeEntry(row));}return "";}});},[object Array])@couchdb/share/couchdb/server/main.js:406
@couchdb/share/couchdb/server/main.js:381
1> [info] [<0.74.0>] OS Process Log Message: 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
1> [error] [<0.74.0>] ** Generic server <0.74.0> terminating
** Last message in was {prompt,
[<<"list_tail">>,
{[{<<"info">>,
{[{db_name,<<"blogdb">>},
{doc_count,1},
{doc_del_count,0},
{update_seq,14},
{purge_seq,0},
{compact_running,false},
{disk_size,1978064},
{instance_start_time,
<<"1247583975652874">>}]}},
{<<"verb">>,'GET'},
{<<"path">>,
[<<"blogdb">>,<<"design">>,<<"sofa">>,
<<"list">>,<<"index">>,<<"recent-posts">>]},
{<<"query">>,
{[{<<"descending">>,<<"true">>},
{<<"limit">>,<<"5">>}]}},
{<<"headers">>,
{[{<<"Accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8">>},
{<<"Accept-Charset">>,
<<"ISO-8859-1,utf-8;q=0.7,;q=0.7">>},
{<<"Accept-Encoding">>,<<"gzip,deflate">>},
{<<"Accept-Language">>,<<"en-us,en;q=0.5">>},
{<<"Authorization">>,<<"Basic Og==">>},
{<<"Cache-Control">>,<<"max-age=0">>},
{<<"Connection">>,<<"keep-alive">>},
{<<"Host">>,<<"127.0.0.1:5984">>},
{<<"Keep-Alive">>,<<"300">>},
{<<"Referer">>,
<<"http://github.com/jchris/sofa/tree/master">>},
{<<"User-Agent">>,
<<"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5">>}]}},
{<<"body">>,undefined},
{<<"form">>,{[]}},
{<<"cookie">>,{[]}}]}]}
* When Server state == {os_proc,"couchdb/bin/couchjs couchdb/share/couchdb/server/main.js",
#Port<0.1169>,
#Fun<couch_os_process.0.126981527>,
#Fun<couch_os_process.1.97144965>,5000}
** Reason for termination ==
** {bad_return_value,{os_process_error,"OS process timed out."}}
1>
=ERROR REPORT==== 14-Jul-2009::11:06:23 ===
** Generic server <0.74.0> terminating
** Last message in was {prompt,
[<<"list_tail">>,
{[{<<"info">>,
{[{db_name,<<"blogdb">>},
{doc_count,1},
{doc_del_count,0},
{update_seq,14},
{purge_seq,0},
{compact_running,false},
{disk_size,1978064},
{instance_start_time,
<<"1247583975652874">>}]}},
{<<"verb">>,'GET'},
{<<"path">>,
[<<"blogdb">>,<<"design">>,<<"sofa">>,
<<"list">>,<<"index">>,<<"recent-posts">>]},
{<<"query">>,
{[{<<"descending">>,<<"true">>},
{<<"limit">>,<<"5">>}]}},
{<<"headers">>,
{[{<<"Accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8">>},
{<<"Accept-Charset">>,
<<"ISO-8859-1,utf-8;q=0.7,;q=0.7">>},
{<<"Accept-Encoding">>,<<"gzip,deflate">>},
{<<"Accept-Language">>,<<"en-us,en;q=0.5">>},
{<<"Authorization">>,<<"Basic Og==">>},
{<<"Cache-Control">>,<<"max-age=0">>},
{<<"Connection">>,<<"keep-alive">>},
{<<"Host">>,<<"127.0.0.1:5984">>},
{<<"Keep-Alive">>,<<"300">>},
{<<"Referer">>,
<<"http://github.com/jchris/sofa/tree/master">>},
{<<"User-Agent">>,
<<"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5">>}]}},
{<<"body">>,undefined},
{<<"form">>,{[]}},
{<<"cookie">>,{[]}}]}]}
* When Server state == {os_proc,"couchdb/bin/couchjs couchdb/share/couchdb/server/main.js",
#Port<0.1169>,
#Fun<couch_os_process.0.126981527>,
#Fun<couch_os_process.1.97144965>,5000}
** Reason for termination ==
* {bad_return_value,{os_process_error,"OS process timed out."}}
1> [error] [<0.74.0>] {error_report,<0.25.0>,
{<0.74.0>,crash_report,
[[{initial_call,{couch_os_process,init,['Argument__1']}},
{pid,<0.74.0>},
{registered_name,[]},
{error_info,
{exit,
{bad_return_value,{os_process_error,"OS process timed out."}},
[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
{ancestors,
[couch_query_servers,couch_secondary_services,couch_server_sup,
<0.1.0>]},
{messages,[]},
{links,[<0.55.0>]},
{dictionary,[]},
{trap_exit,false},
{status,running},
{heap_size,46368},
{stack_size,24},
{reductions,51876}],
[{neighbour,
[{pid,<0.55.0>},
{registered_name,couch_query_servers},
{initial_call,{couch_query_servers,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,[couch_secondary_services,couch_server_sup,<0.1.0>]},
{messages,[]},
{links,[<0.50.0>,<0.74.0>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,610},
{stack_size,9},
{reductions,2138}]}]]}}
1> [error] [<0.62.0>] Uncaught error in HTTP request: {exit,
{{bad_return_value,
{os_process_error,"OS process timed out."}},
{gen_server,call,
[<0.74.0>,
{prompt,
[<<"list_tail">>,
{[{<<"info">>,
{[{db_name,<<"blogdb">>},
{doc_count,1},
{doc_del_count,0},
{update_seq,14},
{purge_seq,0},
{compact_running,false},
{disk_size,1978064},
{instance_start_time,
<<"1247583975652874">>}]}},
{<<"verb">>,'GET'},
{<<"path">>,
[<<"blogdb">>,<<"design">>,
<<"sofa">>,<<"list">>,<<"index">>,
<<"recent-posts">>]},
{<<"query">>,
{[{<<"descending">>,<<"true">>},
{<<"limit">>,<<"5">>}]}},
{<<"headers">>,
{[{<<"Accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8">>},
{<<"Accept-Charset">>,
<<"ISO-8859-1,utf-8;q=0.7,;q=0.7">>},
{<<"Accept-Encoding">>,
<<"gzip,deflate">>},
{<<"Accept-Language">>,
<<"en-us,en;q=0.5">>},
{<<"Authorization">>,
<<"Basic Og==">>},
{<<"Cache-Control">>,
<<"max-age=0">>},
{<<"Connection">>,<<"keep-alive">>},
{<<"Host">>,<<"127.0.0.1:5984">>},
{<<"Keep-Alive">>,<<"300">>},
{<<"Referer">>,
<<"http://github.com/jchris/sofa/tree/master">>},
{<<"User-Agent">>,
<<"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5">>}]}},
{<<"body">>,undefined},
{<<"form">>,{[]}},
{<<"cookie">>,{[]}}]}]},
infinity]}}}
1> [error] [<0.50.0>] {error_report,<0.25.0>,
{<0.50.0>,supervisor_report,
[{supervisor,{local,couch_secondary_services}},
{errorContext,child_terminated},
{reason,{bad_return_value,{os_process_error,"OS process timed out."}}},
{offender,
[{pid,<0.55.0>},
{name,query_servers},
{mfa,{couch_query_servers,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]}]}}
1> [info] [<0.62.0>] 127.0.0.1 - - 'GET' /blogdb/_design/sofa/_list/index/recent-posts?descending=true&limit=5 500
The text was updated successfully, but these errors were encountered: