confluentinc / confluent-cli

Confluent Platform CLI
Other
60 stars 38 forks source link

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

Open viveksinghggits opened 5 years ago

viveksinghggits commented 5 years ago

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.

DaveSlinn commented 5 years ago

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.

viveksinghggits commented 5 years ago

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

tpilli-zz commented 5 years ago

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

robertjin commented 5 years ago

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

tianhao-au commented 5 years ago

I am having the same issue with Confluent 5.2.1

viveksinghggits commented 5 years ago

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

CIoann commented 5 years ago

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

ramdhakne commented 5 years ago

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
stychu commented 5 years ago

@ramdhakne thanks this helped!

toanmxpixta commented 4 years ago

@ramdhakne Thank you

ChaosOrb781 commented 4 years ago

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

mzoz commented 4 years ago

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

cfitchVFC commented 4 years ago

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

syntaxerr commented 4 years ago

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

vpahal3 commented 4 years ago

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

mwws commented 4 years ago

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

It helps, thanks a lot

suvadipg commented 4 years ago

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

kala28 commented 4 years ago

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.
NLe1 commented 4 years ago

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

ghost commented 4 years ago

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

samanmunikar commented 4 years ago

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.

abomb302 commented 4 years ago

running jps and then killing all pids.

this worked for me

Kiran-G1 commented 4 years ago

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

ilayatshah commented 3 years ago

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

SrinivasMurthyMutnurugithub commented 2 years ago

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

Thanks it worked