Introduced: #69
When BW_COMPONENT_JOB_FLOWLIMIT is set, it runs this piece of code:
if [[ ${BW_COMPONENT_JOB_FLOWLIMIT} ]]; then
if [ -e ${appnodeConfigFile} ]; then
IFS=';' # space is set as delimiter
read -ra processConfigurationList <<< "${BW_COMPONENT_JOB_FLOWLIMIT}" # str is read into an array as tokens separated by IFS
for process in "${processConfigurationList[@]}"; do # access each element of array
echo "Setting flow limit for $process"
IFS=':' # space is set as delimiter
read -ra processConfiguration <<< "$process" # str is read into an array as tokens separated by IFS
printf '%s\n' "bw.application.job.flowlimit.$bwBundleAppName.${processConfiguration[0]}=${processConfiguration[1]}" >> $appnodeConfigFile
print_Debug "set bw.application.job.flowlimit.$bwBundleAppName.${processConfiguration[0]} to ${processConfiguration[1]}"
done
fi
fi
The problem is that it changes the IFS for all futher processing. As result
$JAVA_HOME/bin/java $BW_OPTS -cp `echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.bwce.profile.resolver_*.jar`:`echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.security.tibcrypt_*.jar`:`echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.tpcl.com.fasterxml.jackson_*`/*:`echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.bw.tpcl.encryption.util_*`/lib/*:`echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.bw.tpcl.org.codehaus.jettison_*`/*:`echo $BWCE_HOME/tibco.home/bw*/*/system/shared/com.tibco.tpcl.logback_*`/*:$BWCE_HOME:$JAVA_HOME/lib -DBWCE_APP_NAME=$bwBundleAppName com.tibco.bwce.profile.resolver.Resolver 1>/dev/null 2>&1
ends up splitted incorrectly and failes with error(only if you remove 1>/dev/null 2>&1 from the end, otherwise startup fails with no error message):
Could not find or load main class --add-opens java.management.sun.management=ALL-UNNAMED --add-opens=java.base.jdk.internal.loader=ALL-UNNAMED --add-opens java.base.java.lang=ALL-UNNAMED --add-opens java.base.java.lang.reflect=ALL-UNNAMED --add-opens java.naming.com.sun.jndi.ldap=ALL-UNNAMED --add-exports java.base.sun.security.ssl=ALL-UNNAMED --add-exports java.base.com.sun.crypto.provider=ALL-UNNAMED --add-exports java.management.com.sun.jmx.mbeanserver=ALL-UNNAMED
To reproduce simply set BW_COMPONENT_JOB_FLOWLIMIT env to non empty string.
BTW, why did you make all stdout and stderr silent(1>/dev/null 2>&1)? It is just harder to debug if something goes wrong as in this case.
Introduced: #69
When BW_COMPONENT_JOB_FLOWLIMIT is set, it runs this piece of code:
The problem is that it changes the IFS for all futher processing. As result
ends up splitted incorrectly and failes with error(only if you remove
1>/dev/null 2>&1from the end, otherwise startup fails with no error message):To reproduce simply set BW_COMPONENT_JOB_FLOWLIMIT env to non empty string.
BTW, why did you make all stdout and stderr silent(
1>/dev/null 2>&1)? It is just harder to debug if something goes wrong as in this case.