You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Doroszlai, Attila (JIRA)" <ji...@apache.org> on 2018/09/30 06:10:00 UTC

[jira] [Commented] (AMBARI-24703) Can't use symlink for Kafka Log directory. Ambari create a directory and remove the symlink when Kafka service is restarted

    [ https://issues.apache.org/jira/browse/AMBARI-24703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16633257#comment-16633257 ] 

Doroszlai, Attila commented on AMBARI-24703:
--------------------------------------------

Hi [~rsoni],

You have to configure Ambari with the target directory, where you want the symlink to point to.  This will preserve the symlink during Kafka restart.

Ambari handles 2 Kafka log directories: {{/var/log/kafka}} and the one specified in Ambari's Kafka configuration {{kafka-env/kafka_log_dir}}.  The latter one is always a directory, while {{/var/log/kafka}} can be a symlink, but only if {{kafka_log_dir}} is configured to a different value, since a symlink pointing to itself is broken.

With this configuration:

{noformat:title=kafka-env}
"kafka_log_dir": "/var/log/kafka-custom"
{noformat}

we get the following structure:

{noformat:title=ls -la /var/log/kafka*}
lrwxrwxrwx. 1 root  root     21 Sep 29 08:14 /var/log/kafka -> /var/log/kafka-custom

/var/log/kafka-custom:
drwxr-xr-x.  2 kafka hadoop 4096 Sep 30 06:04 .
drwxr-xr-x. 14 root  root   4096 Sep 29 09:24 ..
-rw-r--r--.  1 kafka hadoop  504 Sep 30 06:06 controller.log
...
-rw-r--r--.  1 kafka hadoop  358 Sep 29 08:14 kafka.err
...
-rw-r--r--.  1 kafka hadoop  158 Sep 30 06:04 server.log
{noformat}

> Can't use symlink for Kafka Log directory. Ambari create a directory and remove the symlink when Kafka service is restarted
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-24703
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24703
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.6.2
>            Reporter: Rahul Soni
>            Priority: Major
>         Attachments: Ambari Kafka.log
>
>
> Ambari is behaving erratically when a symlink is mentioned as Kafka Log Directory. When the log directory for Kafka mentions a symlink, a restart to the Kafka service removes the symlink and creates a new directory instead.
> Attached are the logs from service restart. [^Ambari Kafka.log]
> ^Ambari version - 2.6.2.2^



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)