Adding JVM_OPTS to edge-ui on private cloud

Hello,

I'd like to change the "-Djava.io.tmpdir" for the edge-ui component because some maintenance tasks clean regurlarly the default /tmp and delete the temporary directory of PlayFramework. Then the bundle upload feature becomes broken.

I run Apigee for private Cloud 4.18.05.

I found some inspiration in this documentation : https://docs.apigee.com/private-cloud/v4.18.05/setting-port-number-edge-ui

Unfortunately, it doesn't work at all (even with the IP and PORT change given in the example). The file ui.sh is never read at restart. Thus it's impossible to tune JVM_OPTS.

0 2 262
2 REPLIES 2

Hi Nicolas,

Sorry for your experience and thank you for flagging non-working documentation.

I usually do edit SSL.sh file to change the -D setting, ie, switch on jvm debugging.

/opt/apigee/etc/edge-ui.d/SSL.sh

This contents

export UI_OPTIONS="-Djava.io.tmpdir=/tmp"

Should produce desirable effect:

ps -eaf|grep tmpdir
...
apigee   19703     1  3 13:28 ?        00:00:08 /usr/lib/jvm/jre/bin/java -Xmx512m -Xms256m -Djavax.xml.stream.XMLInputFactory=utils.SafeXMLInputFactory -Duser.dir=/opt/apigee/edge-ui-4.19.01-0.0.20115 -Dconfig.file=/opt/apigee/edge-ui-4.19.01-0.0.20115/conf/apigee.conf -Dpidfile.path=/dev/null -Dlogger.resource=prod-logback.xml -Djava.io.tmpdir=/tmp -cp /opt/apigee/edge-ui-4.19.01-0.0....

There is a catch because this file is modified by

configure-ssl disable-ssl

edge-ui actions, so you need to double-check this file after you run those actions. But it should work for you until we sort this out properly.

Hi Yuriy,

Thank you for your answer. Tried successfully.

I've found another way in creating the file

/opt/apigee/edge-ui/conf/application.ini

with this content ( and only this line, without export or var name) :

-Djava.io.tmpdir=/var/tmp/

It works but it's really ugly and I don't know if it would survive to any Apigee upgrade.

And just like your answer, it can only be a temporary workaround. The best solution would be to put something in a subdirectory of /opt/apigee/customer

Let me know when a fix is generally available.