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

API calls to a Symphony agent that is seldom used 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 one of two ways:

 

Disable /tmp folder deletion on the 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 your startup.sh for the agent server and append:

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

 

Note: This needs to be before '-jar.' Also note that 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