[
https://issues.apache.org/jira/browse/CASSANDRA-7254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14044146#comment-14044146
]
Brandon Williams commented on CASSANDRA-7254:
---------------------------------------------
I thought we could take a simple approach of looking for an existing Cassandra
process, but even that won't work because we'll break CCM and people who run
multiple instances per node. We can't really rely on the pidfile either because
of foreground mode. Trapping stderr in the shell is difficult because at that
point we're calling exec.
We could have a small java program that tries to bind the ports and exits
non-zero if it can't, then print out a message saying we couldn't bind before
trying to start cassandra.
> NPE on startup if another Cassandra instance is already running
> ---------------------------------------------------------------
>
> Key: CASSANDRA-7254
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7254
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Tyler Hobbs
> Assignee: Chris Lohfink
> Priority: Minor
> Fix For: 2.1.0
>
>
> After CASSANDRA-7087, if you try to start cassandra while another instance is
> already running, you'll see something like this:
> {noformat}
> $ bin/cassandra -f
> Error: Exception thrown by the agent : java.lang.NullPointerException
> {noformat}
> This is probably a JVM bug, but we should confirm that, open a JVM ticket,
> and see if we can give a more useful error message on the C* side.
--
This message was sent by Atlassian JIRA
(v6.2#6252)