I cannot start logstash on my machine. Error message inside I cannot start logstash on my machine. Error message inside elasticsearch elasticsearch

I cannot start logstash on my machine. Error message inside


You have to start logstash in the sudo mode. That is

host@host:~$ sudo suroot@host:/home/host# cd /usr/share/logstashroot@host:/usr/share/logstash# ./bin/logstash -e 'input { stdin { } } output { stdout {} }'WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaultsCould not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console16:18:33.959 [[main]-pipeline-manager] INFO  logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}16:18:33.996 [[main]-pipeline-manager] INFO  logstash.pipeline - Pipeline main startedThe stdin plugin is now waiting for input:16:18:34.019 [Api Webserver] INFO  logstash.agent - Successfully started Logstash API endpoint {:port=>9600}Hello2017-06-10T15:18:43.457Z host Hello


the exception message tells you that logstash can't find configure property, so you should add a flag in the command to tell logstash the configure property.and another exception is the logstash can't write something to the /usr/share/logstash/data , you should use 'sudo' to start this command, or you can add the write permission of /usr/share/logstash/data to your account.

logstash version:5.5.2

os version:ubuntu 16.04

the command of starting logstash as flow:

sudo bin/logstash -e 'input { stdin { } } output { stdout {} }' --path.settings=/etc/logstash

ps:I install logstash by apt install the document of install logstash


You can create logstash-data directory and use --path.data logstash-data to use logstash-data in current directory as logstash data dir.