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: https://blog.giuseppeurso.net/cmdbuild-3-1-1-on-centos-7/, you will find 3 interesting lines:

bash ${install_folder}/tomcat/webapps/cmdbuild/cmdbuild.sh 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/cmdbuild.sh restws -username admin -password admin -url http://localhost:8080/  setconfig org.cmdbuild.cluster.enabled true

And

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

Instead of IP addresses you can use fqdns.

This should be all.

Let me know how it goes.

Cmdbuild 3.1 installation on RedHat or CentOs 7

EDIT: please check the up to date post on Cmdbuild 3.1.1 on Centos 7

I believe that some people might find this small script useful.

Anyway, watch out the variables, also keep in mind that not everything as been set as variable. There are no checks on existing things (except on postgres listening) and it will execute commands anyway, it should be idempotent though..

Continue reading “Cmdbuild 3.1 installation on RedHat or CentOs 7”

CMDBUILD 3 REST API EXAMPLE AUTHENTICATION

Geez, how hard is it to slap an example in the documentation, Tecnoteca?

here, guys i know you’ve been looking hard for this and here you go:

curl -X POST '//10.0.0.26:8080/services/rest/v3/sessions/?scope=service' --header 'Content-Type: application/json' --data-binary '{"username": "admin", "password": "admin"}' | jq '.'
Continue reading “CMDBUILD 3 REST API EXAMPLE AUTHENTICATION”

Postgresql scl enablepfffff. Persist already!

It might happen (usually to people who are sane in their mind) that you use the software collection just to get a newer version of Mariadb or Postgres or whatever is in there. So just to be clear: this is not the situation where you want to run two different version of the same package on the same system. That is booboo and if you found that in your workplace it means that the people preceding you didn’t exactly give a dam about having a safe environment and a pleasant workplace.

Continue reading “Postgresql scl enablepfffff. Persist already!”

Zimbra multi server – servers and services show as down in admin interface.

Solution for servers and services shown as down in zimbra admin console:

But they are actually up and running.

In a m ultiserver setup servers and services show as down in admin interface.

Continue reading “Zimbra multi server – servers and services show as down in admin interface.”

postgresql FATAL: database system identifier differs between the primary and standby

This is due to two possible reasons:

  1. you did not do the initial filesystem sync (usually rsync)
  2. the recovery.conf contains errors

this page actually helped me

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps

Hope this helps

ISP: ERROR Shibboleth.SSO.SAML2 [xx]: failed to decrypt assertion: XMLSecurity exception while decrypting: OpenSSL:SymmetricKey::decryptFinish – Out of range padding value in final block

The Sp (service provider) replaced the SSL certificate and the metadata used from the Idp are not up-to-date with the public key of the ISP.

This instead is the error message on MS ADFS:
Continue reading “ISP: ERROR Shibboleth.SSO.SAML2 [xx]: failed to decrypt assertion: XMLSecurity exception while decrypting: OpenSSL:SymmetricKey::decryptFinish – Out of range padding value in final block”

Docker cheat-sheet

Docker is great for development, but also, it gives you the superpower of extremely small images to easily move around docker containers.

I need this for personal stuff, but I think it can be useful to others, so let’s share it.
Continue reading “Docker cheat-sheet”