[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15271895#comment-15271895
 ] 

Karthik Shivanna commented on ZOOKEEPER-2419:
---------------------------------------------

Thanks Arshad. 
Could you please help me distinguish between these two files?
/usr/zookeeper-server/conf/zookeeper-env.sh 
bin/zkEnv.sh

The zkEnv.sh gets included in the zkServer.sh during the restart, however the 
log file isnt rolling after setting the properties in the log4j properties to 
DEBUG, ROLLINGFILE and the ZOO_LOG4J_PROP is also set to DEBUG, ROLLINGFILE

Any thoughts on why the log files wouldnt roll?

Below is the /etc/zookeeper/conf/log4j.properties file
# DEFAULT: console appender only
#log4j.rootLogger=INFO, CONSOLE
log4j.rootLogger=DEBUG, ROLLINGFILE

# 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=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-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=DEBUG
log4j.appender.ROLLINGFILE.File=zookeeper.log

# Max log file size of 10MB
log4j.appender.ROLLINGFILE.MaxFileSize=1MB
# 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} - %-5p 
[%t:%C{1}@%L] - %m%n


----zkEnv.sh has this check

if [ "x${ZOO_LOG4J_PROP}" = "x" ]
then
    #ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
    ZOO_LOG4J_PROP="DEBUG,ROLLINGFILE"
fi





> Zookeeper.log filling up faster
> -------------------------------
>
>                 Key: ZOOKEEPER-2419
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2419
>             Project: ZooKeeper
>          Issue Type: Task
>    Affects Versions: 3.4.6
>            Reporter: Karthik Shivanna
>            Priority: Blocker
>
> I am seeing that the /var/log/zookeeper/zookeeper.out file is getting filled 
> up faster than usual. It has grown upto 5 GB. When I further saw the out 
> file, lot of them are [INFO] as follows:
> 2016-03-22 02:03:42,621 - INFO  [ProcessThread(sid:4 
> cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when 
> processing sessionid:0x4534413d1f70001 type:create cxid:0x71e0aa99 
> zxid:0x5f00e3de69 txntype:-1 reqpath:n/a Error Path:null 
> Error:KeeperErrorCode = NoAuth
> The log4j properties file was modified to change the parameter for logging 
> from INFO, CONSOLE to INFO, ROLLINGFILE. But I would like to understand where 
> the above INFO is coming from.
> Any help is greatly appreciated. Thanks
> Zookeeper version: 3.4.6-249--1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to