问题描述:elasticsearch
在centos7
中运行正常,部署项目。访问项目后发现,搜索功能失效。
排查过程
-
netstat -anp|grep 9200
查看端口,确保elasticsearch
正常运行[root@localhost bin]# netstat -anp|grep 9200 tcp6 0 0 192.168.2.2:9200 :::* LISTEN 11924/java [root@localhost bin]# netstat -anp|grep 9300 tcp6 0 0 192.168.2.2:9300 :::* LISTEN 11924/java tcp6 0 0 192.168.2.2:45732 192.168.2.2:9300 ESTABLISHED 12085/java tcp6 0 0 192.168.2.2:9300 192.168.2.2:45724 ESTABLISHED 11924/java
-
curl http://192.168.2.2:9200
确保在linux
上能正常访问[root@localhost bin]# curl http://192.168.2.2:9200 { "name" : "Magneto", "cluster_name" : "elasticsearch", "cluster_uuid" : "lV3Us0P1Sr-5btJO0i3wfQ", "version" : { "number" : "2.4.2", "build_hash" : "161c65a337d4b422ac0c805f284565cf2014bb84", "build_timestamp" : "2016-11-17T11:51:03Z", "build_snapshot" : false, "lucene_version" : "5.5.2" }, "tagline" : "You Know, for Search" }
-
编辑查看
vi elasticsearch.yml
[root@localhost elasticsearch-2.4