core icon indicating copy to clipboard operation
core copied to clipboard

Default ES cluster name seems to be appended to the value set by es.cluster.name property

Open vianneychacon opened this issue 9 years ago • 3 comments

A fatal error is encountered when trying to externalize ES and use a different cluster name than the default that ships with dotCMS.

Expected Behavior

If es.cluster.name is set, only that cluster name should be used by ES

Current Behavior

The default cluster name (dotCMSContentIndex_3x) is also used by ES, appended to the one setup by `es.cluster.name. `[25/05/17 12:15:49:638 EDT] INFO elasticsearch.discovery: [d90a5eb2-89d6-45f7-8340-bf5c47cb926f] dotCMSContentIndex_4x,dotCMSContentIndex_3x/-KNgma7dSVav8BgEtrAdXQ``

Known Workarounds

Use the default cluster name that ships with dotCMS: dotCMSContentIndex_3x

Steps to Reproduce (for bugs)

  1. Have a proper external ES service with a given cluster name (different from the default in dotCMS)
  2. Configure dotCMS as ES client and use the same cluster name defined on the above step. For example: \` AUTOWIRECLUSTERES=false AUTOWIRECLUSTERTRANSPORT=true AUTOWIREMANAGEES_REPLICAS=false

es.discovery.zen.ping.unicast.hosts=10.0.0.10:9300,10.0.0.11:9300 es.node.data=false es.node.master=false es.cluster.name=dotCMSContentIndex4x es.network.host=nonloopback:ipv4 es.http.port=9200 es.http.enable=true es.transport.tcp.port=9309 es.transport.tcp.connect_timeout=5s ```

Context

This was observed when configuring dotCMS with an external ES service.

Your Environment

  • dotCMS version used: 4.1.0 (exploded WAR)
  • Operating System and version: Linux
  • Application Server and version: Tomcat 8.5.15
  • Java Brand and version: openjdk version "1.8.0_121"

vianneychacon avatar May 26 '17 13:05 vianneychacon

If es.cluster.name is overwritten using the configuration plugin (using a different name than the default) via dotmarketing-config-ext.properties, the property can be found on two different configuration files:

-bash-4.2$ cat dotmarketing-config.properties | grep es.cluster.name
es.cluster.name=myIndex
-bash-4.2$ cat dotcms-config-cluster.properties | grep es.cluster.name
es.cluster.name=dotCMSContentIndex_3x

I've seen this happening when deploying plugins or building a war:

./bin/deploy-plugins.sh
./bin/buildwar.sh

vianneychacon avatar Jun 08 '17 12:06 vianneychacon

After some internal discussions during our standup meeting we want to know if this particular property "es.cluster.name" is defined in the dotmarketing-config.properties before executing the deploy task. It was mentioned that this issue has already happened to other clients because the dotmarketing-config.properties file had ES properties that needed to be moved to the cluster properties and the client either was not notified or missed to move/delete those entries. If this is the case, we would asume this is just a configuration issue (not ES related) and no action from dev would be required.

Also it would be helpful if the deploy-plugins.sh and buildwar.sh files could be shared as well as the dotmarketing-config.properties and dotcms-config-cluster*.properties so we can review it and double check the correct behavior.

danlaguna avatar Jun 08 '17 15:06 danlaguna

This was a problem in the configuration of ES properties. Properties should be located in dotcms-config-cluster.properties instead of dotmarketing-config.properties. Closing this one

dsilvam avatar Jun 08 '17 16:06 dsilvam