[root@localhost tmp]# java -javaagent:./jmx_prometheus_javaagent-0.12.0.jar=8080:jmx-prom.yaml -jar /usr/share/cassandra/apache-cassandra-3.11.6.jar -Djava.util.logging.config.file=./program.log no main manifest attribute, in /usr/share/cassandra/apache-cassandra-3.11.6.jar
I was able to unjar the file and then in the manifest I noticed it pointed to a different file for classpath.
same issue with that file though
[root@localhost lib]# java -javaagent:./jmx_prometheus_javaagent-0.12.0.jar=8080:jmx-prom.yaml -jar /usr/share/cassandra/apache-cassandra-thrift-3.11.6.jar -Djava.util.logging.config.file=./program.log no main manifest attribute, in /usr/share/cassandra/apache-cassandra-thrift-3.11.6.jar
[root@localhost lib]# yum repolist Last metadata expiration check: 0:00:14 ago on Wed 13 May 2020 08:38:52 PM CDT. repo id repo name status AppStream CentOS-8 - AppStream 5,318 BaseOS CentOS-8 - Base 1,661 cassandra Apache Cassandra 3 *epel Extra Packages for Enterprise Linux 8 - x86_64 5,506 *epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 0 extras CentOS-8 - Extras 16 zabbix Zabbix Official Repository - x86_64 18 zabbix-non-supported Zabbix Official Repository non-supported - x86_64 1
I guess Prometheus is pretty popular, but I suspect this is a problem with the prometheus agent and not Cassandra.
you know, searching the Cassandra source is probably an easier way that unjarring things. I don't understand these premain classes. I was able to build a simple jar. I need to see if the jmx exporter works on it
Being that this _is_ #Java, also take a good look at the command line and environment variables needed for starting it. In the olden days, variables like $JAVA_PATH and $CLASSPATH had to be defined before the "java -jar somejarfile.jar" command ... some variables were small enough to define on the command line with "-Dsomevar=somevalue".
@musicman It has been a loooong time since I've messed around with #Java (I'd say 13-14 years), but if the CLASSPATH was set correctly, I never had to unjar jarfiles. I never had the situation where a required file was missing from the jar, so you may be in unknown territory.
so, for now, I can use that and not the packaged CentOS version, though figuring out what the hell is different about the packaged version is probably a good exercise for understand this. Cassandra is one of the things we are week on in the team (though not java, that's a personal weakness). While I am obviously going to be the SME for monitoring, I think I am going to end up that way for Cassandra as well just out of necessity.
I had long suspected that this pidfile might be the source of the issue at least regarding not having a jar at the top of the tree and the fact that the non-package version doesn't have it leads me to believe that is the case: -Dcassandra-pidfile=/var/run/cassandra/cassandra.pid
Now that I have something that works, it should be much easier to figure out what is going on.
"It is working" are good words to hear, but don't stop there. Document everything you've found and the steps it took to get there. You're likely to find that others have similar issues. Now that you're "Cassandra Doug", those notes will help keep you from starting the search de novo next time.
I have a feeling there was a port conflict between me trying to run the jar manually and the jar running as part of Cassandra...at least at some point.
I doubt my process would be very useful for anyone that knows much of anything about Java.
That said, once I have an understanding about what to alert on and if this jmx_exporter has everything we need, there might be a blog at https://www.openlogic.com/blog