360 WebPlatform database configuration is not set when restarting Tomcat server
Symptoms
- On application startup, a warning popup appears
- In the Administration console, the database configuration is empty even though is was setup previously
Environment
- 360Suite Web Platform
- Linux server (all)
Additional symptoms : tomcat logs
In tomcat startup logs you can see this warning :
- 24-Aug-2020 11:50:47.195 WARNING [Catalina-utility-1]
java.util.prefs.FileSystemPreferences$2.run Could not create system
preferences directory. System preferences are unusable.
Moreover, digging into 360Suite specific log you can see this template :
- ==========================================================================
- Starting 360Suite v{your version}
- ==========================================================================
- {systemRoot}.systemPrefs
- ==========================================================================
Cause
Startup process
On linux systems, 360Web Platform configuration properties such as database URL are stored into java systemRoot preferences directory.
To ease the administration of the preferences you can customize the folder where preferences are stored by setting java system variables :
- java.util.prefs.systemRoot
- java.util.prefs.userRoot
Those variables are defined in the Tomcat setenv.sh as java options, for example :
JAVA_OPTS="$JAVA_OPTS -Djava.util.prefs.systemRoot=$HOME/.java -Djava.util.prefs.userRoot=$HOME/.java/.userPrefs"
File system hierarchy
Before starting up 360Suite Web Platform performs an existence check on the preference directory.
For the system to properly run, the following command must return a result :
- ls -la /your/systemRoot/path | grep systemPrefs
If this command fails and outputs nothing this means your preference directory is not ready for 360Web Platform.
Resolution
Stop your Tomcat server.
Create the directory thanks to this command :
- mkdir --mode 755 -p /your/systemRoot/path/.systemPrefs
Then, ensure the directory belongs to the user who will run Tomcat.
- chown my-tomcat-user:tomcat-user-group /your/systemRoot/path/.systemPrefs
Start your Tomcat server
Keywords
Linux, Tomcat, three60suite, 360suite, WP
Product
- 360Suite Web Platform
Languages
- English US
- English UK
- French
Last updated over 4 years ago