Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # user - zkConsole not returning results basis on my command


Copy link to this message
-
Re: zkConsole not returning results basis on my command
Techy Teck 2013-10-28, 22:52
I found log4j.properties file which is something like below - What changes
I should make in this file to enable TRACE level logging? Thanks for the
help..

# Define some default values that can be overridden by system properties
zookeeper.root.logger=INFO, CONSOLE
zookeeper.console.threshold=INFO
zookeeper.log.dir=.
zookeeper.log.file=zookeeper.log
zookeeper.log.threshold=DEBUG
zookeeper.tracelog.dir=.
zookeeper.tracelog.file=zookeeper_trace.log

#
# ZooKeeper Logging Configuration
#

# Format is "<default threshold> (, <appender>)+

# DEFAULT: console appender only
log4j.rootLogger=${zookeeper.root.logger}

# Example with rolling log file
#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE

# Example with rolling log file and tracing
#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE

#
# Log INFO level and above messages to the console
#
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}]
- %-5p [%t:%C{1}@%L] - %m%n

#
# Add ROLLINGFILE to rootLogger to get log file output
#    Log DEBUG level and above messages to a log file
log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}

# Max log file size of 10MB
log4j.appender.ROLLINGFILE.MaxFileSize=10MB
# uncomment the next line to limit number of backup files
#log4j.appender.ROLLINGFILE.MaxBackupIndex=10

log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601}
[myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
#
# Add TRACEFILE to rootLogger to get log file output
#    Log DEBUG level and above messages to a log file
log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
log4j.appender.TRACEFILE.Threshold=TRACE
log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}

log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
### Notice we are including log4j's NDC here (%x)
log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601}
[myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n

On Mon, Oct 28, 2013 at 3:44 PM, Patrick Hunt <[EMAIL PROTECTED]> wrote:

> edit your log4j.properties file, should be in conf directory
> (depending how you're running)
>
> Patrick
>
> On Mon, Oct 28, 2013 at 3:30 PM, Techy Teck <[EMAIL PROTECTED]>
> wrote:
> > @Patrick: How do I enable TRACE level logging as it is working fine in
> > windows command prompt but not in cygwin somehow...?
> >
> >
> >
> > On Mon, Oct 28, 2013 at 3:29 PM, Techy Teck <[EMAIL PROTECTED]>
> wrote:
> >
> >> Yeah.. It works fine in windows command prompt.. But not in cygwin? Any
> >> thoughts?
> >>
> >>
> >> On Mon, Oct 28, 2013 at 2:36 PM, Camille Fournier <[EMAIL PROTECTED]
> >wrote:
> >>
> >>> Not obviously... I can do this just fine, although I'm not using cygwin
> >>> but
> >>> instead using zkCli.cmd and zkServer.cmd (which are the windows command
> >>> lines). If you use windows command lines vs cygwin, does it work?
> >>>
> >>>
> >>>
> >>> On Mon, Oct 28, 2013 at 4:13 PM, Techy Teck <[EMAIL PROTECTED]>
> >>> wrote:
> >>>
> >>> >  I started my Zookeeper on my cygwin console like this and it got
> >>> started
> >>> > successfully -
> >>> >
> >>> >     username@00542612 ~
> >>> >     $ zkServer.sh start
> >>> >     JMX enabled by default
> >>> >     Using config: C:\ApacheZookeeper\zookeeper-3.4.5\conf\zoo.cfg
> >>> >     Starting zookeeper ... STARTED
> >>> >
> >>> > Now, after connecting to ZooKeeper. I opened a new Cygwin window, and
> >>> issue
> >>> > the following command
> >>> >
> >>> >     $ zkCli.sh
> >>> >
> >>> > which will connect to ZooKeeper server running at localhost:2181 by
> >>> > default, and will open zk console. And this is what I got on the