How to correctly use the cassandra.config startup parameter - cassandra

I am trying to start up a Cassandra instance through the command line and am having some trouble setting the cassandra.config parameter:
cassandra -f -Dcassandra.config=path/to/config
When I set it to the path where my config files are, the process halts and throws the following error:
ERROR 02:11:31 Fatal configuration error
org.apache.cassandra.exceptions.ConfigurationException: Cannot locate /path/to/config
at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:64) ~[main/:na]
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:75) ~[main/:na]
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:136) ~[main/:na]
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:112) ~[main/:na]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:155) [main/:na]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:410) [main/:na]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:453) [main/:na]
Cannot locate /path/to/config
I know the directory exists, so I'm not really sure to go from here. Any ideas on how to get this to work?

Looks like you have some errors in your config on the layout. There has to be a certain layout for a config to work. Can you provide the config?

file:///path/to/config should work as YamlConfigurationLoader expects path to be URL.

Related

Getting error java.lang.IllegalArgumentException: when running feature file

When I am running my feature file i am getting the below error:-
Exception in thread "main" java.lang.IllegalArgumentException: path must exist: C:\Users\bajaj\eclipse-workspace\cucumberpractices\src\test\java\AppFeatures\Search.Feature
Please find attached screenshot of feature file and step definition file
Error came because it was taking incorrect feature file

Error loading list when adding a list to Arabic plugin gazetteer

I tried to add a new list to the arabic plugin gazetteer.
I followed the following steps:
create a new file "tags.lst" to the directory "GATE_Developer_8.1\plugins\Lang_Arabic\resources\gazetteer\"
append the "lists.def" file with: "tags.lst:tags::arabic"
When launching the gate software, a window pop-up with the following message:
Resource could not be created!
gate.creole.ResourceInstantiationException:
gate.util.GateRuntimeException: Error loading list: tags.lst:
java.io.IOException: The system cannot find the path specified.
Here is the full exception:
gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: tags.lst: java.io.IOException: The system cannot find the path specified
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:281)
at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:119)
at gate.Factory.createResource(Factory.java:432)
at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:257)
at java.lang.Thread.run(Thread.java:745)
Caused by: gate.util.GateRuntimeException: Error loading list: tags.lst: java.io.IOException: The system cannot find the path specified
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:527)
at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:276)
... 4 more
Caused by: gate.creole.ResourceInstantiationException: java.io.IOException: The system cannot find the path specified
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:199)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:158)
at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:520)
... 5 more
Caused by: java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:188)
... 7 more
I will appreciate any help ??
The Problem was due to two major issues which are:
The file was not saved correctly as utf-8 encoding which was resolved by using online converter: http://www.motobit.com/util/charset-codepage-conversion.asp
The file contains special characters which were resolved by using the following replaceAll regular expression [#|"|:]:
line = line.replaceAll("[#|\"|:]", " ");

logstash error while starting -- LoadError: Could not load FFI Provider:

I installed latest Logstash (2.4) on my linux mint 17. Created a conf file and tried starting it. It gives me a very huge stack trace (1740 lines of stack trace).
LoadError: Could not load FFI Provider: (NotImplementedError) FFI not available: java.lang.UnsatisfiedLinkError: could not locate stub library in jar file. Tried [jni/x86_64-Linux/libjffi-१.२.so, /jni/x86_64-Linux/libjffi-१.२.so]
at com.kenai.jffi.internal.StubLoader.getStubLibraryStream(StubLoader.java:396)
at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:345)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:254)
at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.kenai.jffi.Init.load(Init.java:68)
at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49)
at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45)
at com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at com.kenai.jffi.Platform.isSupported(Platform.java:370)
I am reproducing above, first few lines of stack trace.
Some part of the stack trace (added below here) seems to suggest, it got something to do with jruby.
java.lang.UnsatisfiedLinkError: Can't load library: /usr/java/packages/lib/amd64/libjffi-१.२.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.kenai.jffi.internal.StubLoader.loadFromBootPath(StubLoader.java:316)
at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:249)
at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:434)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Any clues or recommendations on how to proceed to fix this..?
As shown in the 2nd stack trace above, my m/c doesn't have a directory /usr/java/..., so its obviously failing. But I don't understand why it will look for /usr/java/... set of folders.
Some other part of stack trace shows it is unable to locate libjffi-1.2.so.
What do all these errors mean, and how to fix ?
You can resolve this either by in jvm.options:
-Djava.io.tmpdir=</some/tmp/dir>
Where </some/tmp/dir> is a temporary directory.

Cassandra 2.1.8: Node refuses to start with NPE in removeUnfinishedCompactionLeftovers

I am trying to upgrade a Cassandra 2.1.0 cluster to 2.1.8 (latest release).
When I start a first node with 2.1.8 runtime, I get an error and the node refuses to start.
This is the error's stack trace :
org.apache.cassandra.io.FSReadError: java.lang.NullPointerException
at org.apache.cassandra.db.ColumnFamilyStore.removeUnfinishedCompactionLeftovers(ColumnFamilyStore.java:642) ~[apache-cassandra-2.1.8.jar:2.1.8]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:302) [apache-cassandra-2.1.8.jar:2.1.8]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:524) [apache-cassandra-2.1.8.jar:2.1.8]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:613) [apache-cassandra-2.1.8.jar:2.1.8]
Caused by: java.lang.NullPointerException: null
at org.apache.cassandra.db.ColumnFamilyStore.removeUnfinishedCompactionLeftovers(ColumnFamilyStore.java:634) ~[apache-cassandra-2.1.8.jar:2.1.8]
... 3 common frames omitted
FSReadError in Failed to remove unfinished compaction leftovers (file: /home/nudgeca2/datas/data/main/segment-97b5ba00571011e49a928bffe429b6b5/main-segment-ka-15432-Statistics.db). See log for details.
at org.apache.cassandra.db.ColumnFamilyStore.removeUnfinishedCompactionLeftovers(ColumnFamilyStore.java:642)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:302)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:524)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:613)
Caused by: java.lang.NullPointerException
at org.apache.cassandra.db.ColumnFamilyStore.removeUnfinishedCompactionLeftovers(ColumnFamilyStore.java:634)
... 3 more
Exception encountered during startup: java.lang.NullPointerException
The cluster has 7 nodes and it turns on AWS Linux EC2 instances.
The node I try to upgrade was stopped after a nodetool drain.
Then I tried to come back to 2.1.0 runtime but I now get a similar error.
I also tried to stop and start another node and everything was ok, the node restarted without any problem.
I tried to touch the missing file (as it should be removed, I thought it would perhaps not need a specific content). I had two other files with the same error that I also touched. And finally the node fails further while trying to read these files.
Anyone has any idea what I should do ?
Thank you for any help.
It might be worth opening a Jira for that issue, so if nothing else, they can catch the NPE and provide a better error message.
It looks like it's trying to open:
file: /home/nudgeca2/datas/data/main/segment-97b5ba00571011e49a928bffe429b6b5/main-segment-ka-15432-Statistics.db
It's possible that it's trying to read that file because it finds the associated data file: (/home/nudgeca2/datas/data/main/segment-97b5ba00571011e49a928bffe429b6b5/main-segment-ka-15432-Data.db). Does that data file exist? I'd be tempted to move it out of the way, and see if it starts properly.

Liferay pentaho Integaration throwing error javax.naming.OperationNotSupportedException: Context is read only error

Integrating pentaho in liferay using pentaho.war and then after starting tomcat getting below error:
06:01:23,701 ERROR [JNDIResourceProvider] error closing context
javax.naming.OperationNotSupportedException: Context is read only
at org.apache.naming.NamingContext.checkWritable(NamingContext.java:962) at org.apache.naming.NamingContext.close(NamingContext.java:762)
at com.tonbeller.tbutils.res.JNDIResourceProvider.close(JNDIResourceProv
ider.java:68)
at com.tonbeller.tbutils.res.CompositeResourceProvider.close(CompositeRe
sourceProvider.java:56)
at com.tonbeller.tbutils.res.ResourcesFactory.initialize(ResourcesFactor
y.java:163)
at com.tonbeller.tbutils.res.ResourcesFactory.<init>(ResourcesFactory.ja
va:92)
at com.tonbeller.tbutils.res.ResourcesFactory.<clinit>(ResourcesFactory.
java:89)
at com.tonbeller.tbutils.res.ResourcesFactoryContextListener.contextInit
ialized(ResourcesFactoryContextListener.java:23)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Please help
Thanks in advance
Tomcat's JNDI implementation is read only.
The error is caused by the SessionFactory trying to remove itself from JNDI.
Its not that serious, all you are getting is an ungraceful shutdown.
Try adding a file named resfactory.properties under WEB-INF/classes containing the following line:
tbeller.usejndi=false
see: http://jpivot.sourceforge.net/wcf/api/com/tonbeller/tbutils/res/package-summary.html

Resources