怎么关闭es存储原始数据,但能将索引建立呢
Elasticsearch • Cheetah 回复了问题 • 3 人关注 • 1 个回复 • 3436 次浏览 • 2017-09-07 11:12
es 由于gc 引起的节点脱落
Elasticsearch • klause 发表了文章 • 9 个评论 • 4533 次浏览 • 2017-09-01 09:44
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
这个配置值如何设置?另是否还有其他的解决方案
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
这个配置值如何设置?另是否还有其他的解决方案
社区日报 第34期 (2017-09-01)
社区日报 • laoyang360 发表了文章 • 1 个评论 • 4645 次浏览 • 2017-09-01 06:31
http://t.cn/RNbMJjR
2. 淘宝Elasticsearch搜索建议实战解读
http://t.cn/Rxb4uau
3. Spark Streaming + Elasticsearch构建App异常监控平台
http://t.cn/RNb9Qcn
编辑:laoyang360
归档:https://www.elasticsearch.cn/article/251
订阅:https://tinyletter.com/elastic-daily
[operation indices:monitor/stats failed]; nested: IndexNotFoundException[no such index]
Elasticsearch • guopeng7216 回复了问题 • 2 人关注 • 1 个回复 • 12478 次浏览 • 2018-03-06 17:32
es节点使用不均衡
Elasticsearch • kennywu76 回复了问题 • 4 人关注 • 2 个回复 • 6897 次浏览 • 2017-09-01 14:50
使用es做搜索,比如用户输入柠檬,搜出来的结果,柠檬汽水,柠檬位牙膏等在前面,真正想要的水果那个柠檬在后面。已经在中文分词中加了柠檬,还是不管用
Elasticsearch • YuLiGod 回复了问题 • 36 人关注 • 17 个回复 • 16982 次浏览 • 2023-04-24 11:00
使用ElasticSearch 5.x JAVA API时,Transport 获取client,关闭速度很慢,耗时3-4秒
Elasticsearch • Cheetah 回复了问题 • 2 人关注 • 1 个回复 • 2828 次浏览 • 2017-08-31 10:36
RestClient 多线程问题
Elasticsearch • Ricky_Lau 回复了问题 • 4 人关注 • 3 个回复 • 6440 次浏览 • 2017-08-31 14:59
社区日报 第33期 (2017-08-31)
社区日报 • 白衬衣 发表了文章 • 0 个评论 • 4387 次浏览 • 2017-08-31 09:21
http://t.cn/RG6eSVE
2.用react与elasticsearch构建一个搜索的最简单的方法
http://t.cn/Rqv3jow
3.看Collector Bank怎么使用elastic stack驱动业务创新
http://t.cn/RNyCFSp
编辑:金桥
归档:https://elasticsearch.cn/article/250
订阅:https://tinyletter.com/elastic-daily
es创建shard可以指定一个机器只有一个吗,使用curator创建出来的经常好几个shard集中在一个机器上
Elasticsearch • kennywu76 回复了问题 • 3 人关注 • 1 个回复 • 2151 次浏览 • 2017-08-31 09:54
ElasticSearch5.5.0安装
Elasticsearch • yzp 发表了文章 • 1 个评论 • 6043 次浏览 • 2017-08-30 20:41
安装环境 CentOS release 6.7 (Final)
1、因Elasticsearch是基于Java写的,所以它的运行环境中需要java的支持,在Linux下执行命令:
java -version,检查Jar包是否安装
安装java版本至少是1.8以上
2、首先准备下载Elasticsearch5.5.0 安装包
wget https://artifacts.elastic.co/d ... earch
3、下载到/usr/openv 目录下,解压
tar -zxvf elasticsearch-5.5.0.tar.gz
4、因为Elasticsearch5.0之后,不能使用root账户启动,我们先创建一个esuser组和账户
useradd esuser -g esuser -p esuser
5.更改文件夹权限
chown -R esuser:esuser /usr/openv/elasticsearch-5.5.0
6、启动elasticsearch:
/usr/openv/elasticsearch-5.5.0/bin
su esuser
./elasticsearch (前台启动)
这时候我们看见下面的提示,说明就成功了:
1. [elasticsearch@vmlnx-sma bin]$ ./elasticsearch
2. [2017-03-02T21:43:21,185][INFO ][o.e.n.Node ] [] initializing ...
3. [2017-03-02T21:43:21,264][INFO ][o.e.e.NodeEnvironment ] [uY3prpy] using [1] data paths, mounts [[/ (/dev/mapper/VolGroup-lv_root)]], net usable_space [43.5gb], net total_space [54.6gb], spins? [possibly], types [ext4]
4. [2017-03-02T21:43:21,265][INFO ][o.e.e.NodeEnvironment ] [uY3prpy] heap size [1.9gb], compressed ordinary object pointers [true]
5. [2017-03-02T21:43:21,268][INFO ][o.e.n.Node ] node name [uY3prpy] derived from node ID [uY3prpyqTHim5twauiVWhQ]; set [node.name] to override
6. [2017-03-02T21:43:21,271][INFO ][o.e.n.Node ] version[5.2.2], pid[5602], build[f9d9b74/2017-02-24T17:26:45.835Z], OS[Linux/3.10.5-3.el6.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_121/25.121-b13]
7. [2017-03-02T21:43:22,226][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [aggs-matrix-stats]
8. [2017-03-02T21:43:22,226][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [ingest-common]
9. [2017-03-02T21:43:22,226][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [lang-expression]
10. [2017-03-02T21:43:22,227][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [lang-groovy]
11. [2017-03-02T21:43:22,227][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [lang-mustache]
12. [2017-03-02T21:43:22,227][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [lang-painless]
13. [2017-03-02T21:43:22,228][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [percolator]
14. [2017-03-02T21:43:22,228][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [reindex]
15. [2017-03-02T21:43:22,228][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [transport-netty3]
16. [2017-03-02T21:43:22,229][INFO ][o.e.p.PluginsService ] [uY3prpy] loaded module [transport-netty4]
17. [2017-03-02T21:43:22,230][INFO ][o.e.p.PluginsService ] [uY3prpy] no plugins loaded
18. [2017-03-02T21:43:24,689][INFO ][o.e.n.Node ] initialized
19. [2017-03-02T21:43:24,689][INFO ][o.e.n.Node ] [uY3prpy] starting ...
20. [2017-03-02T21:43:24,929][INFO ][o.e.t.TransportService ] [uY3prpy] publish_address {10.245.250.65:9300}, bound_addresses {10.245.250.65:9300}
21. [2017-03-02T21:43:24,948][INFO ][o.e.b.BootstrapChecks ] [uY3prpy] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
22. [2017-03-02T21:43:28,010][INFO ][o.e.c.s.ClusterService ] [uY3prpy] new_master {uY3prpy}{uY3prpyqTHim5twauiVWhQ}{AqALBH68RCucWcPmHCE6dw}{10.245.250.65}{10.245.250.65:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
23. [2017-03-02T21:43:28,034][INFO ][o.e.h.HttpServer ] [uY3prpy] publish_address {10.245.250.65:9200}, bound_addresses {10.245.250.65:9200}
24. [2017-03-02T21:43:28,034][INFO ][o.e.n.Node ] [uY3prpy] started
25. [2017-03-02T21:43:28,061][INFO ][o.e.g.GatewayService ] [uY3prpy] recovered [0] indices into cluster_state
./elasticsearch -d (后台启动)
执行 curl http://localhost:9200
打开另一个终端进行测试:
curl 'http://localhost:9200/?pretty'
你能看到以下返回信息:
{
"status": 200,
"name": "Shrunken Bones",
"version": {
"number": "1.4.0",
"lucene_version": "4.10"
},
"tagline": "You Know, for Search"
}
说明安装成功。
但是我们希望能够使用ip访问,那么还需要设置相关内容
跳转到Elasticsearch的config配置文件下,使用vim打开elasticsearch.yml,找到里面的"network.host",将其改为本机IP,保存。
cd elasticsearch/config/
vim elasticsearch.yml
重启ElasticSearch,然后使用http://192.168.37.137:9200/访问。
二、★★★★★★★常见错误★★★★★★★
问题一:警告提示
[2016-11-06T16:27:21,712][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
报了一大串错误,其实只是一个警告。
解决:使用心得linux版本,就不会出现此类问题了。
问题二:ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
问题三:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]
解决:切换到root用户,进入limits.d目录下修改配置文件。
vi /etc/security/limits.d/90-nproc.conf
修改如下内容:
* soft nproc 1024
#修改为
* soft nproc 2048
问题四:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
解决:切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p
然后,重新启动elasticsearch,即可启动成功。
三、★★★★★★★★★★★★★★★★★★★
查看集群健康状态:curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
查看本地节点信息:curl -XGET http://localhost:9200/
其它一些命令:
查看集群状态:curl -XGET http://localhost:9200/_cat/health?v
curl -XGET 'http://localhost:9200/_cluster/state?pretty'
curl -XGET 'http://localhost:9200/_cluster/stats?human&pretty'
查看集群节点:curl -XGET http://localhost:9200/_cat/nodes?v
curl -XGET 'http://localhost:9200/_nodes/stats?pretty'
curl -XGET 'http://localhost:9200/_nodes/stats/os,process?pretty'
查询索引列表:curl -XGET http://localhost:9200/_cat/indices?v
创建索引:curl -XPUT http://localhost:9200/customer?pretty
查询索引:curl -XGET http://localhost:9200/customer/external/1?pretty
删除索引:curl -XDELETE http://localhost:9200/customer?pretty
停服与重启
停止ES服务器
如果是前台启动,直接Ctrl+Z或者直接关掉命令行窗口,则服务器立即停止。
如果是通过后台启动的ES服务,则需要用如下命令停止服务器:
也可以直接在Window系统的服务列表中找到安装的服务,然后右键停止。
另外,还可以通过curl工具来关掉整个集群或者集群中的指定节点,命令如下:
关掉集群:curl -XPOST http://localhost:9200/-cluster/nodes/_shutdown。
关掉指定的节点,节点标识符为jMJhGirhSRa9Iw2fQtjJ5A:curl -XPOST http://localhost:9200/_cluster ... tdown。
重启ES服务器
如果是想再次重启已经启动的ES服务,可以在Window系统的服务列表中找到安装的服务,然后右键重新启动即可。
es2.4不管插入还是查询,都会导致集群中的一台机中的某个磁盘压力负载100%
回复Elasticsearch • huyx108 发起了问题 • 1 人关注 • 0 个回复 • 3479 次浏览 • 2017-08-30 19:45
关于elasticsearch索引优化
Elasticsearch • novia 回复了问题 • 2 人关注 • 1 个回复 • 2208 次浏览 • 2017-08-30 17:24