[ 
https://issues.apache.org/jira/browse/IGNITE-13453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199457#comment-17199457
 ] 

Alexandr Shapkin commented on IGNITE-13453:
-------------------------------------------

[~sdarlington] Could you please take a look?

With the new run.sh JMX is disabled by default and the original issue from 
https://issues.apache.org/jira/browse/IGNITE-11715 should be gone. If you need 
to configure it, then instead of configuring -NO_JMX option it's required to 
set JVM options explicitly, something like: 

Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=49113         
   -Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false

I think it's ok in general, but now we have different defaults for running 
thought ignite.sh and run.sh.

We can make additional changes and keep it in sync with ignite.sh (enabled by 
default).

WDYT?

+[~imurchenko]

 

> Docker: Change run.sh to call java directly
> -------------------------------------------
>
>                 Key: IGNITE-13453
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13453
>             Project: Ignite
>          Issue Type: Improvement
>    Affects Versions: 2.8.1
>            Reporter: Alexandr Shapkin
>            Assignee: Ilya Murchenko
>            Priority: Critical
>             Fix For: 2.10
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> ignite.sh is cumbersome in Docker as it creates the hassle with signals not 
> being propagated but adds little value as most of what ignite.sh discovers 
> about the system is known beforehand for our Docker images.
> Let's replace ignite.sh call with direct java invocation. 
> {code:bash}
> #!/bin/bash
> #
> # Licensed to the Apache Software Foundation (ASF) under one or more
> # contributor license agreements.  See the NOTICE file distributed with
> # this work for additional information regarding copyright ownership.
> # The ASF licenses this file to You under the Apache License, Version 2.0
> # (the "License"); you may not use this file except in compliance with
> # the License.  You may obtain a copy of the License at
> #
> #      http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing, software
> # distributed under the License is distributed on an "AS IS" BASIS,
> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> # See the License for the specific language governing permissions and
> # limitations under the License.
> #
> source "${IGNITE_HOME}"/bin/include/functions.sh
> #
> # Discover path to Java executable and check it's version.
> #
> checkJava
> #
> # Set IGNITE_LIBS.
> #
> source "${IGNITE_HOME}"/bin/include/setenv.sh
> CP="${IGNITE_LIBS}"
> DEFAULT_CONFIG=config/default-config.xml
> #
> # Add optional libs to classpath
> #
> if [ -n "${OPTION_LIBS}" ]; then
>     IFS=, LIBS_LIST=("$(tr -d '[:space:]' <<< ${OPTION_LIBS})")
>   for lib in ${LIBS_LIST[@]}; do
>     LIBS=$(JARS=("${IGNITE_HOME}/libs/optional/${lib}"/*); IFS=:; echo 
> "${JARS[*]}")
>     if [ -z "${USER_LIBS}" ]; then
>       export USER_LIBS="${LIBS}"
>     else
>       export USER_LIBS="${USER_LIBS}:${LIBS}"
>     fi
>   done
> fi
> #
> # Add external libs to classpath
> #
> if [ -n "${EXTERNAL_LIBS}" ]; then
>   IFS=, LIBS_LIST=("${EXTERNAL_LIBS}")
>   for lib in "${LIBS_LIST[@]}"; do
>     echo "${lib}" >> "${IGNITE_HOME}"/work/external_libs
>   done
>   wget --content-disposition -i "${IGNITE_HOME}"/work/external_libs -P 
> "${IGNITE_HOME}"/libs/external
>   rm "${IGNITE_HOME}"/work/external_libs
> fi
> #
> # Define classpath
> #
> if [ "${USER_LIBS:-}" != "" ]; then
>     IGNITE_LIBS=${USER_LIBS:-}:${IGNITE_LIBS}
> fi
> CP="${IGNITE_LIBS}"
> unset IFS
> #
> # Define default Java options
> #
> if [ -z "${JVM_OPTS}" ] ; then
>     JVM_OPTS="-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m"
> fi
> #
> # Add Java extra option 
> #
> if [ "${version}" -eq 8 ] ; then
>     JVM_OPTS="\
>         -XX:+AggressiveOpts \
>          ${JVM_OPTS}"
> elif [ "${version}" -gt 8 ] && [ "${version}" -lt 11 ]; then
>     JVM_OPTS="\
>         -XX:+AggressiveOpts \
>         --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
>         --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
>         --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
>         --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
>         
> --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
>         --illegal-access=permit \
>         --add-modules=java.xml.bind \
>         ${JVM_OPTS}"
> elif [ "${version}" -ge 11 ] ; then
>     JVM_OPTS="\
>         --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
>         --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
>         --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
>         --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
>         
> --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
>         --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
>         --illegal-access=permit \
>         ${JVM_OPTS}"
> fi
> DIGNITE_QUIET=$(printenv JVM_OPTS | grep -o 'IGNITE_QUIET=[^ ,]\+' | cut -d 
> "=" -f 2)
> if [ "${IGNITE_QUIET}" == "false" -o "${DIGNITE_QUIET}" == "false" ]; then
>     JVM_OPTS="${JVM_OPTS} -DIGNITE_QUIET=false"
> fi
> #
> # Start Ignite node
> #
> if [ -z "${CONFIG_URI}" ]; then
>   exec "${JAVA}" ${JVM_OPTS} -DIGNITE_HOME="${IGNITE_HOME}" -cp "${CP}" 
> org.apache.ignite.startup.cmdline.CommandLineStartup "${DEFAULT_CONFIG}"
> else
>   exec "${JAVA}" ${JVM_OPTS} -DIGNITE_HOME="${IGNITE_HOME}" -cp "${CP}" 
> org.apache.ignite.startup.cmdline.CommandLineStartup "${CONFIG_URI}"
> fi
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to