I am trying to setup kafka and ksql using confluent platform, but ksql is unable to start.
I have followed the steps to install kafka and ksql from confluent using this link https://docs.confluent.io/current/installation/installing_cp/deb-ubuntu.html#systemd-ubuntu-debian-install I have skipped zookeeper config, since we are not using multiple servers and Control center part. After everything i started zookeeper, kafka, schema-registry, kafka-connect, kafka-rest, ksql in this order. While checking status using command
_sudo systemctl status confluent*_
ksql failed to start, while everything else is running.
while going into cd /etc/ksql/ksql-server.properties
(#------ Endpoint config -------)
listeners=http://0.0.0.0:8088
ksql.logging.processing.topic.auto.create=true
ksql.logging.processing.stream.auto.create=true
bootstrap.servers=localhost:9092
NOTE: I deleted commented part from config file since for (#) it was showing it as a heading here.
Expected Result:
confluent-ksql.service - Streaming SQL engine for Apache Kafka
Loaded: loaded (/lib/systemd/system/confluent-ksql.service; disabled; vendor preset: enabled) Active: active(running)
Actual Result:
confluent-ksql.service - Streaming SQL engine for Apache Kafka
Loaded: loaded (/lib/systemd/system/confluent-ksql.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-08-27 15:15:08 IST; 9s ago Docs: http://docs.confluent.io/ Process: 13833 ExecStart=/usr/bin/ksql-server-start /etc/ksql/ksql-server.properties (code=exited, status=255) Main PID: 13833 (code=exited, status=255)Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: (io.confluent.ksql.util.KsqlConfig:347) Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: [2019-08-27 15:15:07,722] ERROR Failed to start KSQL (io.confluent.ksql.rest.serv Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: io.confluent.ksql.util.KsqlServerException: Could not create the kafka streams st Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: Make sure the directory exists and is writable for KSQL server Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: or its parend directory is writbale by KSQL server Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: or change it to a writable directory by setting 'ksql.streams.state.dir' config Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: at io.confluent.ksql.rest.server.KsqlServerMain.enforceStreamStateDirAvai Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]:
at io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java: Aug 27 15:15:08 Mayank-Vostro-3478 systemd[1]: confluent-ksql.service: Main process exited, code=exited, status=255/n/a Aug 27 15:15:08 Mayank-Vostro-3478 systemd[1]: confluent-ksql.service: Failed with result 'exit-code'.