Elastic Search,Error:elasticsearch.service failed.
安装完Elastic Search后,默认情况下,服务只能在本地访问(127.0.0.1)
如果希望在其他机器上访问Elastic Search,则需要修改配置文件,默认位置在:/etc/elasticsearch/elasticsearch.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
[root@elasticsearch elasticsearch]# pwd /etc/elasticsearch [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# ls -ltr total 40 -rw-rw---- 1 root elasticsearch 0 Jul 24 11:41 users_roles -rw-rw---- 1 root elasticsearch 0 Jul 24 11:41 users -rw-rw---- 1 root elasticsearch 197 Jul 24 11:41 roles.yml -rw-rw---- 1 root elasticsearch 473 Jul 24 11:41 role_mapping.yml -rw-rw---- 1 root elasticsearch 17222 Jul 24 11:41 log4j2.properties -rw-rw---- 1 root elasticsearch 3596 Jul 24 11:41 jvm.options -rw-rw---- 1 root elasticsearch 199 Aug 12 00:26 elasticsearch.keystore -rw-rw---- 1 root elasticsearch 2904 Aug 12 00:34 elasticsearch.yml [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# cat elasticsearch.yml # ======================== 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 ----------------------------------- # # Set the bind address to a specific IP (IPv4 or IPv6): # #network.host: 192.168.0.1 network.host: 192.168.40.251 # # Set a custom port for HTTP: # #http.port: 9200 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: ["127.0.0.1", "192.168.40.251"] # # 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. # # ---------------------------------- 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 [root@elasticsearch elasticsearch]# |
注意,其中的:
- network.host
- http.port
然后,重启服务就会遇到如题所示的错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@elasticsearch ~]# service elasticsearch start Starting elasticsearch (via systemctl): [ OK ] [root@elasticsearch ~]# [root@elasticsearch ~]# service elasticsearch status ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2019-08-12 00:32:01 PDT; 2min 31s ago Docs: http://www.elastic.co Process: 8521 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=78) Main PID: 8521 (code=exited, status=78) Aug 12 00:31:41 elasticsearch.adamhuan.com systemd[1]: Started Elasticsearch. Aug 12 00:31:42 elasticsearch.adamhuan.com elasticsearch[8521]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was depreca...ease. Aug 12 00:32:01 elasticsearch.adamhuan.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=78/n/a Aug 12 00:32:01 elasticsearch.adamhuan.com systemd[1]: Unit elasticsearch.service entered failed state. Aug 12 00:32:01 elasticsearch.adamhuan.com systemd[1]: elasticsearch.service failed. Hint: Some lines were ellipsized, use -l to show in full. [root@elasticsearch ~]# |
其实,关于这个问题,查看Elastic Search的后端日志就可以很明白,默认位置:/var/log/elasticsearch/elasticsearch.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
[root@elasticsearch elasticsearch]# tail -f /var/log/elasticsearch/elasticsearch.log ==================================== [2019-08-12T00:31:45,252][INFO ][o.e.e.NodeEnvironment ] [elasticsearch.adamhuan.com] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [15.2gb], net total_space [17.6gb], types [rootfs] [2019-08-12T00:31:45,255][INFO ][o.e.e.NodeEnvironment ] [elasticsearch.adamhuan.com] heap size [1015.6mb], compressed ordinary object pointers [true] [2019-08-12T00:31:45,278][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] node name [elasticsearch.adamhuan.com], node ID [P9aQ_do6Ryizfo8CX3ssSQ], cluster name [elasticsearch] [2019-08-12T00:31:45,279][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] version[7.3.0], pid[8521], build[default/rpm/de777fa/2019-07-24T18:30:11.767338Z], OS[Linux/3.10.0-957.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12] [2019-08-12T00:31:45,279][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] JVM home [/usr/share/elasticsearch/jdk] [2019-08-12T00:31:45,279][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-7968501800676049371, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Dio.netty.allocator.type=unpooled, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true] [2019-08-12T00:31:48,680][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [aggs-matrix-stats] [2019-08-12T00:31:48,681][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [analysis-common] [2019-08-12T00:31:48,681][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [data-frame] [2019-08-12T00:31:48,681][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [flattened] [2019-08-12T00:31:48,681][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-common] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-geoip] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-user-agent] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-expression] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-mustache] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-painless] [2019-08-12T00:31:48,682][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [mapper-extras] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [parent-join] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [percolator] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [rank-eval] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [reindex] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [repository-url] [2019-08-12T00:31:48,683][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [transport-netty4] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [vectors] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ccr] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-core] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-deprecation] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-graph] [2019-08-12T00:31:48,684][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ilm] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-logstash] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ml] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-monitoring] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-rollup] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-security] [2019-08-12T00:31:48,685][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-sql] [2019-08-12T00:31:48,686][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-voting-only-node] [2019-08-12T00:31:48,686][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-watcher] [2019-08-12T00:31:48,686][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] no plugins loaded [2019-08-12T00:31:56,302][INFO ][o.e.x.s.a.s.FileRolesStore] [elasticsearch.adamhuan.com] parsed [0] roles from file [/etc/elasticsearch/roles.yml] [2019-08-12T00:31:57,481][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [elasticsearch.adamhuan.com] [controller/8598] [Main.cc@110] controller (64 bit): Version 7.3.0 (Build ff2f774f78ce63) Copyright (c) 2019 Elasticsearch BV [2019-08-12T00:31:58,236][DEBUG][o.e.a.ActionModule ] [elasticsearch.adamhuan.com] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2019-08-12T00:31:58,928][INFO ][o.e.d.DiscoveryModule ] [elasticsearch.adamhuan.com] using discovery type [zen] and seed hosts providers [settings] [2019-08-12T00:32:00,529][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] initialized [2019-08-12T00:32:00,530][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] starting ... [2019-08-12T00:32:00,777][INFO ][o.e.t.TransportService ] [elasticsearch.adamhuan.com] publish_address {192.168.40.251:9300}, bound_addresses {192.168.40.251:9300} [2019-08-12T00:32:00,786][INFO ][o.e.b.BootstrapChecks ] [elasticsearch.adamhuan.com] bound or publishing to a non-loopback address, enforcing bootstrap checks [2019-08-12T00:32:00,886][ERROR][o.e.b.Bootstrap ] [elasticsearch.adamhuan.com] node validation exception [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured [2019-08-12T00:32:00,905][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] stopping ... [2019-08-12T00:32:00,931][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] stopped [2019-08-12T00:32:00,932][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] closing ... [2019-08-12T00:32:00,963][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] closed [2019-08-12T00:32:00,966][INFO ][o.e.x.m.p.NativeController] [elasticsearch.adamhuan.com] Native controller process has stopped - no new native processes can be started (过多的输出,...) |
请注意上面的【[ERROR]】部分:
1 2 3 |
[2019-08-12T00:32:00,886][ERROR][o.e.b.Bootstrap ] [elasticsearch.adamhuan.com] node validation exception [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured |
错误原因:
在为ElasticSearch配置公共IP的时候,需要设置以下几个参数:
- network.host
- http.port
- discovery.seed_hosts
如果没有配置【discovery.seed_hosts】,则会遇到上面的错误。
修改后的ElasticSearch配置文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@elasticsearch elasticsearch]# pwd /etc/elasticsearch [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# ls -ltr total 40 -rw-rw---- 1 root elasticsearch 0 Jul 24 11:41 users_roles -rw-rw---- 1 root elasticsearch 0 Jul 24 11:41 users -rw-rw---- 1 root elasticsearch 197 Jul 24 11:41 roles.yml -rw-rw---- 1 root elasticsearch 473 Jul 24 11:41 role_mapping.yml -rw-rw---- 1 root elasticsearch 17222 Jul 24 11:41 log4j2.properties -rw-rw---- 1 root elasticsearch 3596 Jul 24 11:41 jvm.options -rw-rw---- 1 root elasticsearch 199 Aug 12 00:26 elasticsearch.keystore -rw-rw---- 1 root elasticsearch 2904 Aug 12 00:34 elasticsearch.yml [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# cat elasticsearch.yml | grep -v "^#" | strings path.data: /var/lib/elasticsearch path.logs: /var/log/elasticsearch network.host: 192.168.40.251 http.port: 9200 discovery.seed_hosts: ["127.0.0.1", "192.168.40.251"] [root@elasticsearch elasticsearch]# |
然后,启动ElasticSearch服务:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
[root@elasticsearch elasticsearch]# service elasticsearch restart Restarting elasticsearch (via systemctl): [ OK ] [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# service elasticsearch status ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2019-08-12 02:07:04 PDT; 34s ago Docs: http://www.elastic.co Main PID: 36763 (java) CGroup: /system.slice/elasticsearch.service ├─36763 /usr/share/elasticsearch/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+Us... └─36842 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller Aug 12 02:07:04 elasticsearch.adamhuan.com systemd[1]: Stopped Elasticsearch. Aug 12 02:07:04 elasticsearch.adamhuan.com systemd[1]: Started Elasticsearch. Aug 12 02:07:06 elasticsearch.adamhuan.com elasticsearch[36763]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprec...ease. Hint: Some lines were ellipsized, use -l to show in full. [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# netstat -tupln | grep 9200 tcp6 0 0 192.168.40.251:9200 :::* LISTEN 36763/java [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# netstat -tupln | grep java tcp6 0 0 192.168.40.251:9200 :::* LISTEN 36763/java tcp6 0 0 192.168.40.251:9300 :::* LISTEN 36763/java [root@elasticsearch elasticsearch]# [root@elasticsearch elasticsearch]# ps -ef | grep elastic root 36733 7743 0 02:06 pts/0 00:00:00 tail -f /var/log/elasticsearch/elasticsearch.log elastic+ 36763 1 9 02:07 ? 00:00:22 /usr/share/elasticsearch/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-12149536811351148153 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/lib/elasticsearch -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -XX:MaxDirectMemorySize=536870912 -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -Des.bundled_jdk=true -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet elastic+ 36842 36763 0 02:07 ? 00:00:00 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller root 36897 8372 0 02:10 pts/1 00:00:00 grep --color=auto elastic [root@elasticsearch elasticsearch]# |
看看这个过程中的日志输出【/var/log/elasticsearch/elasticsearch.log】:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
[root@elasticsearch elasticsearch]# tail -f /var/log/elasticsearch/elasticsearch.log [2019-08-12T00:34:57,600][INFO ][o.e.t.TransportService ] [elasticsearch.adamhuan.com] publish_address {192.168.40.251:9300}, bound_addresses {192.168.40.251:9300} [2019-08-12T00:34:57,606][INFO ][o.e.b.BootstrapChecks ] [elasticsearch.adamhuan.com] bound or publishing to a non-loopback address, enforcing bootstrap checks [2019-08-12T00:34:57,672][INFO ][o.e.c.c.Coordinator ] [elasticsearch.adamhuan.com] cluster UUID [nL8D9LawRWmnSTy_4WkWwg] [2019-08-12T00:34:57,967][INFO ][o.e.c.s.MasterService ] [elasticsearch.adamhuan.com] elected-as-master ([1] nodes joined)[{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{k7IwYMmkSXKu6xD_a_g5Hg}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 2, version: 16, reason: master node changed {previous [], current [{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{k7IwYMmkSXKu6xD_a_g5Hg}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20}]} [2019-08-12T00:34:58,145][INFO ][o.e.c.s.ClusterApplierService] [elasticsearch.adamhuan.com] master node changed {previous [], current [{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{k7IwYMmkSXKu6xD_a_g5Hg}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20}]}, term: 2, version: 16, reason: Publication{term=2, version=16} [2019-08-12T00:34:58,291][INFO ][o.e.h.AbstractHttpServerTransport] [elasticsearch.adamhuan.com] publish_address {192.168.40.251:9200}, bound_addresses {192.168.40.251:9200} [2019-08-12T00:34:58,310][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] started [2019-08-12T00:34:58,627][INFO ][o.e.l.LicenseService ] [elasticsearch.adamhuan.com] license [3fa1592a-0972-4419-87fe-3895c01711e3] mode [basic] - valid [2019-08-12T00:34:58,628][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [elasticsearch.adamhuan.com] Active license is now [BASIC]; Security is disabled [2019-08-12T00:34:58,650][INFO ][o.e.g.GatewayService ] [elasticsearch.adamhuan.com] recovered [0] indices into cluster_state =================== [2019-08-12T02:07:04,414][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] stopping ... [2019-08-12T02:07:04,430][INFO ][o.e.x.w.WatcherService ] [elasticsearch.adamhuan.com] stopping watch service, reason [shutdown initiated] [2019-08-12T02:07:04,693][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [elasticsearch.adamhuan.com] [controller/8737] [Main.cc@150] Ml controller exiting [2019-08-12T02:07:04,702][INFO ][o.e.x.m.p.NativeController] [elasticsearch.adamhuan.com] Native controller process has stopped - no new native processes can be started [2019-08-12T02:07:04,752][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] stopped [2019-08-12T02:07:04,753][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] closing ... [2019-08-12T02:07:04,779][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] closed [2019-08-12T02:07:09,966][INFO ][o.e.e.NodeEnvironment ] [elasticsearch.adamhuan.com] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [15.2gb], net total_space [17.6gb], types [rootfs] [2019-08-12T02:07:09,969][INFO ][o.e.e.NodeEnvironment ] [elasticsearch.adamhuan.com] heap size [1015.6mb], compressed ordinary object pointers [true] [2019-08-12T02:07:09,971][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] node name [elasticsearch.adamhuan.com], node ID [P9aQ_do6Ryizfo8CX3ssSQ], cluster name [elasticsearch] [2019-08-12T02:07:09,978][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] version[7.3.0], pid[36763], build[default/rpm/de777fa/2019-07-24T18:30:11.767338Z], OS[Linux/3.10.0-957.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12] [2019-08-12T02:07:09,979][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] JVM home [/usr/share/elasticsearch/jdk] [2019-08-12T02:07:09,979][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-12149536811351148153, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Dio.netty.allocator.type=unpooled, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true] [2019-08-12T02:07:13,573][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [aggs-matrix-stats] [2019-08-12T02:07:13,573][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [analysis-common] [2019-08-12T02:07:13,573][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [data-frame] [2019-08-12T02:07:13,573][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [flattened] [2019-08-12T02:07:13,574][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-common] [2019-08-12T02:07:13,574][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-geoip] [2019-08-12T02:07:13,574][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [ingest-user-agent] [2019-08-12T02:07:13,574][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-expression] [2019-08-12T02:07:13,574][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-mustache] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [lang-painless] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [mapper-extras] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [parent-join] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [percolator] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [rank-eval] [2019-08-12T02:07:13,575][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [reindex] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [repository-url] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [transport-netty4] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [vectors] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ccr] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-core] [2019-08-12T02:07:13,576][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-deprecation] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-graph] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ilm] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-logstash] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-ml] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-monitoring] [2019-08-12T02:07:13,577][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-rollup] [2019-08-12T02:07:13,578][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-security] [2019-08-12T02:07:13,578][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-sql] [2019-08-12T02:07:13,578][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-voting-only-node] [2019-08-12T02:07:13,578][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] loaded module [x-pack-watcher] [2019-08-12T02:07:13,579][INFO ][o.e.p.PluginsService ] [elasticsearch.adamhuan.com] no plugins loaded [2019-08-12T02:07:21,436][INFO ][o.e.x.s.a.s.FileRolesStore] [elasticsearch.adamhuan.com] parsed [0] roles from file [/etc/elasticsearch/roles.yml] [2019-08-12T02:07:22,672][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [elasticsearch.adamhuan.com] [controller/36842] [Main.cc@110] controller (64 bit): Version 7.3.0 (Build ff2f774f78ce63) Copyright (c) 2019 Elasticsearch BV [2019-08-12T02:07:23,407][DEBUG][o.e.a.ActionModule ] [elasticsearch.adamhuan.com] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2019-08-12T02:07:24,089][INFO ][o.e.d.DiscoveryModule ] [elasticsearch.adamhuan.com] using discovery type [zen] and seed hosts providers [settings] [2019-08-12T02:07:25,690][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] initialized [2019-08-12T02:07:25,691][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] starting ... [2019-08-12T02:07:25,967][INFO ][o.e.t.TransportService ] [elasticsearch.adamhuan.com] publish_address {192.168.40.251:9300}, bound_addresses {192.168.40.251:9300} [2019-08-12T02:07:25,974][INFO ][o.e.b.BootstrapChecks ] [elasticsearch.adamhuan.com] bound or publishing to a non-loopback address, enforcing bootstrap checks [2019-08-12T02:07:26,026][INFO ][o.e.c.c.Coordinator ] [elasticsearch.adamhuan.com] cluster UUID [nL8D9LawRWmnSTy_4WkWwg] [2019-08-12T02:07:26,227][INFO ][o.e.c.s.MasterService ] [elasticsearch.adamhuan.com] elected-as-master ([1] nodes joined)[{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{6MI1Inv-Q6ODai1X6exPFQ}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 3, version: 19, reason: master node changed {previous [], current [{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{6MI1Inv-Q6ODai1X6exPFQ}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20}]} [2019-08-12T02:07:26,364][INFO ][o.e.c.s.ClusterApplierService] [elasticsearch.adamhuan.com] master node changed {previous [], current [{elasticsearch.adamhuan.com}{P9aQ_do6Ryizfo8CX3ssSQ}{6MI1Inv-Q6ODai1X6exPFQ}{192.168.40.251}{192.168.40.251:9300}{dim}{ml.machine_memory=1907941376, xpack.installed=true, ml.max_open_jobs=20}]}, term: 3, version: 19, reason: Publication{term=3, version=19} [2019-08-12T02:07:26,450][INFO ][o.e.h.AbstractHttpServerTransport] [elasticsearch.adamhuan.com] publish_address {192.168.40.251:9200}, bound_addresses {192.168.40.251:9200} [2019-08-12T02:07:26,468][INFO ][o.e.n.Node ] [elasticsearch.adamhuan.com] started [2019-08-12T02:07:26,819][INFO ][o.e.l.LicenseService ] [elasticsearch.adamhuan.com] license [3fa1592a-0972-4419-87fe-3895c01711e3] mode [basic] - valid [2019-08-12T02:07:26,820][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [elasticsearch.adamhuan.com] Active license is now [BASIC]; Security is disabled [2019-08-12T02:07:26,851][INFO ][o.e.g.GatewayService ] [elasticsearch.adamhuan.com] recovered [0] indices into cluster_state (过多的输出,...) |
可以看到,这次就没有问题了。
终了,…