Gert,

We have functionality in place for you to manage memory using Neo4j
configs. Look for neo4j-wrapper.conf in $NEO4J_HOME/conf. The configuration
in there is used here:
https://github.com/neo4j/neo4j/blob/master/packaging/standalone/src/main/distribution/shell-scripts/bin/neo4j#L73

As for using different versions of grep, I remember writing that particular
bit of code a couple of years ago! Alas, my Linux skills are not up to
scratch, well spotted.

As for changing it, any chance you might want to submit a pull request with
the change for us? There is some stuff here about how to go about it:
http://neo4j.com/docs/stable/community-contributing.html. We always welcome
help like that, and your name would live forever afterwards:
http://neo4j.com/docs/stable/contributors.html ;)

Thanks,

Lasse




On Tue, Oct 28, 2014 at 11:44 AM, Gert Hulselmans <[email protected]>
wrote:

> Hi,
>
> I have problems with starting Neo4J on a server with 256GiB of RAM.
>
> $ ./neo4j-community-2.1.5/bin/neo4j start
> ERROR! Neo4j cannot be started using java version .
> * Please use Oracle(R) Java(TM) 7 or OpenJDK(TM) to run Neo4j Server.
> * Please see http://docs.neo4j.org/ for Neo4j Server installation
> instructions.
>
>
>
> The problem comes from the checkjvmcompatibility function in ./bin/utils,
> as it tries to run JVM without giving initial and maximum heap size.
> Due the large amount of RAM in the server, JVM tries to allocate to many
> GiB
> which are not always free.
>
> # check if running Oracle JDK 7 or OpenJDK 7, warn if not
> checkjvmcompatibility() {
>   # Shut down if java version < 1.7
>   JAVAVERSION=$("$JAVACMD" ${JAVA_OPTS} -version 2>&1 | awk -F '"'
> '/version/ {print $2}')
>   if [[ "$JAVAVERSION" < "1.7" ]]; then
>     complain_about_java_version
>     #exit 1
>   fi
>
>   $JAVACMD ${JAVA_OPTS} -version 2>&1 | egrep -q "(Java
> HotSpot\\(TM\\)|OpenJDK) (64-Bit Server|Server|Client) VM"
>   if [ $? -eq 1 ]
>   then
>     warn_about_java_runtime
>   fi
> }
>
>
>
> After fixing the function to the following, I can start Neo4J correctly.
>
>
> # check if running Oracle JDK 7 or OpenJDK 7, warn if not
> checkjvmcompatibility() {
>   # Get Java version output
>   JAVAVERSIONOUTPUT=$("$JAVACMD" -Xms10M -Xmx10M -version 2>&1)
>
>   # Check if JVM was able to start correctly.
>   if [ $? -ne 0 ] ; then
>     echo 'ERROR: Problem with starting JVM.'
>     exit 1
>    fi
>
>   # Shut down if java version < 1.7
>   JAVAVERSION=$(echo "$JAVAVERSIONOUTPUT" | awk -F '"' '/version/ {print
> $2}')
>   if [[ "$JAVAVERSION" < "1.7" ]]; then
>     complain_about_java_version
>     exit 1
>   fi
>
>   echo "$JAVAVERSIONOUTPUT" | egrep -q "(Java HotSpot\\(TM\\)|OpenJDK)
> (64-Bit Server|Server|Client) VM"
>   if [ $? -eq 1 ]
>   then
>     warn_about_java_runtime
>   fi
> }
>
>
> According to the manual of grep: egrep is deprecated, so it might be
> better to use grep -E instead:
>
>     In addition, three variant programs egrep, fgrep and rgrep are
> available.
>     egrep is the same as grep -E.
>     fgrep is the same as grep -F.
>     rgrep is the same as grep -r.
>     Direct invocation as either egrep or fgrep is deprecated, but is
> provided to allow historical applications that rely on them to run
> unmodified.
>
>
> Kind regards,
> Gert Hulselmans
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to