Elastic Search is not working

Hello guys. So, I’m having an issue with ElasticSearch in SuiteCRM v8.4.2. I configured ElasticSearch, but it didn’t work as expected. When the configuration was done, there was no indexing, and I couldn’t find anything in the error log. Below are the pictures of the current setup.




Notice it says “The following ElasticSearch schedulers were detected:
PRDElasticsearch - Active - This job has never run.
Elasticsearch uses schedulers to keep the database and indexing system synchronized.”

  1. Go to Admin >> Scheduler >> Process Workflow Tasks
    Look for the “LAST SUCCESSFUL RUN”.
    If your cron task is setup and running properly, it should show it last ran 1 minute ago.
    Note it’s in UTC time (London UK time).
    This will tell you, whether you have your cron job setup and running.

More here:

  1. If your cron is setup and running, then what about click on:
    Admin >> Elasticsearch >> Index >> Schedule an Indexing >> Schedule Full Indexing. This task starts running within a minute, provided that the cron job has been configured correctly and running every minute, as normal.

  2. Check search_index.log exists and have a look at its contents, if any, for Elasticsearch related errors.

  3. Try running the search or the indexing from the command-line using the command line tools. This has very verbose output. Examples:
    Do Full indexing: vendor/bin/robo elastic:index 0
    Do Partial indexing: vendor/bin/robo elastic:index 1
    Search for keyword “rohan”: vendor/bin/robo elastic:search "rohan"

  4. Enable developer mode. Go to Admin >> System Settings >> Developer Mode (check box). This will provide a clear exception page in the browser, when the error happens due to a search in the browser.

Elastic Search and SuiteCRM integration is very peculiar about the version of Elastic Search
Have a look at the documentation

It says for suitecrm version 7.12 onwards you need elastic search version 7. In your screenshot you are using elastic search version 8.11.3

Enable Developer Mode should display a detailed error page onscreen, when a calls to ES fail because version incompatible.
Admin >> System settings (Advanced) >> Developer Mode (check on) >> Save.

@abuzarfaris @lukeonorato
When you add ElasticSearch 8.11.3 to 7.14.1, patch Suite with 10280 or 10275, activate cron correctly, add the ElasticSearch scheduler job, AND set the proper site_url in your config.php (if not, when you click/tap on individual search results pages, they will fail to display!), you get this, it works:

$ curl -X GET "elasticsearch:9200/"
{
  "name" : "7403ac82de8f",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "5tV8saNsRY-b6hdrSlSHkA",
  "version" : {
    "number" : "8.11.3",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "64cf052f3b56b1fd4449f5454cb88aca7e739d9a",
    "build_date" : "2023-12-08T11:33:53.634979452Z",
    "build_snapshot" : false,
    "lucene_version" : "9.8.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

Indexing results in search_index.log

[2024-01-02 02:03:01] ElasticSearchIndexer.INFO: Indexing complete [] []
[2024-01-02 02:03:01] ElasticSearchIndexer.DEBUG: Scheduler has finished [] []

So it looks like ElasticSearch 8 should also work on 8.4.2 and 8.5.

1 Like