记录Linux安装ElasticSearch遇到的一些问题与解决

第一种: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

-server KNOWN      //原来在第二行
-client IF_SERVER_CLASS -server
-minimal KNOWN

第二种、ElasticsearchException[X-Pack is not supported and Machine Learning is not available for

解决:在config/elasticsearch.yml添加一条配置:

xpack.ml.enabled: false

第三种、unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86/libjnidispatch.so) not found

解决办法:

直接删除或备份Elasticsearch-a.b.c/lib目录下面的jna文件:

mv jna-4.4.0.jar jna-4.4.0.jar.bak

在lib目录下:

wget http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar

你可能感兴趣的:(web,elasticSearch)