ElasticSearch安装遇到Error以及解决方法

1. BindTransportException[Failed to bind to [9300-9400]

Exception in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /192.168.0.1:9400]; nested: BindException[Cannot assign requested address];
Likely root cause: java.net.BindException: Cannot assign requested address
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
    at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

解决方法:

打开配置文件elasticsearch.yml 将 network.host: 192.168.0.1 修改为本机IP 0.0.0.0

2.max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决方法:
切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf

添加如下内容:

* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

3.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方法:
切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:

vm.max_map_count=655360

并执行命令:
sysctl -p

4.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

5.JVM is using the client VM [Java HotSpot™ Client VM] but should be using a server VM for the best performance

解决方法:
进入文件$JAVA_HOME\jre\lib\i386\jvm.cfg

-client IF_SERVER_CLASS -server
-server KNOWN
-minimal KNOWN

改为:

-server KNOWN
-client IF_SERVER_CLASS -server
-minimal KNOWN

6.system call filters failed to install; check the logs and fix your configuration or disable system c

Centos6不支持SecComp,而ES5.2.0以后默认bootstrap.system_call_filter为true

解决方法:

修改elasticsearch.yml 添加一下内容
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

修改完后重启ElasticSearch即可。

你可能感兴趣的:(大数据)