Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-406

sgw fails to start with ssl enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.0
    • Component/s: SyncGateway
    • Security Level: Public
    • Labels:
      None
    • Sprint:
      CBG Sprint 24
    • Story Points:
      5

      Description

      SGW version : 2.6.0-68

      CBS :  6.0.1-2037

      Steps to reproduce :

      1. Have SGW config with ssl enabled
      2. Start sync gateway 

      SGW config: 

      {
          "interface":":4984",
          "adminInterface": "0.0.0.0:4985",
          "maxIncomingConnections": 0,
          "maxCouchbaseConnections": 16,
          "maxFileDescriptors": 90000,
          "compressResponses": false,
          "logging": {"debug": {"enabled": true} },
          "databases":{
              "db":{
                  "use_views": true,
                  "username": "data-bucket",
                  "password": "password",
                  "server":"couchbases://192.168.33.10:11207",
                  "bucket":"data-bucket"
              }
          }
      }   
      

      SGW logs:

      ssl-sgw-logs.zip

        Attachments

          Issue Links

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

            Activity

            Hide
            adamf Adam Fraser added a comment - - edited

            From the logs:

            2019-06-04T12:58:26.200Z [ERR] Handling panic: invalid argument to Intn – rest.PanicHandler.func1() at config.go:1191

            There are two issues worth looking into here.  There's the bug itself, which seems like its most likely to be related to either gocb or SG code during random node selection for design doc creation (see capiEps and mgmtEps).  It's possible this is just a race, where the value gets updated in between the time we check for it to be zero and the time we call rand.Intn, or it could be related to us picking up changes in gocb to return a value like -1.  

            If this turns out to be in SG code, it's worth taking another look at the gocb code to see if we can use the SDK to issue this call, instead of building/executing it ourselves.  I believe the original motivation was down to the SDK not supporting IndexXattrOnTombstones at the time. 

            Another concern, though, is why the full stack trace for the panic isn't making it into the logs.  This is being caught, logged, then a new panic thrown, but the new panic doesn't get logged anywhere we can use it.  That's going to hamper troubleshooting more generally, and should be addressed.

            Show
            adamf Adam Fraser added a comment - - edited From the logs: 2019-06-04T12:58:26.200Z [ERR] Handling panic: invalid argument to Intn – rest.PanicHandler.func1() at config.go:1191 There are two issues worth looking into here.  There's the bug itself, which seems like its most likely to be related to either gocb or SG code during random node selection for design doc creation (see capiEps and mgmtEps).  It's possible this is just a race, where the value gets updated in between the time we check for it to be zero and the time we call rand.Intn, or it could be related to us picking up changes in gocb to return a value like -1.   If this turns out to be in SG code, it's worth taking another look at the gocb code to see if we can use the SDK to issue this call, instead of building/executing it ourselves.  I believe the original motivation was down to the SDK not supporting IndexXattrOnTombstones at the time.  Another concern, though, is why the full stack trace for the panic isn't making it into the logs.  This is being caught, logged, then a new panic thrown, but the new panic doesn't get logged anywhere we can use it.  That's going to hamper troubleshooting more generally, and should be addressed.
            Hide
            ben.brooks Ben Brooks added a comment -

            Filed gocb issue: GOCBC-488

            Show
            ben.brooks Ben Brooks added a comment - Filed gocb issue: GOCBC-488
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.6.0-96 contains sync_gateway commit 33aa1fc with commit message:
            CBG-406 - bump gocbconnstr (#4166)

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-96 contains sync_gateway commit 33aa1fc with commit message: CBG-406 - bump gocbconnstr (#4166)

              People

              • Assignee:
                ben.brooks Ben Brooks
                Reporter:
                sridevi.saragadam Sridevi Saragadam
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.