Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-894

Improve SSL Failure Error Message

    XMLWordPrintable

Details

    • 1
    • SDK38: Conn Record/CB++

    Description

      While building Ottoman and testing it against SSL there were error messages thrown but was not meaningful and easy to debug.

      1. Mandatory Client Certificate required but none provided: 

            `FATAL ERROR:
                libcouchbase experienced an unrecoverable error and terminates the program
                ...
               assertion failed in C:\Jenkins\workspace\nodejs\couchnode\couchnode-scripted-build-           pipeline\couchnode\deps\lcb\src\ssl\ssl_c.c at line 409`.

       

       

            2. trustedStorePath pointing to a wrong CA

             **       

               `Error: LCB_ERR_SSL_ERROR (1002): A generic error related to the SSL subsystem was             encountered. Enable logging to see more details ... code: 1002`

       

           3.  Mismatched client cert/key or invalid file path specified:

                 **           

       

      {{this._inst = new binding.Connection(
      ^

      Error: LCB_ERR_SSL_ERROR (1002): A generic error related to the SSL subsystem was encountered. Enable logging to see more details
      at new Connection (D:\code\ottoman-test\node_modules\couchbase\lib\connection.js:129:18)
      at Cluster._getConn (D:\code\ottoman-test\node_modules\couchbase\lib\cluster.js:610:14)
      at new Bucket (D:\code\ottoman-test\node_modules\couchbase\lib\bucket.js:20:26)
      at Cluster.bucket (D:\code\ottoman-test\node_modules\couchbase\lib\cluster.js:482:12)
      at Ottoman.connect (D:\code\ottoman-test\node_modules\ottoman\lib\ottoman\ottoman.js:134:41)
      at Object.<anonymous> (D:\code\ottoman-test\index.js:16:28)
      at Module._compile (internal/modules/cjs/loader.js:1138:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
      at Module.load (internal/modules/cjs/loader.js:986:32)
      at Function.Module._load (internal/modules/cjs/loader.js:879:14) {
      code: 1002
      }}}

      {{}}

      4.Wrong Client cert/key pair

      {{}}
       {{FATAL ERROR:
      libcouchbase experienced an unrecoverable error and terminates the program
      to avoid undefined behavior.
      The program should have generated a "corefile" which may used
      to gather more information about the problem.
      If your system doesn't create "corefiles" I can tell you that the
      assertion failed in C:\Jenkins\workspace\nodejs\couchnode\couchnode-scripted-build-pipeline\couchnode\deps\lcb\src\ssl\ssl_c.c at line 409}}
      {{}}

       

      In all of the above cases a more appropriate and easy to debug error message would have been  :   "Invalid client certificate or client certificate not provided, more common reasons include certification path being invalid or certificate generated is invalid." 

       

      This could very well be an issue with libcouchbase or with server, please raise an appropriate ticket and link it to this ticket. 

       

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty