Hi All,
RPM (yum) Installed Elasticsearch 6.8.0 (single instance) on CentOS 7.6 Server.
The installation with default configuration tested successfully using systemctl command.
GOAL: Save path.data and path.logs in 2 locations:
- Default Locations: /var/lib/elasticsearch & /var/log/elasticsearch
- Directories in another user profile (user_name): /home/user_name/exxxxxxxxxxxx680/data & /home/user_name/exxxxxxxxxxxx680/logs
.yml file updated as follows with custom path.logs and path.data with the various syntax options available; all have been tried; however, none work and Elasticsearch service (systemctl) exits with FAILED status:
> # ---------------------------------- Cluster -----------------------------------
> cluster.name: px-xx-cxxxxxxx
> #
> # ------------------------------------ Node ------------------------------------
> node.name: px-xx-nxxxx
> #
> # 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 to data files:
> #
> #path.data: /var/lib/elasticsearch
> #path.data: /home/user_name/exxxxxxxxxxxx680/data
> #path.data: /var/lib/elasticsearch,/home/user_name/exxxxxxxxxxxx680/data
> #path.data: ["/var/lib/elasticsearch", "/home/user_name/exxxxxxxxxxxx680/data"]
> #path.data: /home/user_name/exxxxxxxxxxxx680/data
> #path.data: ['/var/lib/elasticsearch', '/home/user_name/exxxxxxxxxxxx680/data']
> path.data: /home/user_name/exxxxxxxxxxxx680/data
> #
> # Path to log files:
> #
> #path.logs: /var/log/elasticsearch
> #path.logs:/home/user_name/exxxxxxxxxxxx680/logs
> #path.logs: /var/log/elasticsearch,/home/user_name/exxxxxxxxxxxx680/logs
> #path.logs: ["/var/log/elasticsearch", "/home/user_name/exxxxxxxxxxxx680/logs"]
> #path.logs:/home/user_name/exxxxxxxxxxxx680/logs
> #path.logs: ['/var/log/elasticsearch', '/home/user_name/exxxxxxxxxxxx680/logs']
> path.logs: /home/user_name/exxxxxxxxxxxx680/logs
> #
> #
> #path:
> # data:
> # - /var/lib/elasticsearch
> # - /home/user_name/exxxxxxxxxxxx680/data
> # logs:
> # - /var/log/elasticsearch
> # - /home/user_name/exxxxxxxxxxxx680/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 -----------------------------------
> #
> # Set the bind address to a specific IP (IPv4 or IPv6):
> #
> #network.host: 192.168.0.1
> network.host: 1xx.1xx.xxx.xxx
> #
> # Set a custom port for HTTP:
> #
> #http.port: xxx0
> http.port: xxx0
> #
> # For more information, consult the network module documentation.
> #
> # --------------------------------- Discovery ----------------------------------
> #
> # Pass an initial list of hosts to perform discovery when new node is started:
> # The default list of hosts is ["127.0.0.1", "[::1]"]
> #
> #discovery.zen.ping.unicast.hosts: ["host1", "host2"]
> #
> # Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
> #
> #discovery.zen.minimum_master_nodes:
> #
> # For more information, consult the zen discovery module documentation.
> #
> # ---------------------------------- Gateway -----------------------------------
> #
> # Block initial recovery after a full cluster restart until N nodes are started:
> #
> #gateway.recover_after_nodes: 3
> #
> # For more information, consult the gateway module documentation.
> #
> # ---------------------------------- Various -----------------------------------
> #
> # Require explicit names when deleting indices:
> #
> #action.destructive_requires_name: true
No Elasticsearch logs are generated when execution done with above configuration.
systemctl status elasticsearch:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2019-07-16 11:14:53 IST; 5s ago
Docs: http://www.elastic.co
Process: 31202 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid (code=exited, status=1/FAILURE)
Main PID: 31202 (code=exited, status=1/FAILURE)
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain elasticsearch[31202]: 2019-07-16 11:14:...
Jul 16 11:14:53 localhost.localdomain systemd[1]: elasticsearch.service: main...
Jul 16 11:14:53 localhost.localdomain systemd[1]: Unit elasticsearch.service ...
Jul 16 11:14:53 localhost.localdomain systemd[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
The journalctl logs are in the following post due to post size limitations.
Custom Destination Directory CHMOD set to 777.
I have tried all possible combinations of permissions settings on the custom destination directory; i.e.:
root:root root:elasticsearch elasticsearch:elasticsearch user:elasticsearch user:root user:user
...but no joy; currently set as follows
drwxrwxrwx. 4 root elasticsearch 42 Jul 15 16:51 exxxxxxxxxxxxxxx
We need to get this up and running in our production environment asap; Please Help!
Thanks in advance!
Regards,
JK