WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may

kafka连接生产者(消费者其实也一样的问题)出现了下面这个报错:(

WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

找到配置文件


在配置plaintext的时候,地址配置的是master(master是我在/etc/hosts文件里面配置的127.0.0.1),而我连接的时候,使用的是:

 bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test

改为:

 bin/kafka-console-producer.sh --broker-list master:9092 --topic test

perfect,完美的解决了(生产者也一样哦)

真的很奇怪,为什么不能自动转换过来



发布了146 篇原创文章 · 获赞 80 · 访问量 27万+
展开阅读全文

Tomcat7,httpasyncclient-4.0.1,给自己发get请求,接收不到

01-20

Tomcat7中启动一个线程和主服socket通信,在该线程中用httpasyncclient给本Tomcat发送一个get请求。现在问题是执行了一段时间后,tomcat接收不到该请求,其他的浏览器发过来的请求都可以接收到。也不清楚是请求发送失败还是tomcat出问题了。不知道是什么原因导致的。 正常情况下,httpasyncclient发送该请求,打印的日志如下: [exchange: 70] start execution 559163 DEBUG [2016-01-20 11:41:02] CookieSpec selected: best-match 559163 DEBUG [2016-01-20 11:41:02] Auth cache not set in the context 559163 DEBUG [2016-01-20 11:41:02] [exchange: 70] Request connection for {}->http://127.0.0.1:8080 559163 DEBUG [2016-01-20 11:41:02] Connection request: [route: {}->http://127.0.0.1:8080][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20] 559163 DEBUG [2016-01-20 11:41:02] Connection leased: [id: http-outgoing-5][route: {}->http://127.0.0.1:8080][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20] 559179 DEBUG [2016-01-20 11:41:02] [exchange: 70] Connection allocated: http-outgoing-5 [ACTIVE] 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][r:r]: Set attribute http.nio.exchange-handler 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:r]: Event set [w] 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 [ACTIVE] Request ready 559179 DEBUG [2016-01-20 11:41:02] Connection route already established 559179 DEBUG [2016-01-20 11:41:02] [exchange: 70] Attempt 1 to execute request 559179 DEBUG [2016-01-20 11:41:02] Target auth state: UNCHALLENGED 559179 DEBUG [2016-01-20 11:41:02] Proxy auth state: UNCHALLENGED 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> GET /360pay/uc/user?devID=90e11876fcb7a658&clientID=1216597&session_id=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342&client_version=2.0.3&gatewayID=7 HTTP/1.1 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> Host: 127.0.0.1:8080 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> Connection: Keep-Alive 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> User-Agent: Apache-HttpAsyncClient/4.0.1 (java 1.5) 559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:w]: Event set [w] 559194 DEBUG [2016-01-20 11:41:02] [exchange: 70] Request completed 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:w]: 262 bytes written 559194 DEBUG [2016-01-20 11:41:02] business data sign:sid=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "GET /360pay/uc/user?devID=90e11876fcb7a658&clientID=1216597&session_id=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342&client_version=2.0.3&gatewayID=7 HTTP/1.1[\r][\n]" 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "Host: 127.0.0.1:8080[\r][\n]" 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "Connection: Keep-Alive[\r][\n]" 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "User-Agent: Apache-HttpAsyncClient/4.0.1 (java 1.5)[\r][\n]" 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "[\r][\n]" 559194 DEBUG [2016-01-20 11:41:02] will be md5:sid=sst1gameb003440bf1d84210a6d50c3c8adeda3e16034218efdc1ce1bbe1bf33a33686dac788f6 559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][r:w]: Event cleared [w] 不正常情况下: [exchange: 11538] start execution 135320174 DEBUG [2016-01-20 05:47:10] CookieSpec selected: best-match 135320174 DEBUG [2016-01-20 05:47:10] Auth cache not set in the context 135320174 DEBUG [2016-01-20 05:47:10] [exchange: 11538] Request connection for {}->http://127.0.0.1:8080 135320174 DEBUG [2016-01-20 05:47:10] Connection request: [route: {}->http://127.0.0.1:8080][total kept alive: 0; route allocated: 2 of 2; total allocated: 2 of 20] 只有这么点日志,是get请求发送失败吗?求大神指教下 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览