The Installer does not handle line-continuation in setenv.sh properly

Just a minor problem I found when upgrading Jira Data Center (in my case, from 8.16.0 to 8.20.12).

The installer will process [Jira Install Dir]/bin/setenv.sh, but if you have line-continuation in the file, e.g.:

JVM_SUPPORT_RECOMMENDED_ARGS=" \
-Dsomething=something \
-Danotherthing=something \
"

After upgrade it will become:

JVM_SUPPORT_RECOMMENDED_ARGS=" \"

And setenv.sh will fail, not setting the environment variables. And you will likely end up with errors complaining that -Xmx and -Xms are not set large enough.

The solution is to combine those lines back into one for the upgrade, or put your settings back after the upgrade.

1 Like