Why suddenly cassandra 3.11.4 and 3.11.3 “can not find or load main class -ea”?
Dear cassandra pioneers and users: Yesterday afternoon, I can run cassandra 3.11.4's git-clone-src by using "bin/cassandra", but after I changed some codes by Eclipse, and compile without any error, not only the runnable source version, but also I redownload 3.11.4-bin.tar.gz and 3.11.3 from official website, they can't run by command of "./bin/cassandra", the steps and logs are as below: [gloCalHelp.com@gloCalHelp5 apache-cassandra-3.11.4]$ ./bin/cassandra & [1] 5872 [gloCalHelp.com@gloCalHelp5 apache-cassandra-3.11.4]$ classname is+ org.apache.cassandra.service.CassandraDaemon +CLASSPATH is+./bin/../conf:./bin/../build/classes/main:./bin/../build/classes/thrift:./bin/../lib/airline-0.6.jar:./bin/../lib/antlr-runtime-3.5.2.jar:./bin/../lib/apache-cassandra-3.11.4.jar:./bin/../lib/apache-cassandra-thrift-3.11.4.jar:./bin/../lib/asm-5.0.4.jar:./bin/../lib/caffeine-2.2.6.jar:./bin/../lib/cassandra-driver-core-3.0.1-shaded.jar:./bin/../lib/commons-cli-1.1.jar:./bin/../lib/commons-codec-1.9.jar:./bin/../lib/commons-lang3-3.1.jar:./bin/../lib/commons-math3-3.2.jar:./bin/../lib/compress-lzf-0.8.4.jar:./bin/../lib/concurrentlinkedhashmap-lru-1.4.jar:./bin/../lib/concurrent-trees-2.4.0.jar:./bin/../lib/disruptor-3.0.1.jar:./bin/../lib/ecj-4.4.2.jar:./bin/../lib/guava-18.0.jar:./bin/../lib/HdrHistogram-2.1.9.jar:./bin/../lib/high-scale-lib-1.0.6.jar:./bin/../lib/hppc-0.5.4.jar:./bin/../lib/jackson-core-asl-1.9.13.jar:./bin/../lib/jackson-mapper-asl-1.9.13.jar:./bin/../lib/jamm-0.3.0.jar:./bin/../lib/javax.inject.jar:./bin/../lib/jbcrypt-0.3m.jar:./bin/../lib/jcl-over-slf4j-1.7.7.jar:./bin/../lib/jctools-core-1.2.1.jar:./bin/../lib/jflex-1.6.0.jar:./bin/../lib/jna-4.2.2.jar:./bin/../lib/joda-time-2.4.jar:./bin/../lib/json-simple-1.1.jar:./bin/../lib/jstackjunit-0.0.1.jar:./bin/../lib/libthrift-0.9.2.jar:./bin/../lib/log4j-over-slf4j-1.7.7.jar:./bin/../lib/logback-classic-1.1.3.jar:./bin/../lib/logback-core-1.1.3.jar:./bin/../lib/lz4-1.3.0.jar:./bin/../lib/metrics-core-3.1.5.jar:./bin/../lib/metrics-jvm-3.1.5.jar:./bin/../lib/metrics-logback-3.1.5.jar:./bin/../lib/netty-all-4.0.44.Final.jar:./bin/../lib/ohc-core-0.4.4.jar:./bin/../lib/ohc-core-j8-0.4.4.jar:./bin/../lib/reporter-config3-3.0.3.jar:./bin/../lib/reporter-config-base-3.0.3.jar:./bin/../lib/sigar-1.6.4.jar:./bin/../lib/slf4j-api-1.7.7.jar:./bin/../lib/snakeyaml-1.11.jar:./bin/../lib/snappy-java-1.1.1.7.jar:./bin/../lib/snowball-stemmer-1.3.0.581.1.jar:./bin/../lib/ST4-4.0.8.jar:./bin/../lib/stream-2.5.2.jar:./bin/../lib/thrift-server-0.3.7.jar:./bin/../lib/jsr223//.jar Error: Could not find or load main class -ea[1]+ Done ./bin/cassandra [gloCalHelp.com@gloCalHelp5 apache-cassandra-3.11.4]$ free -m total used free shared buffers cached Mem: 4567 801 3766 5 20 190 -/+ buffers/cache: 590 3977 Swap: 1031 0 1031and the main class CassandraDaemon and classpath are there as ":./bin/../lib/apache-cassandra-3.11.4.jar:", why Centos 6.9 cann't run in win10's vmware now? I would very appreciate your guiding. Thank you ahead. Sincerely yours, Georgelin www_8ems_...@sina.com mobile:0086 180 5986 1565
Re: Facing issues while starting Cassandra
Hello Osman, Thanks for the suggestion. I did try "export LC_ALL=C" It didn't help. Thanks On Tue, 24 Dec, 2019, 12:05 PM Osman Yozgatlıoğlu, < osman.yozgatlio...@gmail.com> wrote: > I faced similar issues with different locale settings. > Could you try following command before running? > export LC_ALL=C; > > Regards, > Osman > > On Tue, 24 Dec 2019 at 09:01, Inquistive allen > wrote: > > > > Hello Jeff, > > > > Thanks for responding. > > I have validated the cassandra.yaml file with other hosts in the cluster. > > There is no difference. I copied a yaml file from other node to this > node and changed the required configs. Still facing the same issue. > > The server went down for patching and after coming back up, Cassandra > dosent seem to start. > > Having looked for solutions on google, I found that it might be a > problem with the /tmp directory where the classes are stored. > > Each time I try starting Cassandra, in the /tmp directory a new > directory is created, but nothing is inside the directory. After some time, > the node goes down. > > > > I believe there is something to do with the /tmp directory. > > Request you to comment on the same. > > > > Thanks > > > > On Tue, 24 Dec, 2019, 3:42 AM Jeff Jirsa, wrote: > >> > >> Are you able to share the yaml? Almost certainly something in it that’s > invalid. > >> > >> On Dec 23, 2019, at 12:51 PM, Inquistive allen > wrote: > >> > >> > >> Hello Team, > >> > >> I am facing issues while starting Cassandra. > >> > >> Caused by: org.apache.cassandra.exceptions.ConfigurationException : > Invalid yaml: file: /path/to/yaml > >> Error: null ; can't construct a java object for tag: > >> yaml.org,2002:org.apache.cassandra.config.Config; > exception= java.lang.reflect.InvocationTargetException > >> > >> Request to comment on how to resolve the issue. > >> > >> Thanks & Regards > >> Allen > > - > To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org > For additional commands, e-mail: user-h...@cassandra.apache.org > >
Re: Facing issues while starting Cassandra
I faced similar issues with different locale settings. Could you try following command before running? export LC_ALL=C; Regards, Osman On Tue, 24 Dec 2019 at 09:01, Inquistive allen wrote: > > Hello Jeff, > > Thanks for responding. > I have validated the cassandra.yaml file with other hosts in the cluster. > There is no difference. I copied a yaml file from other node to this node and > changed the required configs. Still facing the same issue. > The server went down for patching and after coming back up, Cassandra dosent > seem to start. > Having looked for solutions on google, I found that it might be a problem > with the /tmp directory where the classes are stored. > Each time I try starting Cassandra, in the /tmp directory a new directory is > created, but nothing is inside the directory. After some time, the node goes > down. > > I believe there is something to do with the /tmp directory. > Request you to comment on the same. > > Thanks > > On Tue, 24 Dec, 2019, 3:42 AM Jeff Jirsa, wrote: >> >> Are you able to share the yaml? Almost certainly something in it that’s >> invalid. >> >> On Dec 23, 2019, at 12:51 PM, Inquistive allen wrote: >> >> >> Hello Team, >> >> I am facing issues while starting Cassandra. >> >> Caused by: org.apache.cassandra.exceptions.ConfigurationException : Invalid >> yaml: file: /path/to/yaml >> Error: null ; can't construct a java object for tag: >> yaml.org,2002:org.apache.cassandra.config.Config; exception= >> java.lang.reflect.InvocationTargetException >> >> Request to comment on how to resolve the issue. >> >> Thanks & Regards >> Allen - To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail: user-h...@cassandra.apache.org
Re: Facing issues while starting Cassandra
Hello Jeff, Thanks for responding. I have validated the cassandra.yaml file with other hosts in the cluster. There is no difference. I copied a yaml file from other node to this node and changed the required configs. Still facing the same issue. The server went down for patching and after coming back up, Cassandra dosent seem to start. Having looked for solutions on google, I found that it might be a problem with the /tmp directory where the classes are stored. Each time I try starting Cassandra, in the /tmp directory a new directory is created, but nothing is inside the directory. After some time, the node goes down. I believe there is something to do with the /tmp directory. Request you to comment on the same. Thanks On Tue, 24 Dec, 2019, 3:42 AM Jeff Jirsa, wrote: > Are you able to share the yaml? Almost certainly something in it that’s > invalid. > > On Dec 23, 2019, at 12:51 PM, Inquistive allen > wrote: > > > Hello Team, > > I am facing issues while starting Cassandra. > > Caused by: org.apache.cassandra.exceptions.ConfigurationException : > Invalid yaml: file: /path/to/yaml > Error: null ; can't construct a java object for tag: > yaml.org,2002:org.apache.cassandra.config.Config; > exception= java.lang.reflect.InvocationTargetException > > Request to comment on how to resolve the issue. > > Thanks & Regards > Allen > >
Re: Facing issues while starting Cassandra
Are you able to share the yaml? Almost certainly something in it that’s invalid. > On Dec 23, 2019, at 12:51 PM, Inquistive allen wrote: > > > Hello Team, > > I am facing issues while starting Cassandra. > > Caused by: org.apache.cassandra.exceptions.ConfigurationException : Invalid > yaml: file: /path/to/yaml > Error: null ; can't construct a java object for tag: > yaml.org,2002:org.apache.cassandra.config.Config; exception= > java.lang.reflect.InvocationTargetException > > Request to comment on how to resolve the issue. > > Thanks & Regards > Allen
Re: Create table concurrently
> On Dec 23, 2019, at 5:02 PM, Dimo Velev wrote: > > Hi, > > We have microservices that use Cassandra. Each instance, when started, > creates the required DB schema (and keeps a changelog). As instances can be > started at the same time, we use a row in a table as lock - insert into if > not exists using ttl. That all works without any issues. > > The problem is that the table that contains the lock is also created by the > applications using create if not exists. Despite the name, Cassandra seems to > have racing condition when this statement is called concurrently - it ends up > with multiple definitions of a table with different table id. Any DDLs after > that fail with configuration exceptions. The IF NOT EXISTS in DDL doesn’t use paxos, and has probably multiple races - it may be better in 4.0, but until then do not programmatically create tables in a way that can race. > > How does one clean up after that has happened? Not easily. You have to figure out which cfid is “right” and bounce each host, copying the real data to the right folder as you do it. It’s really really bad and painful. > > As a work around we're creating table with explicit table id set (computed > from the key space and table name so that all nodes generate the same id. > This kind of works but feels like an ugly hack. Are there other options that > you can think of that only rely on Cassandra? This is a reasonable workaround. The other alternative is external locking (e.g. zookeeper). Ugly. - To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail: user-h...@cassandra.apache.org
Create table concurrently
Hi, We have microservices that use Cassandra. Each instance, when started, creates the required DB schema (and keeps a changelog). As instances can be started at the same time, we use a row in a table as lock - insert into if not exists using ttl. That all works without any issues.The problem is that the table that contains the lock is also created by the applications using create if not exists. Despite the name, Cassandra seems to have racing condition when this statement is called concurrently - it ends up with multiple definitions of a table with different table id. Any DDLs after that fail with configuration exceptions. How does one clean up after that has happened?As a work around we're creating table with explicit table id set (computed from the key space and table name so that all nodes generate the same id. This kind of works but feels like an ugly hack. Are there other options that you can think of that only rely on Cassandra?CheersDimo
unsubscribe
unsubscribe Regards, AL
Facing issues while starting Cassandra
Hello Team, I am facing issues while starting Cassandra. Caused by: org.apache.cassandra.exceptions.ConfigurationException : Invalid yaml: file: /path/to/yaml Error: null ; can't construct a java object for tag: yaml.org,2002:org.apache.cassandra.config.Config; exception= java.lang.reflect.InvocationTargetException Request to comment on how to resolve the issue. Thanks & Regards Allen