PureEngage On-Premises

 View Only

Sign Up

  • 1.  Web Services and Applications with Standalone ElasticSearch

    Posted 01-24-2019 11:30

    Greetings,

    I'm trying to get ElasticSearch and Web Services and Applications (formerly known as HTCC) to work together. Per the documentation found here:

    https://docs.genesys.com/Documentation/HTCC/latest/Dep/Elasticsearch

    There are two options: Embedded and Standalone.

    The documentation states that Embedded is not recommended, so I'm going the Standalone route. I have ElasticSearch 1.7.6 installed, configured, and running.

    However, when I try to start the GWS process, it ALSO tries to start its own ElasticSearch instance, which causes GWS to fail to start because ports 9200 and 9300 are already in use by my standalone ElasticSearch.

    Upon closer inspection of the documentation under the "standalone" and "embedded" sections, the configuration steps are IDENTICAL. This appears to be a flaw in documentation. Shouldn't the configurations be different?

    Here is my /etc/elasticsearch/elasticsearch.yml file:

    index.analysis.analyzer.whitespace_lowercase.tokenizer: whitespace
    index.analysis.analyzer.whitespace_lowercase.filter: lowercase
    
    
    transport.tcp.port: 9300
    http.port: 9200
    
    discovery.zen.ping.multicast.enabled: false
    discovery.zen.ping.unicast.hosts: 10.120.12.55
    discovery.zen.minimum_master_nodes: 1
    
    gateway.recover_after_nodes: 1
    gateway.recover_after_time: 1m
    gateway.expected_nodes: 1
    
    
    threadpool.index.queue_size: -1
    threadpool.bulk.queue_size: -1
    
    path.conf: /etc/elasticsearch/config/
    path.data: /opt/genesys/elasticsearch/data/
    path.logs: /var/log/elasticsearch/
    
    cluster.name: GWS_CLUSTER
    
    node.name: GWS_NODE


    Here are the changes I made to: $INSTALLPATH/genesys/gws/config/application.yaml

    serverSettings:
      enableElasticSearchIndexing: true
      crClusterName: "GWS_CLUSTER"
    
      elasticSearchSettings:
        clientNode: false
        transportClient:
          nodes:
            - {host: 127.0.0.1, port: 9300}
    


    If someone out there in this great community can point me in the right direction on how to tell GWS to use my standalone version of ElasticSearch (and NOT start the embedded version), that would be great!

    Thanks.


    #SystemAdministration

    ------------------------------
    J.T. Evans
    Forty 7 Ronin Inc
    ------------------------------


  • 2.  RE: Web Services and Applications with Standalone ElasticSearch

    Posted 01-24-2019 11:51
    J.T.,

    Remove the elasticsearch.yml file from your <gws installation>/config directory.  The documentation for embedded is certainly similar, but the difference that I can see is in this step:

    Embedded:
    1. Copy installation_path/config-templates/elasticsearch.yml.sample to the installation_path/config/
    elasticsearch.yml file, and then edit the file to set correct option values.

    Standalone:
    1. Copy the installation_path/config-templates/elasticsearch.yml.sample file to the configuration folder on each node
    in your Elasticsearch cluster, rename the file to elasticsearch.yml, and then edit the file to set correct option values.


    1.2 Configuring Web Services to use an embedded Elasticsearch cluster
    You can configure Web Services to work with an embedded Elasticsearch cluster by completing the steps below.
    Important
    Genesys does not recommend using an embedded Elasticsearch cluster in a
    production environment. Contact your Genesys representative for information
    about how to migrate from embedded to standalone.
    Complete the following steps for each Web Services node that you want to host Elasticsearch:
    Start
    1. Copy installation_path/config-templates/elasticsearch.yml.sample to the installation_path/config/
    elasticsearch.yml file, and then edit the file to set correct option values.

    Versus

    1.1 Configuring Web Services to use a standalone Elasticsearch cluster
    You can configure Web Services to work with a standalone Elasticsearch cluster by completing the steps below.
    Important
    Genesys recommends that you use a standalone Elasticsearch cluster for new
    deployments of Web Services. Contact your Genesys representative for
    information about how to migrate from embedded to standalone.
    Prerequisites
    • You have deployed and configured a cluster of Elasticsearch nodes. Refer to the Elasticsearch documentation for
    details. Note: Genesys recommends that you use the latest stable 1.x version of Elasticsearch.
    Start
    Complete the following steps for each Web Services node:
    1. Copy the installation_path/config-templates/elasticsearch.yml.sample file to the configuration folder on each node
    in your Elasticsearch cluster, rename the file to elasticsearch.yml, and then edit the file to set correct option values.


    ------------------------------
    Ivan Ullmann
    Eventus Solutions Group
    ------------------------------



  • 3.  RE: Web Services and Applications with Standalone ElasticSearch

    Posted 01-24-2019 12:00
    I tried removing the elasticsearch.yml file from the GWS config directory. It didn't make a difference or change behavior. It still tried to start the embedded instance of elasticsearch. It's like there is a "default config" built in that it uses if the elasticsearch.yml file is missing.

    Any other tips?

    ------------------------------
    J.T. Evans
    Forty 7 Ronin Inc
    ------------------------------



  • 4.  RE: Web Services and Applications with Standalone ElasticSearch

    Posted 01-24-2019 12:12
    J.T.,

    Did you try clearing and rebuilding your cassandra DB?

    -Ivan

    ------------------------------
    Ivan Ullmann
    Eventus Solutions Group
    ------------------------------



  • 5.  RE: Web Services and Applications with Standalone ElasticSearch

    Posted 01-24-2019 12:25
    By adding:

      elasticSearchSettings:
        clientNode: true
        indexPerContactCenter: false
        enableScheduledIndexVerification: true
        indexVerificationInterval: 60
        retriesOnConflict: 2
        useTransportClient: true
        transportClient:
          nodes:
            - {host: 127.0.0.1, port: 9300}
          useSniff: true
          ignoreClusterName: true
          pingTimeout: 10000
          nodesSamplerInterval: 10000​
    to my application.yml file for GWS, I now have the right data in my standalone ElasticSearch instance and GWS is no longer starting its own ElasticSearch instance. Progress!

    I have not tried clearing out my Cassandra database. Any tips on how to do that?

    ------------------------------
    J.T. Evans
    Forty 7 Ronin Inc
    ------------------------------



  • 6.  RE: Web Services and Applications with Standalone ElasticSearch

    Posted 01-25-2019 07:07
    I do not think so it is necessary to recreate the database, I recommend to reindex ES - you can find information how to do that on official ES web pages or documentation

    ------------------------------
    Jakub Němec
    Dimension Data Czech Republic s.r.o.
    ------------------------------