Communifire uses Elasticsearch for its search engine. If you are installing Communifire on your own server, you will need to setup Elasticsearch separately, as it runs within a JAVA process. You can setup Elasticsearch on the same server where Communifire is installed, or you can have a separate search server (recommended for installs with over 500 users)
"Elasticsearch allows you to start small and scale horizontally as you grow. Simply add more nodes, and let the cluster automatically take advantage of the extra hardware. Petabytes of data? Thousands of nodes? No problem."
Communifire 8.0+ uses Elasticsearch 7.16.2. Elasticsearch includes a bundled version of OpenJDK from the JDK maintainers (GPLv2+CE), which is the recommended option. To use your own version of Java, see the JVM version requirements.
.zip
Download the .zip package for Elasticsearch v7.16.2 from https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.2-windows-x86_64.zip
NOTE Before beginning the installation for Elasticsearch v7.16.2, make sure you uninstall the currently installed Elasticsearch version. This can be done from Control Panel - Programs and Features.
Next, follow these steps to install Elasticsearch 7.16.2.
1. Extract the downloaded .zip package at C:\ElasticSearch location.
NOTE Run command prompt as an Administrator.
3. Open Command Prompt
set JAVA_HOME=C:\ElasticSearch\jdk
echo %JAVA_HOME%
# ======================== Elasticsearch Configuration ========================= # # NOTE: Elasticsearch comes with reasonable defaults for most settings. # Before you set out to tweak and tune the configuration, make sure you # understand what are you trying to accomplish and the consequences. # # The primary way of configuring a node is via this file. This template lists # the most important settings you may want to configure for a production cluster. # # Please consult the documentation for further information on configuration options: # https://www.elastic.co/guide/en/elasticsearch/reference/index.html # # ---------------------------------- Cluster ----------------------------------- # # Use a descriptive name for your cluster: # #cluster.name: my-application # # ------------------------------------ Node ------------------------------------ # # Use a descriptive name for the node: # #node.name: node-1 # # Add custom attributes to the node: # #node.attr.rack: r1 # # ----------------------------------- Paths ------------------------------------ # # Path to directory where to store the data (separate multiple locations by comma): # #path.data: /path/to/data # # Path to log files: # #path.logs: /path/to/logs # # ----------------------------------- Memory ----------------------------------- # # Lock the memory on startup: # #bootstrap.memory_lock: true # # Make sure that the heap size is set to about half the memory available # on the system and that the owner of the process is allowed to use this # limit. # # Elasticsearch performs poorly when the system is swapping the memory. # # ---------------------------------- Network ----------------------------------- # # By default Elasticsearch is only accessible on localhost. Set a different # address here to expose this node on the network: # #network.host: 192.168.0.1 # # By default Elasticsearch listens for HTTP traffic on the first free port it # finds starting at 9200. Set a specific HTTP port here: # #http.port: 9200 # # For more information, consult the network module documentation. # # --------------------------------- Discovery ---------------------------------- # # Pass an initial list of hosts to perform discovery when this node is started: # The default list of hosts is ["127.0.0.1", "[::1]"] # discovery.seed_hosts: ["127.0.0.1", "[::1]"] network.host: 0.0.0.0 discovery.type: single-node # Bootstrap the cluster using an initial set of master-eligible nodes: # #cluster.initial_master_nodes: ["node-1", "node-2"] # # For more information, consult the discovery and cluster formation module documentation. # # ---------------------------------- Various ----------------------------------- # # Require explicit names when deleting indices: # #action.destructive_requires_name: true # # ---------------------------------- Security ---------------------------------- # # *** WARNING *** # # Elasticsearch security features are not enabled by default. # These features are free, but require configuration changes to enable them. # This means that users don’t have to provide credentials and can get full access # to the cluster. Network connections are also not encrypted. # # To protect your data, we strongly encourage you to enable the Elasticsearch security features. # Refer to the following documentation for instructions. # # https://www.elastic.co/guide/en/elasticsearch/reference/7.16/configuring-stack-security.html
elasticsearch-service.bat install
elasticsearch-service.bat start
In Communifire, go to Control Panel > System > System Properties . Click the Search Settings category from the left side pane. Then set the following properties based on your own custom settings:
Note: Make sure that the ElasticsearchServer and port values in System Properties match the values in the elasticsearch.yml file.
The network settings can be edited in the elasticsearch.yml file under the Network section.
To make the service run on a server IP edit and uncomment network.host: 192.168.0.1 with your desired IP address, and save file.
10. Rebuild the Search Index: Go to Control Panel > System > Advanced System Utilities . Click Rebuild Search Index. If you face any errors, please refer to the FAQ below. After a few minutes, the index should be ready and you can test by searching a keyword in your Communifire site.
Below are some of the common questions as well as instructions on how to check the health of your Elasticsearch server.
How do I know which Java JDK version I have installed?
We recommend using the JDK which comes bundled with Elasticsearch 7.16.2. Open Windows Command Prompt and type "java -version", then press enter. It will show you the JAVA runtime version installed on your system.
I have JDK 10 installed. Can I install JDK 8 and run Elasticsearch using it?
We recommend using the JDK which comes bundled with Elasticsearch 7.16.2
Should I install Elasticsearch on the same server as Web server or a separate server?
We recommend installing Elasticsearch on a separate server if you have more than 500 users and your web server specs have a limited amount of RAM. Elasticsearch uses a lot of memory, so for faster performance it's best if it has its own server.
I am getting an error while installing Elasticsearch. How do I fix it?
First, check the logs. You can access the logs at "C:\ElasticSearch\logs" folder. Open elasticsearch.txt file. Submit a private case with the error log attached.
How do I uninstall an older version of Elasticsearch?
If you have installed Elasticsearch via the MSI installer, open Windows Program and Features and uninstall the version.
If you installed Elasticsearch manually, follow these steps:(a) Open Windows Command Prompt with Administrator privileges (using "Run as Administrator")(b) Go to your older Elasticsearch installation folder, for example: C:> cd C:\Program Files\Elastic\Elasticsearch\7.16.2(c) Go to bin folder: C:\7.16.2> cd bin(d) Run the following command: C:\7.16.2\bin> elasticsearch-service remove {old-service-name}You will get a message: The service {old-service-name} has been removed.
How do I setup Elasticsearch for a web farm configuration?
In cases where Communifire is hosted in a web farm environment, you can have any server as a search server where Elasticsearch will be installed, or you can have a separate server dedicated to search. Install Elasticsearch on this server following the instructions above. After this, you can test the Elasticsearch server connectivity from other servers to make sure that the search server is reachable from all nodes of the web farm.
I am getting this error when starting Elasticsearch service: "Error while trying to start the service: Commons Daemon procrun failed with exit value: 5 (Failed to start service). The data area passed to a system call is too small."
To fix this error follow these steps: (a) Make sure that your JDK is installed and the JAVA_HOME variable is set correctly. (b) If you have upgraded your JDK to a newer version, then change your JAVA_HOME variable to point to the latest version you upgraded to. (c) Make sure you start the service using an Administrator account. (d) Check the "plugins" folder to make sure that there are no plugins incompatible with the current version of Elasticsearch.
How do I increase the memory limit after ElasticSearch has already been installed?
If you have already installed ElasticSearch service or have manually installed ElasticSearch before then you can follow the below steps in order to increase the memory:
Go to following registry
HKEY_LOCAL_MACHINE > SOFTWARE > WOW6432Node > Apache Software Foundation > Procrun 2.0 > CFElasticSearchService{Version} > Parameters > Java
and modify the values of JvmMs and JvmMx properties. In the above screenshot 8192 is the decimal value in MB.
The value provided there is the max Heap Memory which you want to give to your ElasticSearch Service. After changing the value of JvmMs and JvmMx properties you need to restart the ElasticSearch service.
In order to confirm your setting has been applied, you need to open the following URL on your server where ElasticSearch is installed:
http://localhost:9200/_nodes/stats/jvm
9200 in the URL above is the port on which ElasticSearch service is running.
In the JSON response returned by the above URL you have to cross check "heap max in bytes" property value. It should be around the value which you have set in registry for the max heap size.
Elasticsearch needs a lot of RAM for its heap size, but due to JVM limitations, this heap size should not be more than 50% of the available memory and should also be less than 26 GB (max cap of JVM). We recommend giving 40-50% of RAM to Elasticsearch.
I am getting "all indices on this node will marked read-only" like:
2018-08-18T02:15:43,718][WARN ][o.e.c.r.a.DiskThresholdMonitor] [CF-Node-1] flood stage disk watermark [95%] exceeded on [NYcL-P5JT4ep0WSNB0ZT7g][CF-Node-1][d:\elasticsearch-6.0.0\data\nodes\0] free: 98.8gb[4.4%], all indices on this node will marked read-only
Make sure you have more than 20% free space in your hard disk.
is requesting access to a wiki that you have locked: https://my.axerosolutions.com/spaces/5/communifire-documentation/wiki/view/88508/elasticsearch-7-16-2-installation
Your session has expired. You are being logged out.