1

I have a 3 node zookeeper ensemble running from where I had trouble with one node showing a corrupt db. Now I found in the docs that it has to be cleared regularily with the help of cron running this command:

java -cp zookeeper.jar:log4j.jar:conf org.apache.zookeeper.server.PurgeTxnLog /var/lib/zookeeper/ /var/lib/zookeeper/version-2/ -n 3

Unfortunatelly I do get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.zookeeper.server.PurgeTxnLog.(PurgeTxnLog.java:45) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more

What is causing this and how could I prevent zookeeper from corrupting the db again due to too many log entries?

1 Answer 1

2

slf4j's jars are missing from classpath; you can add them manually, but it's better to use zkCleanup.sh (comes with zookeeper) instead.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.