Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation ? #18

Closed
Phil4 opened this issue May 3, 2016 · 16 comments
Closed

Windows installation ? #18

Phil4 opened this issue May 3, 2016 · 16 comments

Comments

@Phil4
Copy link

Phil4 commented May 3, 2016

I tried to install the tool but I'm using Windows as operating system.
Everything seems to be working except that no Elastic Search instance is launched.
I think it is only launched through bin/cassandra but not from bin/cassandra.bat but I didn't look further.

Here is the trace of the command "cassandra -e":

WARNING! Powershell script execution unavailable.
   Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
@vroyer
Copy link
Collaborator

vroyer commented May 4, 2016

Sorry, the cassandra.bat is not ready to run elassandra on Windows right now. However, you can probably copy the code of the -e option from bin/cassandra to the bin/cassandra.bat to activate Elasticsearch on your windows plateform.
Thanks',
Vincent.

@ddorian
Copy link

ddorian commented Jul 5, 2016

@vroyer
I downloaded cassandra-2.2.6, then loaded elassandra-2.1.1-14 on top of it, and only changed the classpath/CASSANDRA_MAIN

CASSANDRA_MAIN=org.apache.cassandra.service.ElassandraDaemon

But it errors with "could not find or load main class org.apache.cassandra.service.ElassandraDaemon.

Any idea ?
Thank You

@ddorian
Copy link

ddorian commented Jul 5, 2016

@vroyer I fixed the previous issue by redownloading the release.

Though now I'm getting:

Starting with legacy startup options
Starting Cassandra Server
{2.1.1}: Initialization Failed ...

  • IllegalStateException[failed to load bundle [] due to jar hell]
    NoSuchFileException[C:\Users\admin\Desktop\elassandra-2.1.1-14\build\cla
    sses\main]

@vroyer
Copy link
Collaborator

vroyer commented Jul 5, 2016

Hi,
This is a classpath issue. org.apache.cassandra.service.ElassandraDaemon is the main class to launch Elassandra, but it seems that C:\Users\admin\Desktop\elassandra-2.1.1-14\build\cla sses\main does not contains it.
Thanks.

@ddorian
Copy link

ddorian commented Jul 5, 2016

@vroyer
This happens when I run it on ubuntu12.04:

Starting with Elasticsearch enabled.
CompilerOracle: inline org/apache/cassandra/db/AbstractNativeCell.compareTo (Lorg/apache/cassandra/db/composites/Composite;)I
CompilerOracle: inline org/apache/cassandra/db/composites/AbstractSimpleCellNameType.compareUnsigned (Lorg/apache/cassandra/db/composites/Composite;Lorg/apache/cassandra/db/composites/Composite;)I
CompilerOracle: inline org/apache/cassandra/io/util/Memory.checkBounds (JJ)V
CompilerOracle: inline org/apache/cassandra/io/util/SafeMemory.checkBounds (JJ)V
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare (Ljava/nio/ByteBuffer;[B)I
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare ([BLjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compareUnsigned (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/lang/Object;JI)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
22:01:09.840 [main] WARN org.elasticsearch.bootstrap - jvm uses the client vm, make sure to run java with the server vm for best performance by adding -server to the command line
22:01:12.776 [main] ERROR o.e.o.a.c.service.ElassandraDaemon - Exception
java.lang.ExceptionInInitializerError: null
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:124) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.service.ClientState.(ClientState.java:70) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.cql3.QueryProcessor$InternalStateInstance.(QueryProcessor.java:153) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.cql3.QueryProcessor$InternalStateInstance.(QueryProcessor.java:147) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.cql3.QueryProcessor.internalQueryState(QueryProcessor.java:161) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:334) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.service.ElassandraDaemon.activate(ElassandraDaemon.java:104) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.service.ElassandraDaemon.main(ElassandraDaemon.java:347) ~[elassandra-2.1.1-14.jar:na]
Caused by: org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Please prefix the file with file:/// for local files or file:/// for remote files. Aborting. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:73) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135) ~[elassandra-2.1.1-14.jar:na]
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:119) ~[elassandra-2.1.1-14.jar:na]
... 7 common frames omitted

@vroyer
Copy link
Collaborator

vroyer commented Jul 5, 2016

See Caused by: org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Please prefix the file with file:/// for local files or file:/// for remote files.
You should set CASSANDRA_CONF env variable or cassandra.config system property.

You may try to install the debian package available at http://packages.elassandra.io/deb/elassandra_2.1.1-14_all.deb

@ddorian
Copy link

ddorian commented Jul 6, 2016

@vroyer
Another error trying to manually install the .deb file.

virtualbox_ubuntu 14 04 server 32bit _06_07_2016_11_12_57

@ddorian
Copy link

ddorian commented Jul 6, 2016

Even this guide doesn't work with error:

virtualbox_ubuntu 14 04 server 32bit _06_07_2016_13_39_19

Somehow it's getting the path wrong.

@vroyer
Copy link
Collaborator

vroyer commented Jul 6, 2016

Please use the rigth path i gave you yesterday
http://packages.elassandra.io/deb/elassandra_2.1.1-14_all.deb

@ddorian
Copy link

ddorian commented Jul 6, 2016

@vroyer As you can see here I have downloaded the right file.
While when using apt-get it uses the wrong path.

@ddorian
Copy link

ddorian commented Jul 6, 2016

@vroyer can you give me sample of cassandra.config value (absolute path) that I can use or environment variable value? I tried different options and none worked and also tried searching for samples and couldn't find any. thanks

@vroyer
Copy link
Collaborator

vroyer commented Jul 6, 2016

Hi,
We are checking that the packages 2.1.1-14 is correct.
In order to start elassandra, you should set and export CASSANDRA_HOME to your elassandra installation directory.
Thanks',
Vincent.

Le 6 juil. 2016 à 14:01, ddorian a écrit :

@vroyer As you can see here I have downloaded the right file.
While when using apt-get it uses the wrong path.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@dukei
Copy link

dukei commented May 26, 2017

@vroyer , I have managed to patch cassandra.ps1 and set CASSANDRA_MAIN to ElassandraDaemon. Still the elassandra does not load with the following error:

{2.4.2}: Initialization Failed ...

  • IllegalStateException[failed to load bundle [file:/C:/elassandra-2.4.2/modules/lang-expression/antlr4-runtime-4.5.1-1.jar, file:/C:/elassandra-2.4.2/modules/lang-expression/asm-commons-5.0.4.jar, file:/C:/elassandra-2.4.2/modules/lang-expression/lang-expression-2.4.2.jar, file:/C:/elassandra-2.4.2/modules/lang-expression/lucene-expressions-5.5.2.jar] due to jar hell]
    NoSuchFileException[C:\elassandra-2.4.2\build\classes\main]

C:\elassandra-2.4.2\build\classes\main does not exist at all, it is development folder in a class path and I am trying to launch elassandra from a tarball.

How can I start elassandra on windows?

@dukei
Copy link

dukei commented May 26, 2017

Well it has started sucessfully when I created these build directories.

I have modified windows launch scripts:
#97

@DBarthe
Copy link

DBarthe commented Jun 8, 2017

Windows support added with 779289e

@DBarthe DBarthe closed this as completed Jun 8, 2017
@jsebrien
Copy link

The previous commit does not seem to be merged in 6.x version. How can we start Elassandra under windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants