CMDBUILD 3.1 or 3.1.1 Enable clustering

After installation many folks feel the urge to make their setup more reliable and resilient by clustering the crap out of it, and so with cmdbuild.

The Clustering features need to be enabled once the nodes are installed and deployed.

So essentially you install postgres (as a single instance or as a cluster), after that you install tomcat and cmdbuild on all nodes.
At the end of the install script that you can check out at this url:, you will find 3 interesting lines:

bash ${install_folder}/tomcat/webapps/cmdbuild/ dbconfig create empty -configfile ${install_folder}/tomcat/conf/cmdbuild/database.conf

With this first api call (sort of), cmdbuild will access the db server, create the database and all the tables and data needed for cmdbuild to functioning.

For this reason when deploying the remaining cmdbuild nodes, this last operation won’t be necessary, because the database is already there.

I felt like sharing this with you although it is not directly related with the cluistering thing, but IMHO it helps understanding the big picture.

In order to enable the clustering features (aka sessions in the database), you will have to run two commands: of which the first one will enable the cluestering itself, and the second will instruct cmdbuild about the nodes of the cluster.

# Enable cluster
/opt/tomcat/webapps/cmdbuild/ restws -username admin -password admin -url http://localhost:8080/  setconfig org.cmdbuild.cluster.enabled true


# Add cluster nodes
/opt/tomcat/webapps/cmdbuild/ restws -username admin -password admin -url http://localhost:8080/  setconfig org.cmdbuild.cluster.nodes,,

Instead of IP addresses you can use fqdns.

This should be all.

Let me know how it goes.

(Visited 4 times, 1 visits today)