How do I start Cassandra on Windows?
And what does my environment have to look like?
I am getting an error when starting Cassandra on Windows... uname -o not supported.
I am using uname (GNU sh-utils) 2.0
I am not running in cygwin but just a pure powershell Window.
My Cassandra version comes directly from git
Here is what I tried:
D:\dev\3rdparty\cassandra\cassandra [trunk +1 ~0 -0 !]> .\bin\cassandra.bat -v -f
Detected powershell execution permissions. Running with enhanced startup scripts.
Sourcing cassandra config file: D:/dev/3rdparty/cassandra/cassandra/conf/cassandra-env.ps1
Setting up Cassandra environment
Starting cassandra server
Running cassandra with: [java.exe -javaagent:"D:\dev\3rdparty\cassandra\cassandra\lib\jamm-0.2.6.jar" -ea -Dlog4j.defa
ultInitOverride=true -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms3072M -Xmx3
072M -Xmn768M -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:StringTableSize=1000003 -XX:+UseParNewGC -XX:+UseConcMarkSwe
epGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly -XX:+UseTLAB -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=71
99 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dlog4j.configuration=lo
g4j-server.properties -Dcassandra -Dlogback.configurationFile=logback.xml -Dcassandra.logdir="D:\dev\3rdparty\cassandra
\cassandra/logs" -Dcassandra.storagedir="D:\dev\3rdparty\cassandra\cassandra/data" -cp "D:\dev\3rdparty\cassandra\cassa
ndra\conf";"D:/dev/3rdparty/cassandra/cassandra/lib/airline-0.6.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/antlr-run
time-3.5.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/commons-cli-1.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/
commons-codec-1.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/commons-lang3-3.1.jar";"D:/dev/3rdparty/cassandra/cassa
ndra/lib/commons-math3-3.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/compress-lzf-0.8.4.jar";"D:/dev/3rdparty/cassa
ndra/cassandra/lib/concurrentlinkedhashmap-lru-1.4.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/disruptor-3.0.1.jar";"
D:/dev/3rdparty/cassandra/cassandra/lib/guava-16.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/high-scale-lib-1.0.6.j
ar";"D:/dev/3rdparty/cassandra/cassandra/lib/jackson-core-asl-1.9.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jacks
on-mapper-asl-1.9.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jamm-0.2.6.jar";"D:/dev/3rdparty/cassandra/cassandra/
lib/javax.inject.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jbcrypt-0.3m.jar";"D:/dev/3rdparty/cassandra/cassandra/l
ib/jline-1.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jna-4.0.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/json
-simple-1.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/libthrift-0.9.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib
/logback-classic-1.1.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/logback-core-1.1.2.jar";"D:/dev/3rdparty/cassandra
/cassandra/lib/lz4-1.2.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/metrics-core-2.2.0.jar";"D:/dev/3rdparty/cassand
ra/cassandra/lib/netty-all-4.0.20.Final.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/reporter-config-2.1.0.jar";"D:/de
v/3rdparty/cassandra/cassandra/lib/slf4j-api-1.7.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/snakeyaml-1.11.jar";"D
:/dev/3rdparty/cassandra/cassandra/lib/snappy-java-1.0.5.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/stream-2.5.2.j
ar";"D:/dev/3rdparty/cassandra/cassandra/lib/stringtemplate-4.0.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/super-c
sv-2.1.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/thrift-server-0.3.5.jar";"D:\dev\3rdparty\cassandra\cassandra\bu
ild\classes\main";"D:\dev\3rdparty\cassandra\cassandra\build\classes\thrift" "org.apache.cassandra.service.CassandraDae
mon"]
"C:/Users/las1/AppData/Local/GitHub/PortableGit_054f2e797ebafd44a30203088cd3d58663c627ef/bin/**uname.exe": invalid option -- o**
Try `"C:/Users/las1/AppData/Local/GitHub/PortableGit_054f2e797ebafd44a30203088cd3d58663c627ef/bin/uname.exe" --help' for
more information.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
May be you didn't set environment variable properly..
you have to set cassandra_home in environment variables under user variables till below point.
CASSANDRA_HOME : D:\dev\3rdparty\cassandra\cassandra
-> 2nd thing error is suggesting
-Xms3072M -Xmx3072M this are much more
Xms should be around 1 gb or half of your Xmx and Xmx should be 1/2 of RAM size..
so according to your system's ram change this two things into cassandra-env.sh file under cassandra/conf
Related
i try to install Oracle Forms and Reports 12.2.1.4, but everytime I run setup.fmw.12.2.1.4.0_fr_win64.exe file Oracle Universal Installer window shows up for a moment with communicate "Preparing the installer...". After that it dissappears and shows again with another communicate: "Cleaning up...". After this communicate, the installer window turns off and there are no other steps.
Screens below
first communicate
second communicate
Did anybody have this problem also? My JAVA_HOME is set as C:\Java\jdk1.8.0_241 and PATH=%JAVA_HOME%\bin.
Here's also -debug log below
m_szTempDirectory: C:\Windows\Temp
Extract to C:\Windows\Temp\sfxCD9A.tmp
Extracting sfx.ini from D:\setup_fmw_12.2.1.4.0_fr_win64.exe to C:\Windows\Temp\sfxCD9A.tmp
Wiz_SingleEntryUnzip (extractAutorun) return code: 0
Total uncompressed size: 2447428290
m_szTempDirectory: C:\Windows\Temp
Extract to same C:\Windows\Temp\sfxCD9A.tmp
Extracting installer files
Wiz_SingleEntryUnzip() result: 0
Total disks: 1 (1)
Finished extracting Disk1
Using version 1.8.0.211.12 of component Disk1\stage\Components\oracle.jre
Jar list: Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
New command: oracle.jre\.\jdk\jre\bin\java.exe -jar install/modules/ora-launcher.jar
Unzipping Java jars Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar to oracle.jre
Getting size of Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Size of Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar: 201205655
Checking space for Java components in C:\Windows\Temp
Unzipping Java jars: Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Unzipping Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Launch command length: 278
Launch command: "C:\Windows\Temp\sfxCD9A.tmp\oracle.jre\jdk\jre\bin\java.exe" "-Djava.io.tmpdir=C:\Windows\Temp" "-Dsfx.installer.launcher.home=D:\" "-Dsfx.extract.path=C:\Windows\Temp\sfxCD9A.tmp" "-Dsfx.exe=D:\setup_fmw_12.2.1.4.0_fr_win64.exe" -jar install/modules/ora-launcher.jar "-debug"
cmdLine: "C:\Windows\Temp\sfxCD9A.tmp\oracle.jre\jdk\jre\bin\java.exe" "-Djava.io.tmpdir=C:\Windows\Temp" "-Dsfx.installer.launcher.home=D:\" "-Dsfx.extract.path=C:\Windows\Temp\sfxCD9A.tmp" "-Dsfx.exe=D:\setup_fmw_12.2.1.4.0_fr_win64.exe" -jar install/modules/ora-launcher.jar "-debug"
Command successfully started; waiting for completion
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
dwExitCode: 1
myspawn() result: 1
Press any key to exit
To be clear, you need to start the installer using an elevated shell. This is not the same as being a member of the Windows "Administrator" group. Right-click on the exe and click on "Run as administrator".
Instead of running setup.exe, try execute \install\oui.exe -debug
Running SonarQube 5.6.6 from Jenkins on CentOS 7.3, I got the following error:
2017.09.01 19:05:16 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AV485bp0qXlQ-QPWWE9A
java.lang.OutOfMemoryError: Java heap space
2017.09.01 19:05:17 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=PP::Symphony3M | type=REPORT | id=AV485bp0qXlQ-QPWWE9A | time=74089ms
sonar.ce.javaOpts is set like below:
sonar.ce.javaOpts=-Xmx60g -Xms1g -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
How much heap space should I give to SonarQube, when analyzing a one million LOC project? Or is there another way of avoiding Java heap space issues?
The max heap you can allocate depends on the free Ram on your server. free command can help identify the stats. Based on free Ram you can set your Xmx values.
BTW, make sure the code compiles on a server. If you are able to compile and not scan then only the increasing the heap will help.
I need to run side by side two ElasticSearch instances (version 1.7 and version 5.2.2) on the same server (Widows 2012 R2). When I try to run the newer version, I receive an error:
PS C:\Program Files\Elasticsearch\elasticsearch-5.2.2\bin> .\elasticsearch.bat
Error: encountered environment variables that are no longer supported
Use jvm.options or ES_JAVA_OPTS to configure the JVM
ES_HEAP_SIZE=8g: set -Xms8g and -Xmx8g in jvm.options or add "-Xms8g -Xmx8g" to ES_JAVA_OPTS
This is caused by the fact that that there was a breaking change (described here) in the way the heap size is set. In the previous version of ElasticSearch (1.7) it was set by an environment variable:
ES_HEAP_SIZE = 8g
I tried setting up another env variable:
ES_JAVA_OPTS = -Xms8g -Xmx8g
and I also edited jvm.options file by adding
-Xms8g
-Xmx8g
but I'm still getting the same error.
Is there a way to configure heap size in ElasticSearch 5.2.2 without deleting ES_HEAP_SIZE environment variable (which I need to keep version 1.7 up and running)? If not, is it possible to set heap size in the old version in a way that would also allow the new version to run?
Edit: Given that jvm.options is not an option, the only thing I see is modifying your elasticsearch/bin/elasticsearch script, mostly the line:
ES_JAVA_OPTS="$(parse_jvm_options "$ES_JVM_OPTIONS") $ES_JAVA_OPTS" #default
to:
ES_JAVA_OPTS="-Xms myXmsValue -Xmx myXmxValue -someOtherOptions someValue"
With the other options and value according to what you want.
Here is what I found out:
it turns out that the error I was struggling with was raised not by ElasticSearch itself, but by the batch script running the ElasticSearch (bin\elasticsearch.bat). The problematic lines are:
if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1
(...)
if %bad_env_var% == 1 (
echo Error: encountered environment variables that are no longer supported
echo Use jvm.options or ES_JAVA_OPTS to configure the JVM
(...)
if not "%ES_HEAP_SIZE%" == "" echo ES_HEAP_SIZE=%ES_HEAP_SIZE%: set -Xms%ES_HEAP_SIZE% and -Xmx%ES_HEAP_SIZE% in jvm.options or add "-Xms%ES_HEAP_SIZE% -Xmx%ES_HEAP_SIZE%" to ES_JAVA_OPTS
(...)
exit /b 1
)
As far as I can see, this check is there in order to help people migrating from older version to the newer, pointing them to a new way of setting up the heap size. Apart from that, the environment variable ES_HEAP_SIZE is not mentioned in the script, so its' existence should not affect the ElasticSearch 5.2.2 instance. Based on these observations, the easiest fix seems to be simply commenting out the check:
rem if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1
I tried it and both instances of ElasticSearch now run side by side without issues.
One additional trap to avoid is not to set up the heap size in both the file and ES_JAVA_OPTS, which leads to duplicate min heap size settings found error when deploying. Just stick to the file config.
Huge thanks to #asettouf whose answer led me to the correct solution!
I'm running scripts inside GroovyConsole 2.4.5 on Windows 7 64-bit and they are crashing due to out of memory error. Runtime.getRuntime().maxMemory() shows 247MB and my PC has 32GB RAM. What is the way to increase memory available for GroovyConsole and underlying JVM?
I tried editing startGroovy.bat file with:
set GROOVY_OPTS="-Xmx2g -Xms1g"
and other values, but it had no effect.
I'm not on Windows, so can't test, but you should be able to use JAVA_OPTS instead of GROOVY_OPTS, ie:
set JAVA_OPTS="-Xmx1G"
Before you run groovyConsole
You're already doing correctly, edit startGroovy.bat and simply try with g lowercase, to set GROOVY_OPTS:
set GROOVY_OPTS="-Xmx1g"
After some tries I see the follow effect, If I use " to set GROOVY_OPTS only work with one parameter, if I want to use two parameters -Xmx1g -Xms512m I've to remove " if not it doesn't works. So you can try with:
set GROOVY_OPTS=-Xmx1g -Xms512m
Instead of
set GROOVY_OPTS="-Xmx1g -Xms512m"
Hope it helps,
I have installed Maven 3.3.3. Using JDK 1.6 and OS as Windows Vista. But, on command prompt, unable to get proper version details of the maven. What may be wrong ? Environment variables (as system variables) are set as follows :-
M2_HOME = C:\Program Files\Maven 3.3.3\apache-maven-3.3.3
MAVEN_HOME = C:\Program Files\Maven 3.3.3\apache-maven-3.3.3
added in PATH as C:\Program Files\Maven 3.3.3\apache-maven-3.3.3\bin
MAVEN_OPTS = -Xms256m -Xmx512m
C:\>mvn --version
Output is as :-
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp
-classpath
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:...|:]
-enableassertions[:...|:]
enable assertions
-da[:...|:]
-disableassertions[:...|:]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:[=]
load native agent library , e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:[=]
load native agent library by full pathname
-javaagent:[=]
load Java programming language agent, see java.lang.instrument
-splash:
show splash screen with specified image