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] [Created] (KARAF-4884) Insure that $KARAF_DATA/log exists before starting Karaf instance
Date Thu, 08 Dec 2016 11:32:58 GMT
Roland Hauser created KARAF-4884:

             Summary: 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" \
                ${KARAF_SYSTEM_OPTS} \
                ${KARAF_OPTS} \
                ${OPTS} \
                -classpath "${CLASSPATH}" \
                ${MAIN} "$@"
            die "There is a Root instance already running with name ${ROOT_INSTANCE_NAME}

This message was sent by Atlassian JIRA

View raw message