Logstash starts but doesn't do anything

Hi , im new too ELK . Im trying to get some data in my logstash but my service doesn't seem to work properly. Im running on an ubuntu 14 vm. When i check my logstash status i get the following:

 logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-06-05 13:53:24 UTC; 7s ago
 Main PID: 2539 (java)
    Tasks: 15 (limit: 9513)
   CGroup: /system.slice/logstash.service
           └─2539 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.compile.invokedynamic=true -Djruby.jit.

Jun 05 13:53:24 ES-Test systemd[1]: Started logstash.
Jun 05 13:53:24 ES-Test logstash[2539]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Jun 05 13:53:27 ES-Test logstash[2539]: WARNING: An illegal reflective access operation has occurred
Jun 05 13:53:27 ES-Test logstash[2539]: WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.7.0.jar) to field java.io.FileDescriptor.fd
Jun 05 13:53:27 ES-Test logstash[2539]: WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
Jun 05 13:53:27 ES-Test logstash[2539]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Jun 05 13:53:27 ES-Test logstash[2539]: WARNING: All illegal access operations will be denied in a future release

After this nothing happens,no pipeline created , nothing. if i try my configuration with “/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/ciscotest.cfg --path.settings "/etc/logstash" everything works fine.
Here are my config files:

logstash.yml
path.data: /var/lib/logstash
path.config: "/etc/logstash/conf.d/ciscotest.cfg"
path.logs: /var/log/logstash

pipeline.yml
pipeline.id: main
path.config: "/etc/logstash/conf.d/ciscotest.cfg"

ciscotest.cfg
input{
udp{
port=> 5514
}
}

    output {
            file{
                    path => "/mnt/disk1/test-%{+YYYY-MM-dd}.txt"
                    codec => "json_lines"
           }

            elasticsearch{
                    hosts => ["localhost:9200"]

            }
    }

Any clues on what could be wrong? ,i've tried to check the log files but they always run behind 2-3 hours for some reason.

Are you using a supported version of java?

I thought it was 11 but im not sure, i can't check right now either but i will leave a message tomorow (basicly in about 13 hours)

So i checked on the versions and im using java opneJDK 11.0.3 and logstash is 7.1.1 so they should match

I also get a error in my logstash log :
[2019-06-06T07:20:27,448][FATAL][logstash.runner ] An unexpected error occurred! {:error=>java.nio.file.AccessDeniedException: /var/lib/logstash/.lock, :backtrace=>["sun.nio.fs.UnixException.translateToIOException(sun/nio/fs/UnixException.java:90)", "sun.nio.fs.UnixException.rethrowAsIOException(sun/nio/fs/UnixException.java:111)", "sun.nio.fs.UnixException.rethrowAsIOException(sun/nio/fs/UnixException.java:116)", "sun.nio.fs.UnixFileSystemProvider.newFileChannel(sun/nio/fs/UnixFileSystemProvider.java:178)", "java.nio.channels.FileChannel.open(java/nio/channels/FileChannel.java:292)", "java.nio.channels.FileChannel.open(java/nio/channels/FileChannel.java:345)", "org.logstash.FileLockFactory.obtainLock(org/logstash/FileLockFactory.java:69)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)", "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:566)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:425)", "org.jruby.javasupport.JavaMethod.invokeStaticDirect(org/jruby/javasupport/JavaMethod.java:357)", "usr.share.logstash.logstash_minus_core.lib.logstash.runner.execute(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:349)", "usr.share.logstash.logstash_minus_core.lib.logstash.runner.RUBY$method$execute$0$VARARGS(usr/share/logstash/logstash_minus_core/lib/logstash//usr/share/logstash/logstash-core/lib/logstash/runner.rb)", "usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.clamp_minus_0_dot_6_dot_5.lib.clamp.command.run(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67)", "usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.clamp_minus_0_dot_6_dot_5.lib.clamp.command.RUBY$method$run$0$VARARGS(usr/share/logstash/vendor/bundle/jruby/$2_dot_5_dot_0/gems/clamp_minus_0_dot_6_dot_5/lib/clamp//usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb)", "usr.share.logstash.logstash_minus_core.lib.logstash.runner.run(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:237)", "usr.share.logstash.logstash_minus_core.lib.logstash.runner.RUBY$method$run$0$VARARGS(usr/share/logstash/logstash_minus_core/lib/logstash//usr/share/logstash/logstash-core/lib/logstash/runner.rb)", "usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.clamp_minus_0_dot_6_dot_5.lib.clamp.command.run(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132)", "usr.share.logstash.lib.bootstrap.environment.(/usr/share/logstash/lib/bootstrap/environment.rb:73)", "java.lang.invoke.MethodHandle.invokeWithArguments(java/lang/invoke/MethodHandle.java:710)", "org.jruby.Ruby.runScript(org/jruby/Ruby.java:856)", "org.jruby.Ruby.runNormally(org/jruby/Ruby.java:779)", "org.jruby.Ruby.runNormally(org/jruby/Ruby.java:797)", "org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:609)", "org.logstash.Logstash.run(org/logstash/Logstash.java:102)", "org.logstash.Logstash.main(org/logstash/Logstash.java:45)"]}
[2019-06-06T07:20:27,461][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

The problem seem to be multiple acces denied problem i've fixed the problem and everything works now thank you .

how did you fixed it !

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