confluent-cli icon indicating copy to clipboard operation
confluent-cli copied to clipboard

Error while starting Kafka (Cannot start Schema Registry, Kafka Server is not running. Check your deployment)

Open viveksinghggits opened this issue 7 years ago • 25 comments

so, I followed this guide to get the Kafka running

https://docs.confluent.io/current/quickstart/ce-quickstart.html#ce-quickstart

and it worked perfectly fine for sometime. I recently started getting this error while starting the services

This CLI is intended for development only, not for production
https://docs.confluent.io/current/cli/index.html

Using CONFLUENT_CURRENT: /tmp/confluent.llaA9yuK
Starting zookeeper
zookeeper is [UP]
Starting kafka
-Kafka failed to start
kafka is [DOWN]
Cannot start Schema Registry, Kafka Server is not running. Check your deployment

I looked into some previously raised issues but that was not very helpful. Anyone has any idea on how to debug this, or its better to have the complete log displayed here.

I am running Confluent Platform: 5.1.0 on

NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"
ID_LIKE="fedora"

machine.

viveksinghggits avatar Feb 07 '19 06:02 viveksinghggits

Is this still a problem? If so, can you post the results of running

confluent log kafka

This should give more detail about why kafka failed to start.

DaveSlinn avatar Mar 20 '19 23:03 DaveSlinn

@DaveSlinn I used another image to run Kafka, this wasnt working for me.

viveksinghggits avatar Mar 25 '19 12:03 viveksinghggits

@DaveSlinn when I tried to run Confluent 5.1.0. Zookeeper itself is not starting. where can i check logs in Confluent folder?

tpilli-zz avatar Mar 28 '19 19:03 tpilli-zz

I got the same issue when I first setup and updating the following fixed it for me:

In /etc/kafka/server.properties, comment out the broker.id=0 line and add the following line to enable broker id generation

#broker.id=0 broker.id.generation.enable=true

robertjin avatar May 03 '19 17:05 robertjin

I am having the same issue with Confluent 5.2.1

tianhao-au avatar Jul 22 '19 04:07 tianhao-au

I am not using this right now, so maintainer can close the issue.

viveksinghggits avatar Jul 22 '19 09:07 viveksinghggits

Basically you should: sudo rm -fr /tmp/confl* confluent start

CIoann avatar Jul 22 '19 15:07 CIoann

stale processes were running and not allowing new incarnation to resurrect.

What worked for me is running jps and then killing all pids.

$ jps
94165 Jps
52807 KsqlServerMain
52521 KafkaRestMain
52394 SchemaRegistryMain
53386 Ksql
52922 ControlCenter
52253 SupportedKafka
52607 ConnectDistributed

$ kill -9 52807 52521 52394 53386 52922 52253 52607
$ confluent local stop

and then

confluent local start

ramdhakne avatar Oct 15 '19 18:10 ramdhakne

@ramdhakne thanks this helped!

stychu avatar Oct 22 '19 08:10 stychu

@ramdhakne Thank you

toanmxpixta avatar Dec 11 '19 02:12 toanmxpixta

Had the same problem, in my experience, you do not have to manually kill each process as the confluent command "confluent local destroy" will kill each of its running processes allowing new ones to spawn, try that before attempting to kill processes manually

ChaosOrb781 avatar Jan 13 '20 07:01 ChaosOrb781

so frustrated, the setting up is ridiculously hassling, errors popping out in almost every step

mzoz avatar Jan 17 '20 02:01 mzoz

So I am trying to get 5.4 going to no avail - Sometimes it looks like everything is up and then I immediately do a status and stuff is down - anyone running into this? typically control-center will no t come up and fails on start but sometimes it LOOKS like it does but again doing a status a bunch of stuff is down

cfitchVFC avatar Feb 12 '20 16:02 cfitchVFC

Yeah, I am using latest download 5.4 and get the following error.

Cannot start Schema Registry, Kafka Server is not running. Check your deployment Error: exit status 127

The local commands are intended for a single-node development environment only, NOT for production usage. https://docs.confluent.io/current/cli/index.html

Using CONFLUENT_CURRENT: /tmp/confluent.GZnmCfjj Starting zookeeper zookeeper is [UP] Starting kafka |Kafka failed to start kafka is [DOWN] Cannot start Schema Registry, Kafka Server is not running. Check your deployment Error: exit status 127

syntaxerr avatar Feb 25 '20 04:02 syntaxerr

Using confluent version : 5.4.1 Step 1: Check for error log using below command : confluent local log kafka f For me it was port 8090 already in use Step 2: Check port already in use command netstat -vanp tcp | grep 8090 or sudo lsof -i tcp:8090 Step 3: Update etc/config/server.properties file Uncomment and update the port in below line as below: a) line 193 => confluent.metadata.server.listeners=http://0.0.0.0:8095 b) line 195 => confluent.metadata.server.advertised.listeners=http://127.0.0.1:8095 Step 4: Clean previous run : confluent local destroy

vpahal3 avatar Apr 12 '20 07:04 vpahal3

Basically you should: sudo rm -fr /tmp/confl* confluent start

It helps, thanks a lot

mwws avatar Apr 16 '20 07:04 mwws

trying to setup on Ubuntu image on Windows and getting flowing error while setting up confluent-5.5.0-2.12

Using CONFLUENT_CURRENT: /tmp/confluent.UWGFhyBm Starting zookeeper zookeeper is [UP] Starting kafka |Kafka failed to start kafka is [DOWN] Cannot start Schema Registry, Kafka Server is not running. Check your deployment Error: exit status 127

suvadipg avatar May 09 '20 16:05 suvadipg

trying to setup on Ubuntu image on Windows and getting flowing error while setting up confluent-5.5.0-2.12

Using CONFLUENT_CURRENT: /tmp/confluent.UWGFhyBm Starting zookeeper zookeeper is [UP] Starting kafka |Kafka failed to start kafka is [DOWN] Cannot start Schema Registry, Kafka Server is not running. Check your deployment Error: exit status 1

trying to setup on Ubuntu image on Windows and getting flowing error while setting up confluent-5.5.0-2.12

Using CONFLUENT_CURRENT: /tmp/confluent.UWGFhyBm Starting zookeeper zookeeper is [UP] Starting kafka |Kafka failed to start kafka is [DOWN] Cannot start Schema Registry, Kafka Server is not running. Check your deployment Error: exit status 127

  1. Check your confluent status: code: confluent local status. (all must be down, if its not then stop the confluent code- confluent local stop)
  2. now copy paste this code below. sudo rm -fr /tmp/confl*
  3. Start your confluent. confluent local start.

kala28 avatar May 21 '20 02:05 kala28

jps and kill -9 all of the process worked for me! Thanks @ramdhakne

NLe1 avatar Jun 02 '20 04:06 NLe1

jps and kill -9 all of the process worked for me as well for confluent-5.5.1. Thanks @ramdhakne

ghost avatar Aug 11 '20 22:08 ghost

Basically, I ran confluent log kafka command and read the logs. I found out that port 9092 was already occupied so I freed the port using fuser -k 9092/tcp command.

samanmunikar avatar Sep 24 '20 02:09 samanmunikar

running jps and then killing all pids.

this worked for me

abomb302 avatar Sep 30 '20 06:09 abomb302

This is a port problem. If you see any of the services are down like this Starting zookeeper zookeeper is [UP] Starting kafka kafka is [UP] Starting schema-registry schema-registry is [UP] Cannot start Kafka Rest, Kafka Server is not running. Check your deployment then check the log of kafka using command ./confluent log kafka scroll and check for any port errors like below

kafka.common.KafkaException: Socket server failed to bind to 0.0.0.0:9092: Address already in use. at kafka.network.Acceptor.openServerSocket(SocketServer.scala:441) at kafka.network.Acceptor.<init>(SocketServer.scala:331) at kafka.network.SocketServer$$anonfun$createAcceptorAndProcessors$1.apply(SocketServer.scala:148) at kafka.network.SocketServer$$anonfun$createAcceptorAndProcessors$1.apply(SocketServer.scala:144) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) if you find any port that is already being used some other process then find that process using the below command sudo lsof -i :9092 then kill all those process ids using below command sudo kill -9 process_id

Kiran-G1 avatar Oct 22 '20 04:10 Kiran-G1

I am unable to start the Confluent as it gives me the following error Using CONFLUENT_CURRENT: /tmp/confluent.040021 Starting ZooKeeper ZooKeeper is [UP] Starting Kafka Kafka is [UP] Starting Schema Registry Error: Schema Registry failed to start

ilayatshah avatar Nov 03 '21 10:11 ilayatshah

Basically you should: sudo rm -fr /tmp/confl* confluent start

Thanks it worked