elk 安装与所遇问题

网友投稿 562 2022-09-21

elk 安装与所遇问题

elk 安装与所遇问题

系统centos6.7

1,安装jdk-1.8.0

yum install java-1.8.0-openjdk

2,-elasticsearch-2.4.3.tar.gz并安装

tar zxvf elasticsearch-2.4.3.tar.gz -C /opt vi /opt/elasticsearch-2.4.3/conf/elasticsearch.yml

添加配置

network.host: 0.0.0.0#server绑定本地服务器内外网ip http.cors.enabled: true 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.

at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:94)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:160)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)

Refer to the log for complete error details.

[root@vultr elasticsearch]# su es bin/elasticsearch

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

[2016-12-29 08:56:59,510][WARN ][bootstrap                ] unable to install syscall filter: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

Exception in thread "main" java.lang.IllegalStateException: Unable to access 'path.plugins' (/opt/elasticsearch/plugins)

Likely root cause: java.nio.file.AccessDeniedException: /opt/elasticsearch/plugins

at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)

at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)

at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)

at java.nio.file.Files.createDirectory(Files.java:674)

at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)

at java.nio.file.Files.createDirectories(Files.java:767)

at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:337)

at org.elasticsearch.bootstrap.Security.addPath(Security.java:314)

at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:246)

at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)

at org.elasticsearch.bootstrap.Security.configure(Security.java:118)

at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:212)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)

Refer to the log for complete error details.

原因:1,新版本不允许用root启动,2,软件目录没相应的权限

解决:

groupadd es useradd -g es es passwd es

重新启动:

su es -c /opt/elasticsearch-2.4.3/bin/elasticsearch -Xmx2g -Xms2g - Des.index.storage.type=memory –d > /dev/null 2>&1 &” #因为我用的是虚拟机,内存比较小,所以启动看实际情况 -Xmx2g 是最大内存 -Xms2g 是最小内存 -d 是后台运行 #我的运行命令是 su es -c /opt/elasticsearch/bin/elasticsearch –d > /dev/null 2>&1 &

安装插件:elasticsearch-head(是集群前段显示页面)

切换到bin目录下 执行

./plugin install  mobz/elasticsearch-head

页面展示:数据表明启动成功,如下

{

"status": 200,

"name": "Omen",

"version": {

"number": "1.1.1",

"build_hash": "f1585f096d3f3985e73456debdc1a0745f512bbc",

"build_timestamp": "2014-04-16T14:27:12Z",

"build_snapshot": false,

"lucene_version": "4.7"

},

"tagline": "You Know, for Search"

}

安装插件:elasticsearch-kopf

执行命令:

./plugin install lmenezes/elasticsearch-kopf

页面展示:在同一台服务器上,所以只需要修改elasticsearch的链接地址

elasticsearch_url: http://localhost:9200

启动

bin/kibana -p 5601 > /dev/null 2>&1 &

意思是以5601端口启动

然后以http://ip:5601访问就可以了

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:python魔法方法中的str和repr使用和区别(python str和repr的区别)
下一篇:03 操作系统基础
相关文章

 发表评论

暂时没有评论,来抢沙发吧~