Permissions Driving Me Nuts!

First time LogStash install and I can't get it to run due to permissions issues that I 'm not understanding.

Started by complaining about /usr/share/logstash/data not being writable so I fixed that, then ./data/queue so I fixed that. Now it's complaining about a .lock file in the logstash directory. Logstash directory is owned by logstash, as is everything in it. Did a chmod 777 on the Logstash directory to no avail. I'm not sure why it's not happy. Ideas?

19:49:16.131 [LogStash::Runner] FATAL logstash.runner - An unexpected error occurred! {:error=>java.nio.file.AccessDeniedException: /usr/share/logstash/data/.lock, :backtrace=>["sun.nio.fs.UnixException.translateToIOException(sun/nio/fs/UnixException.java:84)", "sun.nio.fs.UnixException.rethrowAsIOException(sun/nio/fs/UnixException.java:102)", "sun.nio.fs.UnixException.rethrowAsIOException(sun/nio/fs/UnixException.java:107)", "sun.nio.fs.UnixFileSystemProvider.newFileChannel(sun/nio/fs/UnixFileSystemProvider.java:177)", "java.nio.channels.FileChannel.open(java/nio/channels/FileChannel.java:287)", "java.nio.channels.FileChannel.open(java/nio/channels/FileChannel.java:335)", "org.logstash.FileLockFactory.obtainLock(org/logstash/FileLockFactory.java:84)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "RUBY.execute(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:270)", "RUBY.run(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67)", "RUBY.run(/usr/share/logstash/logstash-core/lib/logstash/runner.rb:185)", "RUBY.run(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132)", "usr.share.logstash.lib.bootstrap.environment.(root)(/usr/share/logstash/lib/bootstrap/environment.rb:71)", "usr.share.logstash.lib.bootstrap.environment.(root)(usr/share/logstash/lib/bootstrap//usr/share/logstash/lib/bootstrap/environment.rb:71)"]}

Thanks,

Chris

This could be a apparmor or selinux issue (depending which flavor linux you use). Do a dmesg and see if you get any of those errors.

Thanks. Ultimately I think it was group ownership on the .lock file. I had ownership as logstash:root rather than logstash:logstash. I thought that should still work but apparently not. Thanks for your help!

1 Like

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