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

How to enable ns_server logs via stdout / stderr?

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • techdebt-backlog
    • 4.0.0
    • ns_server
    • Security Level: Public
    • None
    • Docker

    Description

      For the Couchbase Docker container, we are currently directly starting the process via:

      exec gosu couchbase /opt/couchbase/bin/couchbase-server – -noinput

      (github link: https://github.com/couchbase/docker/blob/master/generate/resources/couchbase-server/scripts/couchbase-start#L27)

      in other words, we aren't using a background service such as systemd.

      The -noinput flag was passed so that it does not get dropped in an erlang shell.

      Here's the problem: Docker users expect to be able to run "docker logs <container_id>" and see the output of a process. With the approach above, all output is redirected to log files, and there is nothing over stdio and so they see nothing.

      Is it possible to add a flag which tells it to log ns_server's output to stdio instead of or in addition to logging to files? I realize that ns_server is not the only component, but I think it's probably the one that users would be most interested in seeing the output from.

      I chatted with Volker and he suggested the following:

      /opt/couchbase/bin/couchbase-server "foo -ns_server dont_suppress_stderr_logger true -noinput"

      I haven't tested this yet, but I wanted to bounce it off the ns_server team to see if this was the recommended approach for this problem.

      Related github ticket: https://github.com/couchbase/docker/pull/2

      Attachments

        Issue Links

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

          Activity

            People

              Aliaksey Artamonau Aliaksey Artamonau (Inactive)
              traun Traun Leyden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty