confluent-cli
confluent-cli copied to clipboard
Error message on start can be more useful...
I accidentally left my old ZK running and tried to use the CLI to start the stack:
[centos@ip-172-31-78-114 ~]$ confluent start
Starting zookeeper
|Zookeeper failed to start
zookeeper is [DOWN]
Cannot start Kafka, Zookeeper is not running. Check your deployment
Will be nice to use "ps" and tell me that it is already running
Indeed this can come up relatively often, especially in a dev environment, and the message is not very intuitive.
I've been thinking of adding an improvement, but beyond just reporting what is the PID of the conflicting service, I think it'd be great to give a hint about which is the descriptor of the outstanding confluent run that is responsible for the conflict (I'd expect it to be common to have another confluent-cli deployment that results in a conflict. Of course it could also be a standalone service, in which case a PID and the confluent home directory is what we can report). Since every service has at least one log file open while it's running, it is possible to extract this information with lsof
. I'll work on an extension. Thanks for recording this issue.
even better 👍
just ran into ZK failure to start due to lack of Java...
I think that swallowing the error isn't the right behavior here. I had to run the "bash -x confluent start" get the command you are using and run it to find the error. There were no logs.
Correct, that is the other case that has minimal info. I think one can only find an error message in the zookeeper.stderr
under the confluent.current location if java is not installed.
Finding the error will be easier if it goes to /var/log/kafka like the rest of the logs... I checked there first, but it was empty
Well this was happening with me too, than i did sudo service zookeeper stop ,then confluent stop ,contfluent start things looked on right track.
As a new Kafka user, I was hopeful that Confluent would make the experience smooth. However, after following the Ubuntu installation instructions and then hopping to the Quickstart, all that I see when I try to follow the instructions is this error. I have the global install directories in my path and everything else seems just fine on a fresh Ubuntu 16.04.3 LTS VM.
I have no idea what the problem is because the error message is so vague.
@sankalp58 that was helpful. I stopped and restarted and it worked. Thank you.
@clayheaton, Forget Java install perhaps?
Well this was happening with me too, than i did sudo service zookeeper stop ,then confluent stop ,contfluent start things looked on right track.
@sankalp58 This approach worked for me as well but partial. zookeeper, connect and kafka started but kafka-rest and schema-registry still failed to start.
Below is the error for schema-registry... Not able to figure out what went wrong and how to fix
[2018-11-02 15:20:13,511] ERROR The retention policy of the schema topic _schemas is incorrect. You must configure the topic to 'compact' cleanup policy to avoid Kafka deleting your schemas after a week. Refer to Kafka documentation for more details on cleanup policies (io.confluent.kafka.schemaregistry.storage.KafkaStore:258) [2018-11-02 15:20:13,515] INFO Shutting down schema registry (io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry:719) [2018-11-02 15:20:13,517] ERROR Server died unexpectedly: (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:51) java.lang.NullPointerException at io.confluent.kafka.schemaregistry.storage.KafkaStore.close(KafkaStore.java:366) at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.close(KafkaSchemaRegistry.java:720) at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.onShutdown(SchemaRegistryRestApplication.java:111) at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:66) at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:42) at io.confluent.rest.Application.createServer(Application.java:157) at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:43)
What's happening to me is that there's some kind of "zombie" zookeeper that cannot be used by confluent and doesn't let another zookeeper start because it's using the port 2181.
To see that error I ran confluent log zookeeper
and I got java.net.BindException: Address already in use
. I had a Zookeeper running from zookeeper-server-start
from my local kafka installation (not confluent). So I ran zookeeper-server-stop
and then I was able to run confluent start
and get zookeeper working again.
Unfortunately schema-registry was not being able to start so I just restarted my computer and everything got back to work.
@jonathanmv
What's happening to me is that there's some kind of "zombie" zookeeper that cannot be used by confluent and doesn't let another zookeeper start because it's using the port 2181.
To see that error I ran
confluent log zookeeper
and I gotjava.net.BindException: Address already in use
. I had a Zookeeper running fromzookeeper-server-start
from my local kafka installation (not confluent). So I ranzookeeper-server-stop
and then I was able to runconfluent start
and get zookeeper working again.Unfortunately schema-registry was not being able to start so I just restarted my computer and everything got back to work.
this is work for me thanks
Hi,
Can anyone help me understand what is the issue here when I am starting Confluent platform.
It says Java 1.8 is recommended but I do have 1.8 in my path.
I am using windows 7 and gitbash to run the command.
I was able to run zk & kafka thru docker. When I needed schema registry and rest proxy, I came to this and experiencing the same issue reported. Verified in my machine that no other instances of zk or kafka is running. How to find logs so that we can resolve why zk is failing to start ?
I was getting the below error:
Using CONFLUENT_CURRENT: /var/folders/f9/djcltlm97c737fxbhqdnsghh0000gn/T/confluent.H8lkzUOR
Starting zookeeper
Zookeeper failed to start
zookeeper is [DOWN]
Cannot start Kafka, Zookeeper is not running. Check your deployment
Error: exit status 127
This error message was not enough.
To find the more details about the error, I then went on to find some logs in the CONFLUENT_CURRENT directory in the zookeeper.stdout
/var/folders/f9/djcltlm97c737fxbhqdnsghh0000gn/T/confluent.H8lkzUOR/zookeeper/zookeeper.stdout
then found that the zookeeper 2181 port was already in use .
Resolution: Found and Killed the process running on port 2181 and this resolved the issue for me.
However, I do agree, the original error message can be improved.
Hi! I've got the same error:
Starting zookeeper
|Zookeeper failed to start
zookeeper is [DOWN]
Cannot start Kafka, Zookeeper is not running. Check your deployment
Error: exit status 127
In the file zookeeper.stdout i see next error:
Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain