Startup fails if path.data is a symlink


(James Beckett) #1

There's a comment already in FileLockFactory.obtainLock() that the path traversal/create will fail in this case:

Symptom in logs:

[2018-02-06T09:58:02,982][FATAL][logstash.runner ] An unexpected error occurred! {:error=>java.nio.file.FileAlreadyExistsException: /software/logstash/data, :backtrace=>["sun.nio.fs.UnixException.translateToIOException(sun/nio/fs/UnixException.java:88)", "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.createDirectory(sun/nio/fs/UnixFileSystemProvider.java:384)", "java.nio.file.Files.createDirectory(java/nio/file/Files.java:674)", "java.nio.file.Files.createAndCheckIsDirectory(java/nio/file/Files.java:781)", "java.nio.file.Files.createDirectories(java/nio/file/Files.java:727)", "org.logstash.FileLockFactory.obtainLock(org/logstash/FileLockFactory.java:66)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "RUBY.execute(/software/logstash/logstash-core/lib/logstash/runner.rb:305)", "RUBY.run(/software/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67)", "RUBY.run(/software/logstash/logstash-core/lib/logstash/runner.rb:204)", "RUBY.run(/software/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132)", "software.logstash.lib.bootstrap.environment.(root)(/software/logstash/lib/bootstrap/environment.rb:71)", "software.logstash.lib.bootstrap.environment.(root)(software/logstash/lib/bootstrap//software/logstash/lib/bootstrap/environment.rb:71)"]}


Logstash fails to run if data.path is a symlink
(system) #2

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