You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/04/16 03:51:05 UTC
[jira] [Assigned] (CASSANDRA-2489) better not close the out/error
stream from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-2489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis reassigned CASSANDRA-2489:
-----------------------------------------
Assignee: paul cannon
is redirect-to-file kosher for daemonizing?
> better not close the out/error stream from CassandraDaemon
> ----------------------------------------------------------
>
> Key: CASSANDRA-2489
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2489
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Jackson Chung
> Assignee: paul cannon
> Priority: Minor
>
> When cassandra is started in the background (-p /tmp/pidfile.pid), the System.out System.err is closed. That may not be suitable in case where capturing thread dump via traditional sigquit is preferred (kill -3 <pid> ). This could be useful especially when jmx collection is failing, or ability to do some little script to continuously capture thread dump via a script in the background.
> closing System.err could also potentially be swallowing fatal error that crashing the jvm.
> I would suggest make change to the stocked cassandra start script, when the intends is not running in foreground, (ie running in background) then redirect the standard output/error to a file, eg: /var/log/cassandra/cassandra.out 2>&1 &
> currently i apply a workaround to the script by faking the cassandra-foreground flag as -Dcassandra-foreground=no since the check is simply look for null:
> {code:title=AbstracCassandraDaemon.activate()}
> if (System.getProperty("cassandra-foreground") == null)
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira