ES 2.2 Elasticsearch Version: 8.0.0

I've just upgraded to ES version 8.11.4. It says I need to optimize and so when I do, i get an error:
Code:
XFES\Elasticsearch\RequestException: Failed to parse mapping: analyzer [suggest] has not been configured in mappings in src/addons/XFES/Elasticsearch/Api.php at line 481
XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 363
XFES\Elasticsearch\Api->createIndex() in src/addons/XFES/Service/Optimizer.php at line 79
XFES\Service\Optimizer->optimize() in src/addons/XFES/Admin/Controller/EnhancedSearch.php at line 196
XFES\Admin\Controller\EnhancedSearch->actionOptimize() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
XF\App->run() in src/XF.php at line 806
XF::runApp() in admin.php at line 15

Is XF 2.3.6 not compatible ?
 
I've just upgraded to ES version 8.11.4. It says I need to optimize and so when I do, i get an error:
Code:
XFES\Elasticsearch\RequestException: Failed to parse mapping: analyzer [suggest] has not been configured in mappings in src/addons/XFES/Elasticsearch/Api.php at line 481
XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 363
XFES\Elasticsearch\Api->createIndex() in src/addons/XFES/Service/Optimizer.php at line 79
XFES\Service\Optimizer->optimize() in src/addons/XFES/Admin/Controller/EnhancedSearch.php at line 196
XFES\Admin\Controller\EnhancedSearch->actionOptimize() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
XF\App->run() in src/XF.php at line 806
XF::runApp() in admin.php at line 15

Is XF 2.3.6 not compatible ?

Running XF 2.3.6 and ES 8.17.4 and optimization runs fine for me. Maybe try rebuilding cache first through XenForo tools directly, it might be out of sync after and ES upgrade.
 
@JoyFreak Yes, there is a new default setting in ES that will prevent HTTPS working out of the box. It came out about a year or so ago. Let me pull up my settings, I think I notated it in there. Without the default setting change, you are correct that an HTTPS connection will not work.
 
@JoyFreak Yes, there is a new default setting in ES that will prevent HTTPS working out of the box. It came out about a year or so ago. Let me pull up my settings, I think I notated it in there. Without the default setting change, you are correct that an HTTPS connection will not work.
Ah. so I just disabled this option "Use HTTPS connection" and saved it. I can now optimise and the search is working. Did I need to keep it enabled?
 
There is a sample elasticsearch.yml here:

along with a post and link from Jeremy P explaining the new HTTPS changes.

I would recommend still using HTTPS if you can.
 
There is a sample elasticsearch.yml here:

along with a post and link from Jeremy P explaining the new HTTPS changes.

I would recommend still using HTTPS if you can.
The resource has been deleted and is no longer available. Where can I find a sample of elasticsearch.yml and where would I put it?
 
@JoyFreak elasticsearch.yml can be found here: /etc/elasticsearch/elasticsearch.yml

This is mine...
Code:
# ======================== 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: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- 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: ["host1", "host2"]
#
# 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 -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 11-06-2024 04:01:46
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["host.XXXXXX.com"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

The key is this part:
Code:
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

If you do not have certs installed specifically for this you must set it to enabled:false. This is likely the only change you need to make to get https to run once again for Elastic search. Prior to about 14 months ago this was not set to enabled:true as a default setting in ElasticSearch, which is why you never had to deal with it before.
 
@JoyFreak elasticsearch.yml can be found here: /etc/elasticsearch/elasticsearch.yml

This is mine...
Code:
# ======================== 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: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- 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: ["host1", "host2"]
#
# 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 -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 11-06-2024 04:01:46
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["host.XXXXXX.com"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

The key is this part:
Code:
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

If you do not have certs installed specifically for this you must set it to enabled:false. This is likely the only change you need to make to get https to run once again for Elastic search. Prior to about 14 months ago this was not set to enabled:true as a default setting in ElasticSearch, which is why you never had to deal with it before.
Thank you :)
 
Back
Top Bottom