then i find these errors in the and :
java $PROFILING_OPTS -Xmx1G -Xms1G -verbose:gc -Xloggc:gc-injector-$host.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -cp `cat classpath.txt` org.apache.s4.core.Main "@$INJECTOR_CONFIG" &
java -Xmx4G -Xms4G -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:gc-$host.log $PROFILING_OPTS -server -cp `cat classpath.txt` org.apache.s4.core.Main "@$NODE_CONFIG" &

how can i write the Main class, and let this benchmark to run ?

2013/5/27 baojian Zhou <>
thank you Shrivastava and Morel, it dose resolve the issue by adding -clean opt. but when i run the and then i got the following errors in the creating directory  2013-05-27--22-17-10  file  s4err_1.err and s4err_2.err:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/s4/core/Main
Caused by: java.lang.ClassNotFoundException: org.apache.s4.core.Main
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
Could not find the main class: org.apache.s4.core.Main. Program will exit.

i know that java cannot find the Main class, but in the s4-src we have not this class, how can this happened?
thank you

2013/5/27 Lokesh Shrivastava <>
I think script is not cleaning up your z4 cluster old configuration. If you run the cluster by giving clean option, it should resolve the issue.

On 27 May 2013 19:18, baojian Zhou <> wrote:
i start test the s4 benchmark application, and then run the ./ command then i got this error :

 21:23:18.570 [main] INFO - Zookeeper server started on port [2181]
21:23:18.618 [main] INFO - Defined S4 cluster [testCluster1] with [0] tasks with first listening port [12000]
21:23:18.706 [main] ERROR - Cannot initialize zookeeper with specified configuration
org.I0Itec.zkclient.exception.ZkNodeExistsException: org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /s4/clusters/testCluster2/tasks/Task-0
        at org.I0Itec.zkclient.exception.ZkException.create( ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient.retryUntilConnected( ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient.create( ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient.createPersistent( ~[zkclient-0.1.jar:na]
        at ~[s4-comm-0.6.0-incubating.jar:0.6.0-incubating]
        at ~[s4-tools-0.6.0-incubating.jar:0.6.0-incubating]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke( ~[na:1.6.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:1.6.0_20]
        at java.lang.reflect.Method.invoke( ~[na:1.6.0_20]
        at$Task.dispatch( [s4-tools-0.6.0-incubating.jar:0.6.0-incubating]
        at [s4-tools-0.6.0-incubating.jar:0.6.0-incubating]
Caused by: org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /s4/clusters/testCluster2/tasks/Task-0
        at org.apache.zookeeper.KeeperException.create( ~[zookeeper-3.3.3.jar:3.3.3-1073969]
        at org.apache.zookeeper.KeeperException.create( ~[zookeeper-3.3.3.jar:3.3.3-1073969]
        at org.apache.zookeeper.ZooKeeper.create( ~[zookeeper-3.3.3.jar:3.3.3-1073969]
        at org.I0Itec.zkclient.ZkConnection.create( ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient$ ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient$ ~[zkclient-0.1.jar:na]
        at org.I0Itec.zkclient.ZkClient.retryUntilConnected( ~[zkclient-0.1.jar:na]
        ... 10 common frames omitted

can anyone tell me why?