Error: 400 Bad Request - Creating local repository #149

slajax opened this Issue Jun 18, 2013 · 0 comments


None yet

1 participant

slajax commented Jun 18, 2013

Last night I was attempting to set up a local jam repo and ran into some issues. I used the examples from the README to replicate the existing jam repo just to get things working. CouchDB 1.3 installed via homebrew with latest couchdb-lucene from github repo.

Side note: the code at: seems to expect the db to be named "jam_packages" by default whereas the examples in the readme point a user to create it as "repository".



os_process_timeout=60000 ; increase the timeout from 5 seconds.

fti=/usr/bin/python /Users/slajax/repos/couchdb-lucene/target/couchdb-lucene-0.10.0-SNAPSHOT/tools/

_fti = {couch_httpd_external, handle_external_req, <<"fti">>}

_fti = {couch_httpd_proxy, handle_proxy_req, <<"">>}

Via browser:


  disk_size: 116127,
  last_modified: "1371579496000",
  optimized: true,
  ref_count: 2,
  doc_del_count: 0,
  current: true,
  update_seq: "672",
  doc_count: 566,
  digest: "5bmgrm1t2kek2wohudz5sxh6x",
  uuid: "fd0ef8ef-6617-4d5b-9700-7aa5362da49c",
  fields: [

When I run the search from the CLI:

$ jam search --debug --repository http://localhost:5984/jam_packages jquery

using search at http://localhost:5984/_fti/local/jam_packages/_design/jam-packages/packages
request GET /_fti/local/jam_packages/_design/jam-packages/packages/?q=jquery*&limit=10&include_docs=true
request headers { Host: 'localhost:5984',
  Accept: 'application/json',
  'Content-Length': 0 }
request data null
response: { headers:
   { vary: 'Accept',
     server: 'CouchDB/1.3.0 (Erlang OTP/R15B03)',
     date: 'Tue, 18 Jun 2013 18:24:43 GMT',
     'content-type': 'application/json; charset=utf-8',
     'content-length': '37',
     'cache-control': 'must-revalidate,no-cache,no-store' },
  url: '',
  method: null,
  statusCode: 400 }
data: { reason: 'bad_request', code: 400 }
Error: 400: Bad Request
    at Function.exports.statusCodeError (/usr/local/lib/node_modules/jamjs/lib/couchdb.js:279:16)
    at IncomingMessage.CouchDB.client (/usr/local/lib/node_modules/jamjs/lib/couchdb.js:250:44)
    at IncomingMessage.EventEmitter.emit (events.js:126:20)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at Socket.socketOnData [as ondata] (http.js:1367:20)
    at TCP.onread (net.js:404:27)

Any ideas?

@slajax slajax closed this Nov 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment