Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confluent 3.3.0 can't change default log directory location

I've used confluent Kafka before and normally i'd change the log.dirs=my-NEW-Location in server.properties file located in /etc/kafka/.

I Just installed Confluent 3.3.0 on my Ubuntu 16.04 machine.. its starts no problem using command confluent start kafka. I've tried to change the log.dirs in server.properties to my new location but confluent is not picking it up for some reason. After checking the server.log file Confluent creates the logs in /tmp/confluent.SOME_RAMDOM_STRING/, Is there a way to change this?

G

like image 534
Gman Avatar asked Dec 10 '22 10:12

Gman


1 Answers

That's currently a feature of Confluent CLI. It will locate all the data and metadata of the services you are starting under a common location. You may find out which this specific location is any time by running:

confluent current

By default, Confluent CLI will pick a location under your ${TMPDIR}, and it will create there a directory with the format you noticed having a random suffix (confluent.<8 random chars>). The way to set a path of your choice for this common location when using Confluent CLI is to set the environment variable CONFLUENT_CURRENT. For instance:

$ export CONFLUENT_CURRENT="/var/confluent"
$ confluent current
/var/confluent.wDDFGXiZ

In the above example, assuming that /var/confluent exists already, all the data and metadata for the kafka service will be located under: /var/confluent.wDDFGXiZ/kafka

Let me note that, currently, using Confluent CLI is intended for development only. It's also open source and you may find it's code here: https://github.com/confluentinc/confluent-cli

like image 165
Konstantine Karantasis Avatar answered Feb 13 '23 09:02

Konstantine Karantasis