You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 30000
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:156)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:130)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:75)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:57)
at kafka.utils.ZkUtils.apply(ZkUtils.scala)
at info.batey.kafka.unit.KafkaUnit.createTopic(KafkaUnit.java:170)
at info.batey.kafka.unit.KafkaUnit.createTopic(KafkaUnit.java:153)
and my code is like this:
`
import com.google.common.base.Throwables;
import info.batey.kafka.unit.KafkaUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TestClass {
private static final int KAFKA_PORT = 2181;
private static final int ZK_PORT = 9092;
private static final String SOURCE_TOPIC = "source-topic";
private static final String ISSUE_TOPIC = "issue-topic";
private static final String CRASH_TOPIC = "crash-topic";
private KafkaUnit kafkaServer;
@Before
public void setup() {
try {
kafkaServer = new KafkaUnit(ZK_PORT, KAFKA_PORT);
kafkaServer.createTopic(SOURCE_TOPIC);
kafkaServer.createTopic(ISSUE_TOPIC);
kafkaServer.createTopic(CRASH_TOPIC);
} catch (Exception e) {
Throwables.propagate(e);
}
kafkaServer.startup();
}
@Test
public void testConsumer() {
}
@After
public void tearDown() {
if (null != kafkaServer)
kafkaServer.shutdown();
}
}
`
I don't know how to fix this. Any suggestions are thankful!
The text was updated successfully, but these errors were encountered:
Hi
I receive an exception when I create a topic:
and my code is like this:
`
import com.google.common.base.Throwables;
import info.batey.kafka.unit.KafkaUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TestClass {
}
`
I don't know how to fix this. Any suggestions are thankful!
The text was updated successfully, but these errors were encountered: