Elasticsearch5.x installation and solutions to common errors

Elasticsearch is a java-based development, you must first java environment, elasticsearch5.x recommendations on the machine with the latest version of jdk8. Here elasticsearch5.x installation steps:

First, install Elasticsearch5.x

1.1 Download and unzip

tar zxvf elasticsearch-5.4.0.tar.gz

1.2 start

cd elasticsearch-5.4.0
bin / elasticsearch (-d) # after -d way to start the station

Export

[2019-07-06T00:46:40,496][INFO ][o.e.n.Node ] [] initializing ...
[2019-07-06T00:46:40,607][INFO ][o.e.e.NodeEnvironment ] [dwEr1_X] using [1] data paths, mounts [[/home (/dev/cciss/c0d0p8)]], net usable_space [243.5gb], net total_space [1.2tb], spins? [possibly], types [ext4]
[2019-07-06T00:46:40,608][INFO ][o.e.e.NodeEnvironment ] [dwEr1_X] heap size [1.9gb], compressed ordinary object pointers [true]
[2019-07-06T00:46:40,648][INFO ][o.e.n.Node ] node name [dwEr1_X] derived from node ID [dwEr1_XnTHGXEhaSQveAMg]; set [node.name] to override
[2019-07-06T00:46:40,649][INFO ][o.e.n.Node ] version[5.4.0], pid[22486], build[780f8c4/2017-04-28T17:43:27.229Z], OS[Linux/2.6.32_1-22-0-0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_192/25.192-b12]
[2019-07-06T00:46:42,490][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [aggs-matrix-stats]
[2019-07-06T00:46:42,490][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [ingest-common]
[2019-07-06T00:46:42,490][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [lang-expression]
[2019-07-06T00:46:42,490][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [lang-groovy]
[2019-07-06T00:46:42,491][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [lang-mustache]
[2019-07-06T00:46:42,491][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [lang-painless]
[2019-07-06T00:46:42,491][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [percolator]
[2019-07-06T00:46:42,491][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [reindex]
[2019-07-06T00:46:42,492][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [transport-netty3]
[2019-07-06T00:46:42,492][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded module [transport-netty4]
[2019-07-06T00:46:42,493][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded plugin [elasticsearch-vector-scoring]
[2019-07-06T00:46:42,493][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded plugin [sql]
[2019-07-06T00:46:42,493][INFO ][o.e.p.PluginsService ] [dwEr1_X] loaded plugin [x-pack]
[2019-07-06T00:46:44,453][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.XPackPlugin
[2019-07-06T00:46:44,784][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/23807] [Main.cc@128] controller (64 bit): Version 5.4.0 (Build 120b96fa7f6fa7) Copyright (c) 2017 Elasticsearch BV
[2019-07-06T00:46:44,815][INFO ][o.e.d.DiscoveryModule ] [dwEr1_X] using discovery type [zen]
[2019-07-06T00:46:45,762][INFO ][o.e.n.Node ] initialized
[2019-07-06T00:46:45,762][INFO ][o.e.n.Node ] [dwEr1_X] starting ...
[2019-07-06T00:46:46,079][INFO ][o.e.t.TransportService ] [dwEr1_X] publish_address {10.252.30.51:19300}, bound_addresses {0.0.0.0:19300}
[2019-07-06T00:46:46,089][INFO ][o.e.b.BootstrapChecks ] [dwEr1_X] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
^C[2019-07-06T00:46:47,721][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
[2019-07-06T00:46:47,721][INFO ][o.e.n.Node ] [dwEr1_X] stopping ...
[2019-07-06T00:46:47,757][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [dwEr1_X] publish_address {10.252.30.51:19200}, bound_addresses {0.0.0.0:19200}

1.3 detect whether a successful start

Access address in the browser or terminal: HTTP: // localhost: 9200

 

{
  "name" : "PleU5uo",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "xwHSgZrjQO6sraj7I2yfHg",
  "version" : {
    "number" : "5.4.0",
    "build_hash" : "780f8c4",
    "build_date" : "2017-04-28T17:43:27.229Z",
    "build_snapshot" : false,
    "lucene_version" : "6.5.0"
  },
  "tagline" : "You Know, for Search"
}

 

As information appears to indicate elasticsearch successful installation. 

 

Second, the installation FAQ

问题一:max file descriptors [10240] for elasticsearch process likely too low, increase to at least [65536]

Solution: Switch to the root user, edit vim /etc/security/limits.conf file, add the following configuration items:

* Soft nofile 65536
* hard nofile 131072

After saving the file changes, users need to log in again to take effect.

 

问题二: max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

Solution: Switch to the root user, edit vim /etc/sysctl.conf file, modify the following configuration items:

vm.max_map_count=655360

Save and exit, execute: sysctl -p

 

问题三:system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

Solution: Modify es mounting vim config / elasticsearch.yml configuration file directory, add the following configuration:

bootstrap.system_call_filter: false

 

Guess you like

Origin www.cnblogs.com/xiaodekaixin/p/11141405.html