Kafka
  1. Kafka
  2. KAFKA-1127

kafka and zookeeper server should start in daemon mode and log to correct position

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.8.1
    • Component/s: core
    • Labels:
      None

      Description

      Hi

      At present, the kafka-server-start.sh and zookeeper-server-start.sh will start kafka broker and zookeeper in fg mode, though "daemon" parameter is added. you need to add & to make it bg. But the console log will still output in fg.

      Should make it fully run in bg and redirect console log to files. And log file position should not depends on where the cmd is running. Thus it will be more friendly for scripts to launch server on nodes by batch.

      1. kafka-1127-v3.patch
        7 kB
        Raymond Liu
      2. kafka-1127-v2.patch
        5 kB
        Raymond Liu
      3. kafka-1127.patch
        4 kB
        Raymond Liu

        Activity

        Hide
        Guozhang Wang added a comment -

        Thanks for the patch. Could this jira be merged with KAFKA-1109?

        Show
        Guozhang Wang added a comment - Thanks for the patch. Could this jira be merged with KAFKA-1109 ?
        Hide
        Raymond Liu added a comment - - edited

        So v2 patch is combined patch with KAFKA-1109

        Show
        Raymond Liu added a comment - - edited So v2 patch is combined patch with KAFKA-1109
        Hide
        Jun Rao added a comment -

        Thanks for patch v2. Would it be better to keep the existing behavior of kafka-server-start.sh and zookeeper-server-start.sh (i.e., running in foreground) and add a new option to run them in daemon mode? Seeing the log in console is probably useful for testing. Also, I am not sure if changing the current behavior of kafka-server-start.sh and zookeeper-server-start.sh will break any system test.

        Show
        Jun Rao added a comment - Thanks for patch v2. Would it be better to keep the existing behavior of kafka-server-start.sh and zookeeper-server-start.sh (i.e., running in foreground) and add a new option to run them in daemon mode? Seeing the log in console is probably useful for testing. Also, I am not sure if changing the current behavior of kafka-server-start.sh and zookeeper-server-start.sh will break any system test.
        Hide
        Raymond Liu added a comment -

        v3 patch enable to choose whether to start server in daemon mode or not. by default, not change the original behavior ( say server run in fg )

        Show
        Raymond Liu added a comment - v3 patch enable to choose whether to start server in daemon mode or not. by default, not change the original behavior ( say server run in fg )
        Hide
        Raymond Liu added a comment -

        Jun Rao Anything else I can do for this patch?

        Show
        Raymond Liu added a comment - Jun Rao Anything else I can do for this patch?
        Hide
        Jun Rao added a comment -

        Thanks for patch v3. +1. Committed to trunk.

        Show
        Jun Rao added a comment - Thanks for patch v3. +1. Committed to trunk.

          People

          • Assignee:
            Raymond Liu
            Reporter:
            Raymond Liu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development