kafka-php icon indicating copy to clipboard operation
kafka-php copied to clipboard

Fatal error: Uncaught Kafka\Exception: Not has broker can connection `metadataBrokerList`

Open badaay opened this issue 5 years ago • 4 comments

Fatal error: Uncaught Kafka\Exception: Not has broker can connection metadataBrokerList in ~/Kafka/vendor/nmred/kafka-php/src/Kafka/Producer/Process.php on line 193

Kafka\Exception: Not has broker can connection metadataBrokerList in .~/Kafka/vendor/nmred/kafka-php/src/Kafka/Producer/Process.php on line 193

$config = \Kafka\ProducerConfig::getInstance();
$config->setMetadataRefreshIntervalMs(10000);
$config->setBrokerVersion('1.0.0');

//I already using 127.0.0.1 and my local server IP but still not working
$config->setMetadataBrokerList('localhost:9092'); 

$config->setRequiredAck(1);
$config->setIsAsyn(false);
$config->setProduceInterval(500);
$config->setClientId('test');

can anyone help??

badaay avatar Dec 13 '19 07:12 badaay

Could you solve this issue? I'm having the same problem

frankhubrepo avatar Jan 13 '20 15:01 frankhubrepo

修改socket的连接时间即可,默认是0.1秒

daoyan1 avatar Feb 12 '20 02:02 daoyan1

Could you solve this issue? I'm having the same problem

It is unable to connect to server within specified time, you need to increase the time in socket.php.

parveenbadoni avatar Mar 02 '20 13:03 parveenbadoni

any update on this issue? I'm having this issue and unable to resolve it.

basit-tkxel avatar Jun 01 '21 12:06 basit-tkxel