The temporary upload location [/tmp/tomcat.folder] is not valid error message

API calls to a Symphony agent that is not used very often may return a response such as the temporary upload location [/tmp/tomcat.folder] is not valid. This is caused by the underlying operating system (OS) deleting temporary folders based on inactivity.

This can be resolved in two ways:

Disable /tmp folder deletion at OS level

Please consult the documentation for your OS, for example in CentOS, the schedule, as well as the whitelist is defined at:

/usr/lib/tmpfiles.d/tmp.conf

To exclude the tomcat folder, you can add the following line to the file:

x /tmp/tomcat.*

Move the location of /tmp directory

If you are unable to modify the OS to whitelist the tomcat folder, you can move the location of the folder instead. To do this, modify the startup.sh for the agent server and append:

-Djava.io.tmpdir=/path/to/new/tmp

This needs to be before -jar.

Note: Since the OS does not maintain this folder, the folders created here by tomcat will persist unless manually deleted. This folder is safe to delete before the Agent is started as a new folder is created on Agent startup.