Logstash return nothing (stdout)

Hello EveryOne,

I just installed logstash on a linux server (RPM installation).
I have a little problem when I run it.

Here is my configuration file:

input {
  file {
          path => "/home/ldap/user/*.log"
          #sincedb_path => "/dev/null"
         }
}

output {
              stdout{codec => rubydebug}
             }

When I run logstash with this configuration file ( [root@lcmci021 bin]# ./logstash --path.settings /etc/logstash -f test.conf) they return me this message :
Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
But he don't return me the log.

Thanks for help.

When I go see the logstash log I find the following error:
Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.

But I do not understand because I have only one logstash install on the server. How do I check if there are two? And how to delete one of the two?

If you have read that file before then it will be a sincedb issue.

But I do not understand because I have only one logstash install on the server. How do I check if there are two? And how to delete one of the two?

Are you also running Logstash as a service/daemon?

Yes. I launched it as a service first

It's not complaining that you have two Logstash installations. It's complaining that you're trying to run the same installation in two processes that share the same data directory.

The simplest way around this is probably to use the --path.data command line option to point the second Logstash process to another directory (e.g. a temporary one that you throw away afterwards).

Ok thank you.

But how to run logstash as a service with a configuration file for example? Because I only know the following way with the command: logstash -f.

Have a look at https://www.elastic.co/guide/en/logstash/current/running-logstash.html. See also https://www.elastic.co/guide/en/logstash/current/dir-layout.html for more about the directory layout.

OK. Thanks !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.