Open yishain11 opened 5 years ago
Your kafkaHost is the string ADDR is that correct ?
@hyperlink ADDR is a placeholder for the real address, and the address is correct (double checked it with http request via postman)
@yishain11 did you ever solve this?
Questions?
Bug Report
producer it giving timeout error when trying to send data, and consumer cannot connect (with the same time out error.
Environment
kafka-node env: windows 7
kafka env: centos 7
For specific cases also provide
Include Sample Code to reproduce behavior
producer:
Include output with Debug turned on
simple log error: at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) message: 'Request timed out after 30000ms' } debug producer error: kafka-node:KafkaClient kafka-node-client reconnecting to localhost:9092 +1s kafka-node:KafkaClient kafka-node-client createBroker localhost:9092 +1ms kafka-node:KafkaClient kafka-node-client socket closed localhost:9092 (hadError: true) +1s kafka-node:KafkaClient kafka-node-client reconnecting to localhost:9092 +1s kafka-node:KafkaClient kafka-node-client createBroker localhost:9092 +0ms kafka-node:KafkaClient kafka-node-client socket closed localhost:9092 (hadError: true) +1s kafka-node:KafkaClient kafka-node-client reconnecting to localhost:9092 +1s kafka-node:KafkaClient kafka-node-client createBroker localhost:9092 +1ms kafka-node:KafkaClient kafka-node-client socket closed localhost:9092 (hadError: true) +1s ...
Include Sample Code to reproduce behavior
consumer in expressjs:
consumer error simple output: in kconsumer: TimeoutError: Request timed out after 30000ms
DEBUG error output: kafka-node:KafkaClient broker is now ready +6ms kafka-node:KafkaClient kafka-node-client updated internal metadata +14ms kclient ready kafka-node:KafkaClient kafka-node-client updated internal metadata +12ms kafka-node:KafkaClient kafka-node-client createBroker localhost:9092 +2ms kafka-node:KafkaClient waitUntilReady [BrokerWrapper localhost:9092 (connected: true) (ready: false) (idle: false) (needAuthentication: false) (authenticated: false)] +17ms kafka-node:Consumer connection closed +1s kafka-node:KafkaClient kafka-node-client socket closed localhost:9092 (hadError: true) +3ms kafka-node:KafkaClient kafka-node-client reconnecting to localhost:9092 +1s kafka-node:KafkaClient kafka-node-client createBroker localhost:9092 +1ms kafka-node:Consumer connection closed +1s ...
Kafka is working fine on my remote centos7 machine, using the consumer and producer consoles works ok.
Its seems that both the consumer and the producer are unable to connect to kafka broker, even if the client is able to - the consumer failes on initial connection, and the producer on sending data. I have checked issue #1275 and found no answer there.
Thanks for your contribution!