[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2016-11-15 Thread Shannon Carey (JIRA)

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

Shannon Carey commented on CASSANDRA-7254:
--

Thanks. As it turns out, I think I had a similar issue as Jolokia where a rogue 
JVM agent created a non-daemon thread which prevented JVM termination despite 
presence of a JVM shutdown hook (those don't execute until all non-daemon 
threads have stopped). My initial theory regarding port usage seems to have 
been incorrect.

> 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
>Reporter: Tyler Hobbs
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2016-11-15 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7254:


If you're using a version of Cassandra that includes CASSANDRA-10091, you can 
safely remove this check and still get a good error message (as confirmed in 
CASSANDRA-12074).  Otherwise, this check is purely for cosmetic reasons, and 
you can remove it if it's causing problems.

> 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
>Reporter: Tyler Hobbs
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2016-11-11 Thread Shannon Carey (JIRA)

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

Shannon Carey commented on CASSANDRA-7254:
--

This check causes Cassandra to freeze (block forever) if I use a JVM agent that 
tries to connect to the local JMX with 
`ManagementFactory.getPlatformMBeanServer()` (at least, I'm pretty sure that's 
why... it's definitely something to do with the agent.) It appears to only 
happen if we're using `com.sun.management.jmxremote.port` and not if we're only 
using `cassandra.jmx.local.port`. 

Can anyone explain why this happens? Is Cassandra doing something that causes 
other stuff to not be able to connect to the JMX port? Or is my agent's code 
not connecting properly?

> 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
>Reporter: Tyler Hobbs
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-10-31 Thread viasyn (JIRA)

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

viasyn commented on CASSANDRA-7254:
---

Here is corresponding C* issue: https://github.com/rhuss/jolokia/issues/168

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-10-31 Thread viasyn (JIRA)

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

viasyn commented on CASSANDRA-7254:
---

Current workaround is really buggy.

We are using Jolokia (JMX->HTTP bridge) with C* too. Here is example solution: 
https://github.com/causes/cassandra-nagios
Jolokia prevents no-arg jvm from exit due to buggy daemon threads monitor so c* 
hangs on startup.

The only acceptable workaround for now is to override "properties" system 
variable. This variable is undocumented and we afraid that it may disappear or 
change behavior.

If you dont want to fix this workaround maybe you will add additional 
environment variable to customize launch_service argument?

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-10-08 Thread Shaun Kalley (JIRA)

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

Shaun Kalley commented on CASSANDRA-7254:
-

The 'grep -q' command in the patch is not Solaris 10 compatible.  The common 
solution, I believe, is to direct the output of the grep command to /dev/null.

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-09-05 Thread Katsutoshi Nagaoka (JIRA)

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

Katsutoshi Nagaoka commented on CASSANDRA-7254:
---

Thank you for this workaround. 

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-09-04 Thread Chris McEniry (JIRA)

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

Chris McEniry commented on CASSANDRA-7254:
--

Katsutoshi Nagaoka This is more that jolokia causes the preflight java run that 
was added in this issue to not exit and hangs up the startup script. The 
jvm-not-existing behavior happens even if you just try to startup java with 
only the -javaagent:jolokia.jar so I'm thinking it might be more for the 
jolokia crew to decide if that's intended behavior or not.

Two thoughts on work around:
1.) (undo) You can out the preflight but then you'll see the NPEs that this was 
trying to avoid
2.) Instead of running jolokia as a commandline javaagent, have it attach after 
the start (http://www.jolokia.org/reference/html/agents.html#jvm-attach), but 
then you'll have to update the service start script or do some other manual 
start.

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-09-01 Thread Chris Lohfink (JIRA)

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

Chris Lohfink commented on CASSANDRA-7254:
--

[~na-ga] if you use
{code}
sudo netstat -anp | grep \* | grep LISTEN
{code}
you should be able to find whatever is using the port that either jmx or 
jolokia agent is using.  Should probably switch to oracle JVM as well.

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-09-01 Thread Katsutoshi Nagaoka (JIRA)

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

Katsutoshi Nagaoka commented on CASSANDRA-7254:
---

After CASSANDRA-7254, I can not start to cassandra-2.0.10 with jolokia agent. 
When I execute 'service cassandra start' command, startup process will be 
blocked by a grep. I think the cause of this problem that the next command is 
not completed. Is there a workaround something?

my environment:
* Cassandra 2.0.10
* Ubuntu 12.04.5 LTS
* java version "1.7.0_65"
* OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-4ubuntu1~0.12.04.2)
* OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

{code}
root@ubuntu:~# grep jolokia /etc/cassandra/cassandra-env.sh
# add the jolokia agent
JVM_OPTS="$JVM_OPTS 
-javaagent:/usr/share/cassandra/lib/jolokia-jvm-1.2.0-agent.jar"

root@ubuntu:~# "java" -cp 
/etc/cassandra:/usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang3-3.1.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/cassandra/lib/disruptor-3.0.1.jar:/usr/share/cassandra/lib/guava-15.0.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jline-1.0.jar:/usr/share/cassandra/lib/jna-4.0.0.jar:/usr/share/cassandra/lib/jolokia-jvm-1.2.0-agent.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.9.1.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/lz4-1.2.0.jar:/usr/share/cassandra/lib/metrics-core-2.2.0.jar:/usr/share/cassandra/lib/netty-3.6.6.Final.jar:/usr/share/cassandra/lib/reporter-config-2.1.0.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.7.2.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.7.2.jar:/usr/share/cassandra/lib/snakeyaml-1.11.jar:/usr/share/cassandra/lib/snappy-java-1.0.5.jar:/usr/share/cassandra/lib/snaptree-0.1.jar:/usr/share/cassandra/lib/super-csv-2.1.0.jar:/usr/share/cassandra/lib/thrift-server-internal-only-0.3.3.jar:/usr/share/cassandra/apache-cassandra-2.0.10.jar:/usr/share/cassandra/apache-cassandra-thrift-2.0.10.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/cassandra/stress.jar:/usr/share/java/jna.jar:
 -da -javaagent:/usr/share/cassandra/lib/jolokia-jvm-1.2.0-agent.jar 
-javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar 
-XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities 
-XX:ThreadPriorityPolicy=42 -Xms3760M -Xmx3760M -Xmn400M 
-XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:StringTableSize=103 
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled 
-XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 
-XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly 
-XX:+UseTLAB -XX:+CMSParallelInitialMarkEnabled -XX:+CMSEdenChunksRecordAlways 
-XX:+UseCondCardMark -Djava.net.preferIPv4Stack=true 
-Dcom.sun.management.jmxremote.port=7199 
-Dcom.sun.management.jmxremote.rmi.port=7199 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 2>&1 | grep -q 'Error: 
Exception thrown by the agent : java.lang.NullPointerException'

^C
root@ubuntu:~#
{code}

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1 rc3
>
> Attachments: 7254.txt
>
>
> 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.3.4#6332)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-07-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7254:


I slipped in logic to check for existing pid from pidfile when I rewrote the 
launch scripts so our only exposure on Windows is duplicate w/foreground mode.  
I'll open a ticket to replicate this logic on the Windows side.

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
> Attachments: 7254.txt
>
>
> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-07-03 Thread T Jake Luciani (JIRA)

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

T Jake Luciani commented on CASSANDRA-7254:
---

+1 though not sure if we need the same for windows :)

> 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: Brandon Williams
>Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
> Attachments: 7254.txt
>
>
> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-26 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-7254:
-

Yeah, I would put it in 2.0.

> 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, 2.0.10
>
> Attachments: 7254.txt
>
>
> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-26 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-7254:


Since CASSANDRA-7087 went in to 2.0, I assume this will as well?

> 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
>
> Attachments: 7254.txt
>
>
> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-25 Thread Chris Lohfink (JIRA)

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

Chris Lohfink commented on CASSANDRA-7254:
--

I did open a JVM ticket but hasnt gotten approved yet, I will update the ticket 
with info on it.  I think the agent is worth exploring or having an alternative 
main class that can check the jmx port (provided as arg) to execute in 
cassandra-env.sh script.  

For CCM wont be a problem necessarily be a problem since the line that sets the 
rmi.port is in the cassandra-env.sh script which it doesnt use.

> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-25 Thread Brandon Williams (JIRA)

[ 
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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-25 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7254:


Damn, none of those options are very good.

bq. remove rmi port option until jvm fixed

Most users won't be on the latest and greatest JVM, and JMX port madness has 
caused a lot of problems for users.

bq. write a java app (platform independent, would have to work in many 
environments) that checks ports being open with appropariate and execute it in 
the bat/sh scripts to give a better warning

This would need to use (parts of) the cassandra config and environment 
variables.  I guess it's doable, just a pain.

bq. custom java agent that would do kind of a "preflight check" on startup, 
giving some appropriate warnings if any ports are used etc

We wouldn't have to set up a separate process for this, which is nice.  My main 
concern is implementing all of the JMX features correctly in a custom agent, 
making sure it works across multiple java versions, and that future java 
versions don't break it.

bq. ignore it until fixed (not ideal, but complexity for fixes might be worse 
then error)

I guess Google will work reasonable well for users who hit this.

I also played around with piping stderr through a process that could look for 
this particular string and output something more reasonable if found.  It seems 
like this would be pretty hard to make portable across shells, even if we 
ignore windows.  Somebody with more advanced shell-fu than I have might have a 
good idea, though.

Did you go ahead and open a JVM ticket?

> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-22 Thread Chris Lohfink (JIRA)

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

Chris Lohfink commented on CASSANDRA-7254:
--

My thoughts:
* remove rmi port option until jvm fixed
* write a java app (platform independent, would have to work in many 
environments) that checks ports being open with appropariate and execute it in 
the bat/sh scripts to give a better warning
* custom java agent that would do kind of a "preflight check" on startup, 
giving some appropriate warnings if any ports are used etc
* ignore it until fixed (not ideal, but complexity for fixes might be worse 
then error)
any feedback on a good approach?

> 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)


[jira] [Commented] (CASSANDRA-7254) NPE on startup if another Cassandra instance is already running

2014-06-19 Thread Chris Lohfink (JIRA)

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

Chris Lohfink commented on CASSANDRA-7254:
--

Seems like it, two instances of:
{code:title=Test.java|java}
public class Test {
public static void main(String[] args) throws Exception { 
Thread.sleep(10); }
}
{code}
and jvm args
{code}-Dcom.sun.management.jmxremote.port= 
-Dcom.sun.management.jmxremote.rmi.port= 
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false{code}
will cause that error.  Ill open issue and see if theres something to do about 
it for a better error

> 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)