kafka-rest icon indicating copy to clipboard operation
kafka-rest copied to clipboard

LOG_DIR not set causing FileNotFoundException: /kafka-rest.log (Permission denied)

Open kijanowski opened this issue 5 years ago • 1 comments

To fix it, edit bin/kafka-rest-run-class and add:

if [ "x$LOG_DIR" = "x" ]; then
  LOG_DIR="$base_dir/logs"
fi

just before

if [[ -n $LOG_DIR ]]; then
    [[ -d $LOG_DIR ]] || mkdir -p "$LOG_DIR"
    KAFKAREST_LOG4J_OPTS="-Dkafka-rest.log.dir=$LOG_DIR ${KAFKAREST_LOG4J_OPTS}"
fi

kijanowski avatar Feb 25 '19 06:02 kijanowski

Thanks for that information @kijanowski

As this behavior was still happening in the latest 5.5.x version of Rest Proxy, I created a simple PR based on your suggestion.

MarkC0x avatar Jun 03 '20 00:06 MarkC0x