Created on 12-21-2016 10:14 AM - edited 09-16-2022 03:51 AM
There is no zookeeper.log file in my culster.
[root@insightcluster130 zookeeper]# ls -lart total 4 drwxr-xr-x. 2 zookeeper hadoop 61 Sep 21 21:32 . drwxr-xr-x. 28 root root 4096 Dec 18 03:45 .. -rw-r--r--. 1 zookeeper hadoop 0 Dec 21 17:29 zookeeper-zookeeper-server-insightcluster130.out [root@insightcluster130 zookeeper]# pwd /var/log/zookeeper [root@insightcluster130 zookeeper]#
Don't know why
Created 12-21-2016 10:23 AM
by default zookeeper is configured with console appender so that all zk logs are directed to out file, you can configure zk with Rolling file or DRFA to redirect the output to log file.
Created 12-21-2016 07:33 PM
zookeeper server redirects the stderr and stdout to zookeeper.out
As mentioned above you can use ROLLINGFILE which is sent to zookeeper.log
Created 12-22-2016 02:19 AM
@Rajkumar Singh @Namit Maheshwari But my
zookeeper-zookeeper-server-insightcluster130.out
always in size 0.Created 12-22-2016 05:07 AM
@Huahua Wei could you please share the output of the command
lsof -p <pid of zookeeper> |grep log
lsof -p <pid of zookeeper> | grep out
Created 12-22-2016 06:11 AM
[root@insightcluster132 ~]# lsof -i:2181 |grep LISTEN java 202712 zookeeper 55u IPv6 1655953390 0t0 TCP *:eforward (LISTEN) [root@insightcluster132 ~]# lsof -p 202712 | grep log java 202712 zookeeper mem REG 253,2 60686 201876302 /usr/hdp/2.5.0.0-1245/zookeeper/lib/commons-logging-1.1.1.jar java 202712 zookeeper mem REG 253,2 481535 201876305 /usr/hdp/2.5.0.0-1245/zookeeper/lib/log4j-1.2.16.jar java 202712 zookeeper mem REG 253,2 9753 201876322 /usr/hdp/2.5.0.0-1245/zookeeper/lib/slf4j-log4j12-1.6.1.jar java 202712 zookeeper 1w REG 253,3 0 134331951 /var/log/zookeeper/zookeeper-zookeeper-server-insightcluster132.out java 202712 zookeeper 2w REG 253,3 0 134331951 /var/log/zookeeper/zookeeper-zookeeper-server-insightcluster132.out java 202712 zookeeper 11r REG 253,2 9753 201876322 /usr/hdp/2.5.0.0-1245/zookeeper/lib/slf4j-log4j12-1.6.1.jar java 202712 zookeeper 28r REG 253,2 481535 201876305 /usr/hdp/2.5.0.0-1245/zookeeper/lib/log4j-1.2.16.jar java 202712 zookeeper 31r REG 253,2 60686 201876302 /usr/hdp/2.5.0.0-1245/zookeeper/lib/commons-logging-1.1.1.jar java 202712 zookeeper 50w REG 253,2 67108880 72403292 /usr/hadoop/zookeeper/version-2/log.12000776ce java 202712 zookeeper 68w REG 253,0 6096211 18135 /home/zookeeper/zookeeper.log [root@insightcluster132 ~]# lsof -p 202712 | grep out java 202712 zookeeper 1w REG 253,3 0 134331951 /var/log/zookeeper/zookeeper-zookeeper-server-insightcluster132.out java 202712 zookeeper 2w REG 253,3 0 134331951 /var/log/zookeeper/zookeeper-zookeeper-server-insightcluster132.out [root@insightcluster132 ~]#
Created 12-25-2016 10:52 AM
@Huahua Wei lsof output suggest that your zk log location is /var/log/zookeeper/zookeeper-zookeeper-server-insightcluster132.out