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

Claude Warren edited comment on CASSANDRA-17773 at 7/26/22 10:41 AM:
---------------------------------------------------------------------

The code works in Debian as per  CASSANDRA-14306 which is not what the 
documentation says because of permissions issues.

On Debian 
{noformat}
CASSANDRA_HOME=/usr/share/cassandra{noformat}
which is only writable by root so the logs can not be in CASSANDRA_HOME/logs so 
/etc/cassandra/cassandra-env.sh sets
{noformat}
CASSANDRA_LOG+DIR=/var/log/cassandra{noformat}
as would be expected.  This is also the default set in /usr/sbin/cassandra.

 

I don't know what any other linux packaging does.  However, I think that this 
is a documentation issue and should simply be noted in the documentation that 
on linux the logs are written to /var/log/cassandra


was (Author: claudenw):
The code works in Debian as per  CASSANDRA-14306 which is not what the 
documentation says.

Because of permissions issues on Debian 
{noformat}
CASSANDRA_HOME=/usr/share/cassandra{noformat}
which is only writable by root so the logs can not be in CASSANDRA_HOME/logs so 
/etc/cassandra/cassandra-env.sh sets
{noformat}
CASSANDRA_LOG+DIR=/var/log/cassandra{noformat}
as would be expected.  This is also the default set in /usr/sbin/cassandra.

 

I don't know what any other linux packaging does.  However, I think that this 
is a documentation issue and should simply be noted in the documentation that 
on linux the logs are written to /var/log/cassandra

> Incorrect cassandra.logdir on Debian systems
> --------------------------------------------
>
>                 Key: CASSANDRA-17773
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17773
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>            Reporter: Eric Evans
>            Priority: Normal
>              Labels: lhf
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1-rc
>
>
> The Debian packaging patches bin/cassandra to use /var/log/cassandra for 
> logs, it does so conditionally however, only if CASSANDRA_LOG_DIR is unset. 
> This occurs _after_ cassandra-env.sh is sourced though, which also sets 
> CASSANDRA_LOG_DIR if unset (to $CASSANDRA_HOME/logs).  The result is that 
> -Dcassandra.lodir is set to /usr/share/cassandra/logs on Debian systems.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to