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

CreateIndex, Prepare failed, err: manifest: auth for ns_server

    XMLWordPrintable

Details

    Description

      Summary:
      Creating FTS index on a collection when the bucket contains special characters like '%' fails. Looks like they have to be urlencoded before making an internal call to pools/defaults/buckets/bucket_name endpoint. 

      Here's what I was trying to do (it could be instead reproduced on a smaller scale)

      1. Created 6 kv nodes, 8 fts nodes (refer the screenshot for the servers list)
      2. Created 15 buckets with a few scopes and collections. One of the buckets is named "OMp1G%2Q1Is-59-235000" (note the % character in it)
      3. Create some fts indexes. One of the fts indexes on the above bucket failed

      2021-05-07 01:47:52,813 | infra | ERROR   | MainThread | [Rest_Connection:_http_request:257] Socket error while connecting to http://172.23.107.58:8094/api/index/fts0. Error [Errno 111] Connection refused
      2021-05-07 02:02:31,697 | infra | ERROR   | MainThread | [Rest_Connection:_http_request:253] PUT http://172.23.107.58:8094/api/index/fts198 body: {                   "type": "fulltext-index",                   "name": "fts198",                   "sourceType": "gocbcore",                   "sourceName": "OMp1G%2Q1Is-59-235000",                   "planParams": {                     "maxPartitionsPerPIndex": 1024,                     "indexPartitions": 6                   },                   "params": {                     "doc_config": {                       "docid_prefix_delim": "",                       "docid_regexp": "",                       "mode": "scope.collection.type_field",                       "type_field": "type"                     },                     "mapping": {                       "analysis": {},                       "default_analyzer": "standard",                       "default_datetime_parser": "dateTimeOptional",                       "default_field": "_all",                       "default_mapping": {                         "dynamic": true,                         "enabled": false                       },                       "default_type": "_default",                       "docvalues_dynamic": false,                       "index_dynamic": true,                       "store_dynamic": false,                       "type_field": "_type",                       "types": {                         "LYm6BDTbph-59-237000.Bg-59-238000": {                           "dynamic": true,                           "enabled": true                         }                       }                     },                     "store": {                       "indexType": "scorch",                       "segmentVersion": 15                     }                   },                   "sourceParams": {}                 } headers: {'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==\n', 'Content-type': 'application/json'} error: 400 reason: rest_create_index: error creating index: fts198, err: manager_api: CreateIndex, Prepare failed, err: manifest: auth for ns_server, url: http://127.0.0.1:8091/pools/default/buckets/OMp1G%2Q1Is-59-235000/scopes, authType: cbauth, err: parse http://127.0.0.1:8091/pools/default/buckets/OMp1G%2Q1Is-59-235000/scopes: invalid URL escape "%2Q" {"error":"rest_create_index: error creating index: fts198, err: manager_api: CreateIndex, Prepare failed, err: manifest: auth for ns_server, url: http://127.0.0.1:8091/pools/default/buckets/OMp1G%2Q1Is-59-235000/scopes, authType: cbauth, err: parse http://127.0.0.1:8091/pools/default/buckets/OMp1G%2Q1Is-59-235000/scopes: invalid URL escape \"%2Q\"","request":{"name":"fts198","params":{"doc_config":{"docid_prefix_delim":"","docid_regexp":"","mode":"scope.collection.type_field","type_field":"type"},"mapping":{"analysis":{},"default_analyzer":"standard","default_datetime_parser":"dateTimeOptional","default_field":"_all","default_mapping":{"dynamic":true,"enabled":false},"default_type":"_default","docvalues_dynamic":false,"index_dynamic":true,"store_dynamic":false,"type_field":"_type","types":{"LYm6BDTbph-59-237000.Bg-59-238000":{"dynamic":true,"enabled":true}}},"store":{"indexType":"scorch","segmentVersion":15}},"planParams":{"indexPartitions":6,"maxPartitionsPerPIndex":1024},"sourceName":"OMp1G%2Q1Is-59-235000","sourceParams":{},"sourceType":"gocbcore","type":"fulltext-index"},"status":"fail"} auth: Administrator:password

      (Note that we get the same error if we tried it on UI as well)
      Have attached the fts parameter template and logs and servers' screenshot.

      Attachments

        1. fts_param_template.txt
          2 kB
          Sumedh Basarkod
        2. servers.png
          333 kB
          Sumedh Basarkod
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            sumedh.basarkod Sumedh Basarkod (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty