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 7.0+ uses Elasticsearch 7.5.0. 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.
.msi
Download the .msi package for Elasticsearch v7.5.0 from https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.0.msi
Next, follow these steps to install Elasticsearch 7.5.0.
1. Double-click the downloaded .msi package to launch a GUI wizard that will guide you through the installation process. You can view help on any step by clicking the ? button, which reveals an aside panel with additional information for each input:
?
2. Within the first screen, select the directory for the installation. In addition, select directories for where data, logs and configuration will be placed or use the default locations:
3. Then select to install as a service and Use Local System Account. Make sure to uncheck the "Start the service after installation" option as we will start the manually after installation.
When selecting a Windows account to run the service with, be sure that the chosen account has sufficient privileges to access the installation and other deployment directories chosen. Also ensure the account is able to run Windows services.
4. Common configuration settings are exposed within the Configuration section, allowing the cluster name, node name and roles to be set, in addition to memory and network settings:
5. Ensure the installation machine has access to the internet and that any corporate firewalls in place are configured to allow downloads from artifacts.elastic.co:
artifacts.elastic.co
6. Select the Basic License. Click Next.
7. After clicking the install button, the installation will begin:
…and will indicate when it has been successfully installed:
8. Set the JAVA_HOME environment variable: If you have already set the JAVA_HOME variable for previous versions of Elasticsearch, you need to change it. With Elasticsearch 7.5, OpenJDK comes built in so we can use it for JAVA_HOME. Open the Windows Control Panel. Make sure you can see all the Control Panel items. Then click System.
Click Advanced System Settings then click Environment Variables.
In System variables (NOT "User variables"), if you already have the JAVA_HOME variable set, then change it to the JDK location under Elasticsearch folder as shown below. If you do not have the variable set, then add it as follows:
Enter the JDK path to the JDK location under Elasticsearch folder.Note: Make sure that the JAVA_HOME variable is pointed to the installation path folder for JDK instead of the sub-folder where java.exe is installed. Click OK, then click Apply Changes.
This is how your system variables should now appear:
9. Configure Communifire to use Elasticsearch: 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. (Located in %ProgramData% folder, check the config folder where Elasticsearch is installed.)
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.5. 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.5.
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:\Programdata\Elasticsearch" folder, or by clicking the logs link in the MSI installer window. 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 D:\elasticsearch-5.2.1(c) Go to bin folder: D:\elasticsearch-5.2.1> cd bin(d) Run the following command: D:\elasticsearch-5.2.1\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:9206/_nodes/stats/jvm
9206 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.
You can install Elasticsearch manually by following these steps below:
1. Follow the instructions here: https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-install.html#run-elasticsearch-local
2. Config Changes: If you are running Elasticsearch on a separate server, make sure you configure your own custom values for the Elasticsearch IP and port by modifying "elasticsearch.yml" file under "config" folder, after consulting with your networking team. Uncomment and change the network host property in config > elasticsearch.yml if the website and Elasticsearch servers are on different machine. Make sure there is no extra space on the left side margin once you have removed the # from this config file. For example, a sample value of network host where Elasticsearch is installed on a server with IP 10.40.32.190:
network.host: 10.40.32.190
3. Install & Start Elasticsearch Windows Service: Open Windows command prompt, and navigate to the installed directory (using "cd" command). Type in the following to install Elasticsearch as a service by the name of "CFElasticSearchService".
D:\elasticsearch-7.5.0\bin>elasticsearch-service install CFElasticsearchService
4. Set Service to Auto-Start: Click the Windows Start button and click Run. Type services.msc. This will open the Services window. Find Elasticsearch 7.5.0 service as shown below:Right click it and set the Startup type of the service from Services to Automatic and Start the service.
5. Success: Your Elasticsearch service is installed and running!
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 10% 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/6096/elasticsearch-installation
Your session has expired. You are being logged out.