You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Devarshi Shah (Jira)" <ji...@apache.org> on 2023/01/13 10:48:00 UTC

[jira] [Created] (ZOOKEEPER-4658) The Zookeeper script and keytool utility redirecting the logs to stderr

Devarshi Shah created ZOOKEEPER-4658:
----------------------------------------

             Summary: The Zookeeper script and keytool utility redirecting the logs to stderr
                 Key: ZOOKEEPER-4658
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4658
             Project: ZooKeeper
          Issue Type: Bug
          Components: server
    Affects Versions: 3.7.1, 3.6.2, 3.7.0
            Reporter: Devarshi Shah


Information logs in zkServer.sh script being redirected to *stderr* (2) stream
{code:java}
/opt/apache-zookeeper-3.7.0-bin/bin
bash-4.4$ cat zkServer.sh | grep "&2"
  echo "ZooKeeper JMX enabled by default" >&2
    echo "ZooKeeper remote JMX Port set to $JMXPORT" >&2
    echo "ZooKeeper remote JMX authenticate set to $JMXAUTH" >&2
    echo "ZooKeeper remote JMX ssl set to $JMXSSL" >&2
    echo "ZooKeeper remote JMX log4j set to $JMXLOG4J" >&2
      echo "ZooKeeper remote JMX Hostname set to $JMXHOSTNAME" >&2
    echo "JMX disabled by user request" >&2
echo "Using config: $ZOOCFG" >&2
    echo "Usage: $0 [--config <conf-dir>] {start|start-foreground|stop|version|restart|status|print-cmd}" >&2
bash-4.4$ {code}
and in container logs we could see these logs are coming as *stderr*
{code:java}
2023-01-10T08:16:34.393866602+01:00 stderr F ZooKeeper JMX enabled by default
2023-01-10T08:16:34.395496162+01:00 stderr F Using config: /var/lib/zookeeper/config-dynamic/zoo.cfg
 {code}
*Expectation:*

Information logs should coming in stdout.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)