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

Chronicle settings lookup in ETS tables fails with badarg

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • None
    • None
    • ns_server
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      Build: 7.1.0-1410

      This is blocking MB-47180 for Views.

      Steps to reproduce:

      • Setup at least a 2 node cluster.
      • Enable n2n encryption and change to all or strict.
      • Create a view and query, result is a badarg. Following is the stack trace:

      [couchdb:error,2021-10-04T09:13:15.920Z,couchdb_ns_1@cb.local:<0.19576.0>:couch_log:error:33]Uncaught error in HTTP request: {error,badarg}
       
      Stacktrace: <ud>[{ets,lookup,[chronicle_settings,{chronicle_kv,kv,timeout}],[]},
           {chronicle_settings,get,2,
                               [{file,"src/chronicle_settings.erl"},{line,42}]},
           {chronicle_kv,get,3,[{file,"src/chronicle_kv.erl"},{line,355}]},
           {ns_server_cert,trusted_CAs,1,
                           [{file,"src/ns_server_cert.erl"},{line,624}]},
           {ns_ssl_services_setup,ssl_client_opts,0,
                                  [{file,"src/ns_ssl_services_setup.erl"},
                                   {line,352}]},
           {capi_indexer,build_remote_set_specs,6,
                         [{file,"src/capi_indexer.erl"},{line,183}]},
           {capi_indexer,'-view_merge_params/6-fun-0-',8,
                         [{file,"src/capi_indexer.erl"},{line,119}]},
           {dict,fold_bucket,3,[{file,"dict.erl"},{line,460}]}]</ud>
      

      Maybe the chronicle_settings ets table hasn't been initialized yet or the key named "timeout" isn't present in the table.
      This is preventing couchdb from getting trustedCA list and initialising tls config for client connections hence failing all view queries while encryption is enabled.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-48733
          # Subject Branch Project Status CR V

          Activity

            People

              timofey.barmin Timofey Barmin
              abhishek.jindal Abhishek Jindal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty