ELK日志分析平台之ElasticSearch安装常见错误
1.1.1 java.nio.file.AccessDeniedException:出现这个异常的原因是当前用户没权限
解决方案:
1) 通过命令将相关文件的权限赋予给ELK用户(也可以是其他用户名):chownELK /usr/local/elasticsearch -R
1.1.2 Elasticsearch启动时 unable to install syscall filter问题说明
解决方案:
1) 重新安装新版本的Linux系统(如将centos 6换成centos 7)
2) 警告不影响使用,可以忽略
1.1.3 elasticsearch外网IP无法访问
解决方案:
1) 如果是默认启动elasticsearch的话,则只能在本地访问,需要修改elasticsearch.yml文件,将network.host绑定为启动机子的IP。
1.1.4 ERROR: bootstrap checks failed
[1]: max file descriptors [4096] forelasticsearch process is too low, increase to at least [65536]
解决方案:
切换root账户 vim /etc/security/limits.conf ,在配置文件中添加如下设置:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
[2]:max virtual memory areas vm.max_map_count[65530] is too low, increase to at least [262144]
解决方案:
切换root账户 vim /etc/sysctl.conf
增加一行 vm.max_map_count=655360
接着执行 sysctl –p
需要重新启动一下系统,不然会继续报第二个错
1.1.5 main ERROR No log4j2configuration file found. 找不到日志配置文件
解决方案:
切换root账户 yum install -y log4j* ###安装log4j包
1.1.6 CentOS yum出现“Could not retrieve mirrorlist ”的解决办法
解决方案:
是因为没有配置DNS服务器,编辑resolv.conf文件,添加:
nameserver 8.8.8.8
保存退出即可
1.1.7 Elasticsearch.yml配置文件无法编译
main ERROR No log4j2 configuration file found.Using default configuration: logging only errors to the console. Set systemproperty 'log4j2.debug' to show Log4j2 internal initialization logging.
SettingsException[Failed to load settings from[elasticsearch.yml]]; nested: ParsingException[Failed to parse object:expecting token of type [START_OBJECT] but found [VALUE_STRING]];
解决方案:修改elasticsearch.yml文件