karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Hauser (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-4884) Insure that $KARAF_DATA/log exists before starting Karaf instance
Date Thu, 08 Dec 2016 11:33:58 GMT

     [ https://issues.apache.org/jira/browse/KARAF-4884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Roland Hauser updated KARAF-4884:
---------------------------------
    Description: 
I'm would like to use the InspetIT Profiler for gathering perfomance data. It's agent requires,
that the directory, where "java.io.tmpdir" points to, does exist. It uses File.createTempFile
which fails when the temp directory does not exist. As a workaround, I added "mkdir -p ${KARAF_DATA}/tmp"
just before Karaf Main is called (script "karaf"):

        if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ "${CHECK_ROOT_INSTANCE_RUNNING}"
= "false" ] ; then
        	
        	# Make sure that the tmp directory exists
        	mkdir -p ${KARAF_DATA}/tmp
        	
            ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
                -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" \
                -Djava.ext.dirs="${JAVA_EXT_DIRS}" \
                -Dkaraf.instances="${KARAF_HOME}/instances" \
                -Dkaraf.home="${KARAF_HOME}" \
                -Dkaraf.base="${KARAF_BASE}" \
                -Dkaraf.data="${KARAF_DATA}" \
                -Dkaraf.etc="${KARAF_ETC}" \
                -Dkaraf.restart.jvm.supported=true \
                -Djava.io.tmpdir="${KARAF_DATA}/tmp" \
                -Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties"
\
                ${KARAF_SYSTEM_OPTS} \
                ${KARAF_OPTS} \
                ${OPTS} \
                -classpath "${CLASSPATH}" \
                ${MAIN} "$@"
        else
            die "There is a Root instance already running with name ${ROOT_INSTANCE_NAME}
and pid ${ROOT_INSTANCE_PID}"
        fi

  was:
I'm would like to use the InspetIT Profiler for gathering perfomance data. It's agent requires,
that the directory, where "java.io.tmpdir" points to, does exist. It uses File.createTempFile
which fails when the temp directory does not exist. As a workaround, I added "mkdir -p ${KARAF_DATA}/tmp"
just before Karaf Main is called (script "karaf"):

{code}
        if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ "${CHECK_ROOT_INSTANCE_RUNNING}"
= "false" ] ; then
        	
        	# Make sure that the tmp directory exists
        	mkdir -p ${KARAF_DATA}/tmp
        	
            ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
                -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" \
                -Djava.ext.dirs="${JAVA_EXT_DIRS}" \
                -Dkaraf.instances="${KARAF_HOME}/instances" \
                -Dkaraf.home="${KARAF_HOME}" \
                -Dkaraf.base="${KARAF_BASE}" \
                -Dkaraf.data="${KARAF_DATA}" \
                -Dkaraf.etc="${KARAF_ETC}" \
                -Dkaraf.restart.jvm.supported=true \
                -Djava.io.tmpdir="${KARAF_DATA}/tmp" \
                -Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties"
\
                ${KARAF_SYSTEM_OPTS} \
                ${KARAF_OPTS} \
                ${OPTS} \
                -classpath "${CLASSPATH}" \
                ${MAIN} "$@"
        else
            die "There is a Root instance already running with name ${ROOT_INSTANCE_NAME}
and pid ${ROOT_INSTANCE_PID}"
        fi
{code}


> Insure that $KARAF_DATA/log exists before starting Karaf instance
> -----------------------------------------------------------------
>
>                 Key: KARAF-4884
>                 URL: https://issues.apache.org/jira/browse/KARAF-4884
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.0.7
>            Reporter: Roland Hauser
>            Priority: Minor
>
> I'm would like to use the InspetIT Profiler for gathering perfomance data. It's agent
requires, that the directory, where "java.io.tmpdir" points to, does exist. It uses File.createTempFile
which fails when the temp directory does not exist. As a workaround, I added "mkdir -p ${KARAF_DATA}/tmp"
just before Karaf Main is called (script "karaf"):
>         if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ "${CHECK_ROOT_INSTANCE_RUNNING}"
= "false" ] ; then
>         	
>         	# Make sure that the tmp directory exists
>         	mkdir -p ${KARAF_DATA}/tmp
>         	
>             ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
>                 -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" \
>                 -Djava.ext.dirs="${JAVA_EXT_DIRS}" \
>                 -Dkaraf.instances="${KARAF_HOME}/instances" \
>                 -Dkaraf.home="${KARAF_HOME}" \
>                 -Dkaraf.base="${KARAF_BASE}" \
>                 -Dkaraf.data="${KARAF_DATA}" \
>                 -Dkaraf.etc="${KARAF_ETC}" \
>                 -Dkaraf.restart.jvm.supported=true \
>                 -Djava.io.tmpdir="${KARAF_DATA}/tmp" \
>                 -Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties"
\
>                 ${KARAF_SYSTEM_OPTS} \
>                 ${KARAF_OPTS} \
>                 ${OPTS} \
>                 -classpath "${CLASSPATH}" \
>                 ${MAIN} "$@"
>         else
>             die "There is a Root instance already running with name ${ROOT_INSTANCE_NAME}
and pid ${ROOT_INSTANCE_PID}"
>         fi



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message