CentOS 7.9 安装 ELK( 四 )

启动命令
/opt/elastic/logstash-7.8.1/bin/logstash -f ../config/logstash-sample.conf -t/opt/elastic/logstash-7.8.1/bin/logstash -f ../config/logstash-sample.conf八、Filebeat安装报错1 failed; error='Not enough space
虚拟机内存不足 , 修改虚拟机分配内存大小的参数是 , -Xmx和-Xms
[es@ecs-65685 ~]$ /opt/elastic/elasticsearch-7.8.1/bin/elasticsearchException in thread "main" java.lang.RuntimeException: starting java failed with [1]output:## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (mmap) failed to map 549755813888 bytes for committing reserved memory.# An error report file with more information is saved as:# logs/hs_err_pid12013.logerror:OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f38ee000000, 549755813888, 0) failed; error='Not enough space' (errno=12) at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:126) at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88) at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59) at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:137) at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)[es@ecs-65685 ~]$ 2 Permission denied
es用户启动 elasticsearch时 , es目录没有权限:chmod -R 777 /opt/elastic/es
[es@ecs-65685 ~]$ /opt/elastic/elasticsearch-7.8.1/bin/elasticsearch2022-10-11 23:54:04,818 main ERROR RollingFileManager (/opt/elastic/es/logs/elasticsearch_deprecation.log) java.io.FileNotFoundException: /opt/elastic/es/logs/elasticsearch_deprecation.log (Permission denied) java.io.FileNotFoundException: /opt/elastic/es/logs/elasticsearch_deprecation.log (Permission denied) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(FileOutputStream.java:291) at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:234) at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:155)

CentOS 7.9 安装 ELK

文章插图
3 logstash直接启动会报错
[root@ecs-65685 ~]# /opt/elastic/logstash-7.8.1/bin/logstashOpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.WARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/opt/elastic/logstash-7.8.1/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to method sun.nio.ch.NativeThread.signal(long)WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.ModulesWARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsWARNING: All illegal access operations will be denied in a future releaseSending Logstash logs to /opt/elastic/logstash-7.8.1/logs which is now configured via log4j2.propertiesERROR: Pipelines YAML file is empty. Location: /opt/elastic/logstash-7.8.1/config/pipelines.ymlusage:bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAME.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]bin/logstash --help[2022-10-12T14:31:11,184][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

经验总结扩展阅读