Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6759

Querying a view on a 4 node cluster gives error "Badarg error in HTTP request"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 2.0-beta-2
    • 2.0
    • ns_server
    • Security Level: Public
    • None
    • build 1776 on Centos 64bit

    Description

      Steps to reproduce:
      1. Create default bucket(1 replica) and 128 vbuckets.
      2. Load 1000 json docs or skip loading(reproducible both ways)
      3. Add 3 nodes and rebalance in
      4. Create a view
      curl -v -X PUT -H 'Content-Type: application/json' 'http://Administrator:password@10.3.3.95:8092/default/_design/dev_d1' -d '{"views":{"v3":{"map":"function(doc)

      {\nemit(doc._id,doc.n2);\n}

      "}}}'

      • About to connect() to 10.3.3.95 port 8092 (#0)
      • Trying 10.3.3.95... connected
      • Connected to 10.3.3.95 (10.3.3.95) port 8092 (#0)
      • Server auth using Basic with user 'Administrator'
        > PUT /default/_design/dev_d1 HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
        > User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
        > Host: 10.3.3.95:8092
        > Accept: /
        > Content-Type: application/json
        > Content-Length: 67
        >
        < HTTP/1.1 201 Created
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Location: http://10.3.3.95:8092/default/_design/dev_d1
        < Date: Thu, 27 Sep 2012 07:58:07 GMT
        < Content-Type: text/plain;charset=utf-8
        < Content-Length: 34
        < Cache-Control: must-revalidate
        < {"ok":true,"id":"_design/dev_d1"}
      • Connection #0 to host 10.3.3.95 left intact
      • Closing connection #0

      5. Query the view
      curl -X GET 'http://Administrator:password@10.3.3.95:8092/default/_design/dev_d1/_view/v3?stale=ok'

      curl -v -X GET 'http://Administrator:password@10.3.3.95:8092/default/_design/dev_d1/_view/v3?stale=ok'

      • About to connect() to 10.3.3.95 port 8092 (#0)
      • Trying 10.3.3.95... connected
      • Connected to 10.3.3.95 (10.3.3.95) port 8092 (#0)
      • Server auth using Basic with user 'Administrator'
        > GET /default/_design/dev_d1/_view/v3?stale=ok HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
        > User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
        > Host: 10.3.3.95:8092
        > Accept: /
        >
        < HTTP/1.1 500 Internal Server Error
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Thu, 27 Sep 2012 07:58:50 GMT
        < Content-Type: text/plain;charset=utf-8
        < Content-Length: 44
        < Cache-Control: must-revalidate
        < {"error":"unknown_error","reason":"badarg"}
      • Connection #0 to host 10.3.3.95 left intact
      • Closing connection #0

      Following error can be seen in the logs:

      [couchdb:error,2012-09-27T0:58:50.822,ns_1@10.3.3.95:<0.248.0>:couch_log:error:42]Badarg error in HTTP request
      [couchdb:info,2012-09-27T0:58:50.822,ns_1@10.3.3.95:<0.248.0>:couch_log:info:39]Stacktrace: [

      {erlang,iolist_to_binary,[[undefined,<<"/_view_merge">>]]}

      ,

      {capi_view,build_remote_set_specs,5}

      ,

      {capi_view,'-view_merge_params/5-fun-1-',6}

      ,

      {dict,fold_bucket,3}

      ,

      {dict,fold_seg,4}

      ,

      {dict,fold_segs,4}

      ,

      {capi_view,view_merge_params,5}

      ,

      {capi_view,design_doc_view_loop,6}

      ]
      [couchdb:info,2012-09-27T0:58:50.823,ns_1@10.3.3.95:<0.248.0>:couch_log:info:39]10.3.121.100 - - GET /default/_design/dev_d1/_view/v3?stale=ok 500

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            alkondratenko Aleksey Kondratenko (Inactive)
            deepkaran.salooja Deepkaran Salooja
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty