Running elastic in windows with JRockit - Could not create the Java Virtual machine

Hello guys,

I'm new to elasticsearch and i'm following this tutorial
(http://bin63.com/how-to-install-elasticsearch-on-windows) to install it in
the windows environment.

The JDK/JRE in use is JRockit 1.6 (last version).

I faced a problem when running the .bat file, and i can't find a solution:

Unknown option or illegal argument: -XX +UseParNewGC.
Please check for incorrect spelling or review documentation of startup
options.

*
*
Could not create the Java virtual machine
*
*
My *JAVA_HOME *is pointing directly to *C:\Program
Files\Java\jrockit-jdk1.6.0_37-R28.2.5-4.1.0\bin\java *and my *Path *variable
is: *
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%JAVA_HOME%
*

Both the erro and my global variables can be found in the attached files.

Any ideas?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

For JRockit VM, you can safely disable (comment with "REM") the JVM
options in elasticsearch.bat starting with "-XX", because they are only
valid for HotSpot VM.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sorry Jorg, what should i do to get it solved?

Run REM + elasticsearch.bat?

It isnt just a warning message, the engine is not initiating (
http://localhost:9200/)

Em quinta-feira, 21 de fevereiro de 2013 10h36min51s UTC-3, Jörg Prante
escreveu:

For JRockit VM, you can safely disable (comment with "REM") the JVM
options in elasticsearch.bat starting with "-XX", because they are only
valid for HotSpot VM.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You have to modify the start script. Pick your favorite text editor,
open the file %ES_HOME%\bin\elasticsearch.bat (I hope this is correct
Windows syntax), in doubt, open the File Explorer to find the file, it's
in the bin direcotry where you installed Elasticsearch. Now, add the
letters "REM " in front of the lines with the active JVM options
starting with "-XX". "REM" means remark and is marking a comment line in
Windows batch files. You will notice there are already lines with -XX
options that are marked with REM so it should be very easy.

Jörg

Am 21.02.13 14:44, schrieb dertyu765:

Sorry Jorg, what should i do to get it solved?

Run REM + elasticsearch.bat?

It isnt just a warning message, the engine is not initiating
(http://localhost:9200/)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks alot Jorg, my .bat file is like this now:

@echo off

SETLOCAL

if NOT DEFINED JAVA_HOME goto err

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI

REM ***** JAVA options *****

if "%ES_MIN_MEM%" == "" (
set ES_MIN_MEM=256m
)

if "%ES_MAX_MEM%" == "" (
set ES_MAX_MEM=1g
)

if NOT "%ES_HEAP_SIZE%" == "" (
set ES_MIN_MEM=%ES_HEAP_SIZE%
set ES_MAX_MEM=%ES_HEAP_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xms%ES_MIN_MEM% -Xmx%ES_MAX_MEM%

if NOT "%ES_HEAP_NEWSIZE%" == "" (
set JAVA_OPTS=%JAVA_OPTS% -Xmn%ES_HEAP_NEWSIZE%
)

if NOT "%ES_DIRECT_SIZE%" == "" (
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE%
)

set JAVA_OPTS=%JAVA_OPTS% -Xss256k

REM Enable aggressive optimizations in the JVM
REM - Disabled by default as it might cause the JVM to crash
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts

REM set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC

REM set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75
REM set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly

REM When running under Java 7
REM JAVA_OPTS=%JAVA_OPTS% -XX:+UseCondCardMark

REM GC logging options -- uncomment to enable
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintClassHistogram
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintTenuringDistribution
REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCApplicationStoppedTime
REM JAVA_OPTS=%JAVA_OPTS% -Xloggc:/var/log/elasticsearch/gc.log

REM Causes the JVM to dump its heap on OutOfMemory.
set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError
REM The path to the heap dump location, note directory must exists and have
enough
REM space for a full heap dump.
REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof

set
ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/elasticsearch-0.20.5.jar;%ES_HOME%/lib/;%ES_HOME%/lib/sigar/
set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%"

"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% %* -cp
"%ES_CLASSPATH%" "org.elasticsearch.bootstrap.ElasticSearch"
goto finally

:err
echo JAVA_HOME environment variable must be set!
pause

:finally

ENDLOCAL

It's working great.

Em quinta-feira, 21 de fevereiro de 2013 12h01min29s UTC-3, Jörg Prante
escreveu:

You have to modify the start script. Pick your favorite text editor,
open the file %ES_HOME%\bin\elasticsearch.bat (I hope this is correct
Windows syntax), in doubt, open the File Explorer to find the file, it's
in the bin direcotry where you installed Elasticsearch. Now, add the
letters "REM " in front of the lines with the active JVM options
starting with "-XX". "REM" means remark and is marking a comment line in
Windows batch files. You will notice there are already lines with -XX
options that are marked with REM so it should be very easy.

Jörg

Am 21.02.13 14:44, schrieb dertyu765:

Sorry Jorg, what should i do to get it solved?

Run REM + elasticsearch.bat?

It isnt just a warning message, the engine is not initiating
(http://localhost:9200/)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.