First installation
Configuration prerequisites
Any uses externalized configuration files:
- settings.json: main configuration of the application
- hazelcast.xml: cache cluster configuration
- logback.xml: logging configuration
- shiro.ini: permissions configuration
These files must be in a folder defined by the any.configurationPath Java parameter. Only settings.json and hazelcast.xml are mandatory. Logback.xml and shiro.ini are embedded in the webapp but can be externalized.
Tomcat configuration
Add in the setenv.sh file of $TOMCAT_HOME/bin:
export JAVA_OPTS="$JAVA_OPTS -Dany.configurationPath=/path/to/config"
Hazelcast configuration (Java 17+)
Hazelcast 5+ requires additional parameters:
export JAVA_OPTS="$JAVA_OPTS \
--add-modules java.se \
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.nio=ALL-UNNAMED \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.management/sun.management=ALL-UNNAMED \
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED"
Installing the web application
- Deploy: copy
any.warinto$TOMCAT_HOME/webapps/ - Configure: edit
settings.jsonfollowing the sections below - Restart: restart Tomcat to deploy the application
Note on the access to Any:
- Development/On-premise:
<any url>=http://localhost:8080/any - AWS production:
<any url>=https://<your-domain>/(served at the root)
Generating encrypted passwords
When you configure the authentication for ElasticSearch, ActiveMQ or MongoDB, the passwords must be encrypted with the $decrypt(...) format.
To generate an encrypted password:
java -jar $TOMCAT_HOME/webapps/any/WEB-INF/lib/provider-X.XX.X_XX.jar \
eu.c6.auth.GetEncryptedPassword -password "your_password"
Replace your_password with your plain-text password. The command returns an encrypted string you use in the configuration.
settings.json configuration
Elasticsearch server
Configure the connection to ElasticSearch:
{
"elastic-search-data": {
"server": {
"clusterid": "Demo",
"version": 9.2,
"rest_url": "http://localhost:9200",
"user": "",
"password": "",
"sniffingNodes": true
}
}
}
Configuration:
- version: version of ElasticSearch used (e.g. 8.14, 9.2)
- rest_url: URL of the ElasticSearch server
- sniffingNodes: automatic detection of the cluster nodes
Authentication
If your ElasticSearch server requires credentials to reach it, fill in the user and password fields. The password must be encrypted: Generating encrypted passwords
{
"elastic-search-data": {
"server": {
"rest_url": "http://elasticsearch.example.com:9200",
"user": "elastic_user",
"password": "$decrypt(AQDxHzN7m2kJ+...)"
}
}
}
MongoDB database (Master Database)
MongoDB stores a master copy of all the data for disaster recovery and rebuilding ElasticSearch:
{
"mongodb-data": {
"server": {
"uri": "mongodb://localhost:27017",
"database": "any_master"
}
}
}
Configuration:
- uri: MongoDB connection string
- database: name of the database (created automatically if absent)
Authentication
If MongoDB asks for authentication, include the credentials in the connection URI. The password must be encrypted: Generating encrypted passwords
{
"mongodb-data": {
"server": {
"uri": "mongodb://user:$decrypt(AQDxHzN7m2kJ+...)@mongodb.example.com:27017/?gssapiServiceName=mongodb",
"database": "any_master"
}
}
}
Messaging Server (ActiveMQ)
Configure the connection to the message broker:
{
"mdb-messaging": {
"as_stream": false,
"is_default_provider": false,
"jms_server_address": "tcp://localhost:61616",
"persistent": true,
"user": "",
"password": ""
}
}
Configuration:
- jms_server_address: replace
localhostwith the host name of ActiveMQ
The queues consumed by the messaging and the number of consumers are declared in the queues field. See Queues.
Authentication
If ActiveMQ asks for authentication, add the credentials. The password must be encrypted: Generating encrypted passwords
{
"mdb-messaging": {
"jms_server_address": "tcp://activemq.example.com:61616",
"user": "admin",
"password": "$decrypt(AQDxHzN7m2kJ+...)"
}
}
File storage
Define the storage directories:
{
"fslocal-content": {
"local_path": "C:/any/data/content"
},
"fslocal-resource": {
"local_path": "C:/any/data/resources"
}
}
Notes:
- The paths must be readable/writable
- In production, make sure you have enough disk space
- The files must be reachable from every Tomcat server
Installing the Messaging Server
The Messaging Server is a standalone web application (messagingServer.war) responsible for the asynchronous processing and the inter-server communication. It consumes the queues the heavy processing is dropped on.
Deployment:
- Copy
messagingServer.warinto$TOMCAT_HOME/webapps/ - Use the same
settings.jsonas for the main application - Restart Tomcat
Production recommendations:
- Deploy on a dedicated Tomcat instance
- Allocate at least 4 GB of RAM
- Make sure the storage directory (
local_path) is the same as on the web server or reachable through NFS
Installing the conversion server (optional)
The conversion server (conversionServer.war) generates PDFs and thumbnails from the contents.
Deployment:
- Copy
conversionServer.warinto$TOMCAT_HOME/webapps/ - No configuration required (use the default configuration), the optional Java parameters are described below
- Restart Tomcat
Production recommendations:
- Deploy on a dedicated Tomcat instance
- This server consumes a lot of CPU/memory resources for the conversion
PDF rendition of AutoCAD files
Generating the PDF formats of AutoCAD files by the format conversion server requires additional access to the JPEG decoder of the JVM:
export CATALINA_OPTS="$CATALINA_OPTS --add-opens java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED"
Word comments and tracked changes
Converting a Word document to PDF removes the comments and accepts all the revisions. The keepComments Java parameter keeps the comments and the revision marks in the produced PDF:
export CATALINA_OPTS="$CATALINA_OPTS -DkeepComments=true"
Installing the thumbnail server (optional)
The thumbnail server (thumbnailServer.war) stores and serves the thumbnails generated by the conversion server.
Deployment:
- Copy
thumbnailServer.warinto$TOMCAT_HOME/webapps/ - Use a
settings.jsonwith at least thelocal_pathpath configured - Restart Tomcat
Production recommendations:
- Deploy on the same instance as the Any web application
- The server requires at least 2 GB of RAM
Hazelcast cache configuration
Hazelcast handles the distribution of the cache and the sessions between several Tomcat instances, allowing true high availability with load balancing.
Network settings
Default port: 5701 (auto-incremented for each instance: 5702, 5703...)
Make sure this range is open in your firewalls for the inter-node communication.
hazelcast.xml configuration
Edit the hazelcast.xml file in your any.configurationPath directory:
<?xml version="1.0" encoding="UTF-8"?>
<!-- More informations:
https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/resources/hazelcast-default.xml
-->
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.12.xsd">
<instance-name>${CONTEXT_NAME}</instance-name>
<group>
<!-- If you have several Any environments, change this name for each -->
<name>any_environment_01</name>
</group>
<network>
<port auto-increment="true" port-count="100">5701</port>
<join>
<!-- Multicast for automatic discovery on the same network -->
<multicast enabled="true"/>
<!-- TCP-IP for static configuration (uncomment if multicast is impossible) -->
<tcp-ip enabled="false">
<interface>127.0.0.1</interface>
<member-list>
<member>127.0.0.1</member>
<!-- Add the IP addresses of the other nodes here -->
</member-list>
</tcp-ip>
</join>
</network>
</hazelcast>
Important points:
- The group name
<name>must be unique for each Any environment - The same file must be used in every configuration directory (
any,messagingServer,thumbnailServer,conversionServer) - By default, Hazelcast uses multicast discovery. For the environments where multicast is not available, enable TCP-IP
Installing and activating the configuration objects
Once Any is started with the correct parameters, an installation page is displayed at the first access.
Steps:
- Open your browser and go to
<any url>/install - The page validates:
- The configuration (settings.json, hazelcast.xml files)
- The access to the servers (MongoDB, ElasticSearch, ActiveMQ)
- The access to the activation server (https://activation.c6cloud.com)
- Click Install to initialize the configuration objects
License activation
Any requires a valid license to work. You received a Customer ID with your binary files.
With access to the activation server
Recommended: both the web application and the Messaging Server must have access to https://activation.c6cloud.com
- On the installation page, enter your Customer ID
- Click Activate the license
- The license is activated automatically and renewed periodically
Without access to the activation server
If your servers have no access to the Internet:
- On the installation page, click Generate the activation code
- Send the generated data to your account manager
- Receive a license key in return
- Sign in as super-administrator and go to
<any url>/admin/license - Paste the license key in the Product Key area
- Click Update the license
The license must be renewed manually before expiration.
Check and troubleshooting
Final checklist:
- ✓ Every WAR file is deployed in
$TOMCAT_HOME/webapps/ - ✓ The
any.configurationPathdirectory holds settings.json and hazelcast.xml - ✓ The
JAVA_OPTSenvironment variables are configured correctly - ✓ MongoDB, ElasticSearch and ActiveMQ are reachable
- ✓ The license is activated
- ✓ Tomcat starts without errors in the logs
Check the log files in $TOMCAT_HOME/logs/ to diagnose any startup problem.