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

[3.1.6 backport] sgcollect windows doesn't collect stderr / stdout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.6
    • None
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 149
    • 1

    Description

      The command:

      wmic ntevent where "SourceName='SyncGateway' and TimeGenerated>'20240128000000.000000-000'" get TimeGenerated,LogFile,SourceName,EventType,Message /FORMAT:list
      

      returns messages like:

      EventType=3
      Logfile=Application
      Message=Incorrect function.
      SourceName=SyncGateway
      TimeGenerated=20240305141952.261966-000
      

      But to get an actual message, we need to add InsertionStrings:

      wmic ntevent where "SourceName='SyncGateway' and TimeGenerated>'20240128000000.000000-000'" get TimeGenerated,LogFile,SourceName,EventType,Message,InsertionStrings /FORMAT:list
      

      EventType=3
      InsertionStrings={"Starting Sync Gateway service using command: `C:\Program Files\Couchbase\Sync Gateway\sync_gateway.exe --defaultLogFilePath C:\Program Files\Couchbase\Sync Gateway\var\lib\couchbase\logs C:\Program Files\Couchbase\Sync Gateway\serviceconfig.json`"}
      Logfile=Application
      Message=Incorrect function.
      SourceName=SyncGateway
      TimeGenerated=20240305141952.261966-000
      

      In our case using github.com/kardianos/service, the message seems to always be Incorrect function. I haven't debugged why that is, but since the InsertionStrings contain the correct message, I'd be inclined to include both.

      Attachments

        Activity

          People

            ben.brooks Ben Brooks
            tor.colvin Tor Colvin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty