Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot upload attachments with special characters - "Malformed characters" error

Даулет Даримбек
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2025

My setenv.sh cfg is =

JIRA_HOME="/var/atlassian/application-data/jira-software"

#
# Occasionally Atlassian Support may recommend that you set some specific JVM arguments. You can use this variable below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dorg.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING=true"

#
# You can use variable below to modify garbage collector settings.
# For Java 8 we recommend default settings
# For Java 11 and relatively small heaps we recommend: -XX:+UseParallelGC
# For Java 11 and larger heaps we recommend: -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent
#
JVM_GC_ARGS="-XX:+ExplicitGCInvokesConcurrent"

#
# The following 2 settings control the minimum and maximum given to the JIRA Java virtual machine. In larger JIRA instances, the maximum amount will need to be increased.
#
JVM_MINIMUM_MEMORY="768m"
JVM_MAXIMUM_MEMORY="8192m"

#
# The following setting configures the size of JVM code cache. A high value of reserved size allows Jira to work with more installed apps.
#
JVM_CODE_CACHE_ARGS='-XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m'

#
# The following are the required arguments for Jira.
#
JVM_REQUIRED_ARGS='-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -Dorg.apache.catalina.connector.RECYCLE_FACADES=false -Djavax.servlet.request.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8'

# Uncomment this setting if you want to import data without notifications
#
#DISABLE_NOTIFICATIONS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true"


#-----------------------------------------------------------------------------------
#
# In general don't make changes below here

#-----------------------------------------------------------------------------------
# Prevents the JVM from suppressing stack traces if a given type of exception
# occurs frequently, which could make it harder for support to diagnose a problem.
#-----------------------------------------------------------------------------------
JVM_EXTRA_ARGS="-XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT"

CURRENT_NOFILES_LIMIT=$( ulimit -Hn )
ulimit -Sn $CURRENT_NOFILES_LIMIT
ulimit -n $(( CURRENT_NOFILES_LIMIT > MIN_NOFILES_LIMIT ? CURRENT_NOFILES_LIMIT : MIN_NOFILES_LIMIT ))

PRGDIR=`dirname "$0"`
cat "${PRGDIR}"/jirabanner.txt

JIRA_HOME_MINUSD=""
if [ "$JIRA_HOME" != "" ]; then
echo $JIRA_HOME | grep -q " "
if [ $? -eq 0 ]; then
echo ""
echo "--------------------------------------------------------------------------------------------------------------------"
echo " WARNING : You cannot have a JIRA_HOME environment variable set with spaces in it. This variable is being ignored"
echo "--------------------------------------------------------------------------------------------------------------------"
else
JIRA_HOME_MINUSD=-Djira.home=$JIRA_HOME
fi
fi

# DO NOT remove the following line
JAVA_HOME="/opt/atlassian/jira-software/jre/"; export JAVA_HOME

# Taking into account Order of JAVA_OPTS and CATALINA_OPTS in startup:
#
# We can set JVM Xms 2 times:
# - generic, for Tomcat only through JAVA_OPTS for stop-jira.sh script purposes that doesn't use CATALINA_OPTS
# - specific for Jira, one more time through CATALINA_OPTS for Jira JVM memory that overrides JAVA_OPTS
#
# This is to prevent jira stop process from consuming all of the xms memory intended for Jira to use at runtime which
# has led to OutOfMemoryError during Jira shutdown in some cases.
#
# The default jvm values for Xms and Xmx should allow Jira to stop in virtually all cases. If you continue to experience
# OutOfMemoryError during Jira shutdown, you can change the Xms and Xmx values by uncommenting the next line

# TOMCAT_JVM_OPTS="-Xms512m -Xmx512m"

JAVA_OPTS="${JAVA_OPTS} ${TOMCAT_JVM_OPTS} ${JVM_CODE_CACHE_ARGS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_EXTRA_ARGS} ${JIRA_HOME_MINUSD} ${START_JIRA_JAVA_OPTS}"

export JAVA_OPTS

CATALINA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} -Duser.timezone=Asia/Tashkent -Dfile.encoding=UTF-8 ${CATALINA_OPTS}"


export CATALINA_OPTS

echo ""
echo "If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-103/Troubleshooting+installation"
echo ""
if [ "$JIRA_HOME_MINUSD" != "" ]; then
echo "Using JIRA_HOME: $JIRA_HOME"
fi

# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
if [ -n "$CATALINA_BASE" ] ; then
CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
elif [ -n "$CATALINA_HOME" ] ; then
CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
fi
fi
export CATALINA_PID

if [ -z "$CATALINA_BASE" ]; then
if [ -z "$CATALINA_HOME" ]; then
LOGBASE=$PRGDIR
LOGTAIL=..
else
LOGBASE=$CATALINA_HOME
LOGTAIL=.
fi
else
LOGBASE=$CATALINA_BASE
LOGTAIL=.
fi

PUSHED_DIR=`pwd`
cd $LOGBASE
cd $LOGTAIL
LOGBASEABS=`pwd`
cd $PUSHED_DIR

echo ""
echo "Server startup logs are located in $LOGBASEABS/logs/catalina.out"

1 answer

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events