Skip to content

"error":"not_found","reason":"missing" #4

Description

@timblack1

My changes.js file in a couchapp (using the Python couchapp format) contains the following:


var sys = require('sys');
var listener = function (change) {
sys.puts(JSON.stringify(change));
};
exports.listener = listener;


When I start up node.couch.js, I get the following error message:

tim@tim-laptop:~/Documents/MyWebPages/CaneyPUGgies/code/trunk/couchapp/node.couch.js/changes$ node lib/main.js http://localhost:60538
Finding changes listeners on http://localhost:60538

/home/tim/Documents/MyWebPages/CaneyPUGgies/code/trunk/couchapp/node.couch.js/changes/lib/main.js:66
if (resp.statusCode > 299) throw new Error("Response error "+sys.inspect(r
^
Error: Response error { socket:
{ bufferSize: 0,
fd: null,
type: 'tcp4',
allowHalfOpen: false,
_writeImpl: [Function],
_readImpl: [Function],
_shutdownImpl: [Function],
_readWatcher: null,
destroyed: true,
readable: false,
_writeQueue: [],
_writeQueueEncoding: [],
_writeQueueFD: [],
_writeQueueCallbacks: [],
_writeWatcher: null,
writable: false,
_connecting: false,
_events:
{ connect: [Function],
error: [Function],
close: [Function] },
_httpConnecting: false,
_httpMessage: null,
ondrain: [Function],
ondata: [Function],
onend: [Function],
_idleNext: null,
_idlePrev: null },
connection:
{ bufferSize: 0,
fd: null,
type: 'tcp4',
allowHalfOpen: false,
_writeImpl: [Function],
_readImpl: [Function],
_shutdownImpl: [Function],
_readWatcher: null,
destroyed: true,
readable: false,
_writeQueue: [],
_writeQueueEncoding: [],
_writeQueueFD: [],
_writeQueueCallbacks: [],
_writeWatcher: null,
writable: false,
_connecting: false,
_events:
{ connect: [Function],
error: [Function],
close: [Function] },
_httpConnecting: false,
_httpMessage: null,
ondrain: [Function],
ondata: [Function],
onend: [Function],
_idleNext: null,
_idlePrev: null },
httpVersion: '1.1',
complete: true,
headers:
{ server: 'CouchDB/1.0.1 (Erlang OTP/R14B)',
date: 'Tue, 01 May 2012 20:02:57 GMT',
'content-type': 'application/json',
'content-length': '41',
'cache-control': 'must-revalidate' },
trailers: {},
readable: false,
url: '',
method: null,
statusCode: 404,
client:
{ bufferSize: 0,
fd: null,
type: 'tcp4',
allowHalfOpen: false,
_writeImpl: [Function],
_readImpl: [Function],
_shutdownImpl: [Function],
_readWatcher: null,
destroyed: true,
readable: false,
_writeQueue: [],
_writeQueueEncoding: [],
_writeQueueFD: [],
_writeQueueCallbacks: [],
_writeWatcher: null,
writable: false,
_connecting: false,
_events:
{ connect: [Function],
error: [Function],
close: [Function] },
_httpConnecting: false,
_httpMessage: null,
ondrain: [Function],
ondata: [Function],
onend: [Function],
_idleNext: null,
_idlePrev: null },
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
_events:
{ end: [ [Function], [Function] ],
close: [ [Function], [Function] ],
data: [Function] },
request:
{ readable: true,
writable: true,
uri:
{ protocol: 'http:',
slashes: true,
host: 'localhost:60538',
port: '60538',
hostname: 'localhost',
href: 'http://localhost:60538/test_suite_db/with_slashes',
pathname: '/test_suite_db/with_slashes' },
headers:
{ 'content-type': 'application/json',
accept: 'application/json',
'content-length': 0 },
callback: [Function],
pool: { 'localhost:60538': [Object] },
dests: [],
__isRequestRequest: true,
_callback: [Function],
_events:
{ error: [Function],
complete: [Function],
pipe: [Object],
data: [Function],
end: [Function] },
_redirectsFollowed: 0,
maxRedirects: 10,
followRedirect: true,
followAllRedirects: false,
redirects: [],
setHost: true,
originalCookieHeader: undefined,
_jar: undefined,
port: '60538',
host: 'localhost',
clientErrorHandler: [Function],
path: '/test_suite_db/with_slashes',
httpModule:
{ parsers: [Object],
STATUS_CODES: [Object],
IncomingMessage: [Object],
OutgoingMessage: [Object],
ServerResponse: [Object],
ClientRequest: [Object],
Server: [Object],
createServer: [Function],
_connectionListener: [Function: connectionListener],
Agent: [Object],
getAgent: [Function: getAgent],
requestFromAgent: [Function],
request: [Function],
get: [Function],
Client: [Object],
createClient: [Function],
cat: [Function] },
agentClass:
{ [Function: Agent]
super
: [Function: EventEmitter],
defaultMaxSockets: 5 },
agent:
{ options: [Object],
host: 'localhost',
port: '60538',
queue: [Object],
sockets: [Object],
maxSockets: 5 },
_started: true,
method: 'GET',
href: 'http://localhost:60538/test_suite_db/with_slashes',
req:
{ output: [],
outputEncodings: [],
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
_hasBody: true,
_trailer: '',
finished: true,
method: 'GET',
path: '/test_suite_db/with_slashes',
_headers: [Object],
_headerNames: [Object],
_queue: null,
agent: [Object],
_events: [Object],
_header: 'GET /test_suite_db/with_slashes HTTP/1.1\r\ncontent-type: application/json\r\naccept: application/json\r\nhost: localhost:60538\r\ncontent-length: 0\r\nConnection: close\r\n\r\n',
_headerSent: true,
socket: null,
connection: null,
res: [Circular] },
ntick: true,
response: [Circular],
_destdata: true,
_ended: true },
toJSON: [Function: toJSON],
body: '{"error":"not_found","reason":"missing"}\n' }
{"error":"not_found","reason":"missing"}

at Request._callback (/home/tim/Documents/MyWebPages/CaneyPUGgies/code/trunk/couchapp/node.couch.js/changes/lib/main.js:66:38)
at Request.callback (/home/tim/.node_libraries/.npm/request/2.9.201/package/main.js:119:22)
at Request.<anonymous> (native)
at Request.emit (events.js:67:17)
at Request.<anonymous> (/home/tim/.node_libraries/.npm/request/2.9.201/package/main.js:521:16)
at Request.emit (events.js:64:17)
at IncomingMessage.<anonymous> (/home/tim/.node_libraries/.npm/request/2.9.201/package/main.js:483:14)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1227:22)

What can I do to fix this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions