无法连接在azure的不同数据中心中设置的kafka

pxy2qtax  于 2021-06-07  发布在  Kafka
关注(0)|答案(0)|浏览(212)

我们有两个数据中心---tpmg.cloudapp.net(23.97.52.45)--gns3.cloudapp.net(40.83.12.34)
tmpg有2台kafka服务器kafka1(172.16.31.142:51134)kafka(172.16.31.143:51135)
端口为9093的kafka服务器与公共azure端口51137和端口为51138的2181绑定。
我无法使用gns3服务器中的应用程序服务器连接到tpmgazure服务器中的kafka服务器。
有人能帮忙吗!!我的配置哪里出错了!!

logs added when trying to access kafka from gns
2016-05-09 08:48:32,262 INFO or.ap.zo.ClientCnxn [Thread-12-SendThread(23.97.52.45:51138)] Opening socket connection to server 23.97.52.45/23.97.52.45:51138. Will not attempt to authenticate using SASL (unknown error)
2016-05-09 08:48:38,357 INFO or.ap.zo.ZooKeeper [Thread-12] Session: 0x0 closed
2016-05-09 08:48:38,357 INFO or.ap.zo.ClientCnxn [Thread-12-EventThread] EventThread shut down
2016-05-09 08:48:38,358 INFO or.ap.ca.co.ka.KafkaConsumer [Thread-12] Stopping Kafka consumer
2016-05-09 08:48:38,358 ERROR co.mi.mw.op.lo.AppContextLoader [Thread-12] Exception occurred while starting Kafka Subscriber ::
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
    at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:880) ~[zkclient-0.3.jar:0.3]
    at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98) ~[zkclient-0.3.jar:0.3]
    at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:84) ~[zkclient-0.3.jar:0.3]
    at kafka.consumer.ZookeeperConsumerConnector.connectZk(ZookeeperConsumerConnector.scala:171) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at kafka.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:126) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at kafka.javaapi.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:66) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at kafka.javaapi.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerConnector.scala:69) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at kafka.consumer.Consumer$.createJavaConsumerConnector(ConsumerConnector.scala:105) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at kafka.consumer.Consumer.createJavaConsumerConnector(ConsumerConnector.scala) ~[kafka_2.9.2-0.8.2.1.jar:?]
    at org.apache.camel.component.kafka.KafkaConsumer.doStart(KafkaConsumer.java:61) ~[camel-kafka-custom-1.0.jar:?]
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2083) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2377) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2313) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2243) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2256) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.startRouteService(DefaultCamelContext.java:2133) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:794) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2109) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:726) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:337) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:264) ~[camel-core-2.13.4.jar:2.13.4]
    at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:688) ~[camel-core-2.13.4.jar:2.13.4]

提前谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题