[FATAL] An unexpected error occured


(Louise) #1

I am new with the Elasticsearch stak and I have a fatal error when trying to configure Logstash since I have deleted and re-downloaded it. It used to work but I thought the connection with Elasticsearch and Kibana was strange since I could not see any data so I have chose to erase and re-install the whole stack. Since then, when I am doing the bin/logstash -f myconfig.conf I have this error :

[FATAL] 2017-09-20 18:47:55.640 [main] runner - An unexpected error occurred! {:error=>java.lang.IllegalArgumentException: Illegal character in path at index 18: file:///C:/Program
Files/Elastic/logstash-5.6.1/logstash-5.6.1/config/log4j2.properties, :backtrace=>["java.net.URI.create(java/net/URI.java:852)", "java.lang.reflect.Method.invoke(java/lang/reflect
/Method.java:498)", "RUBY.reconfigure(C:/Program Files/Elastic/logstash-5.6.1/logstash-5.6.1/logstash-core/lib/logstash/logging/logger.rb:78)", "org.jruby.ext.thread.Mutex.synchron
ize(org/jruby/ext/thread/Mutex.java:149)", "RUBY.reconfigure(C:/Program Files/Elastic/logstash-5.6.1/logstash-5.6.1/logstash-core/lib/logstash/logging/logger.rb:77)", "RUBY.execute
(C:/Program Files/Elastic/logstash-5.6.1/logstash-5.6.1/logstash-core/lib/logstash/runner.rb:224)", "RUBY.run(C:/Program Files/Elastic/logstash-5.6.1/logstash-5.6.1/vendor/bundle/j
ruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67)", "RUBY.run(C:/Program Files/Elastic/logstash-5.6.1/logstash-5.6.1/logstash-core/lib/logstash/runner.rb:204)", "RUBY.run(C:/Progr
am Files/Elastic/logstash-5.6.1/logstash-5.6.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132)", "C_3a_.Program_20_Files.Elastic.logstash_minus_5_dot_6_dot_1.log
stash_minus_5_dot_6_dot_1.lib.bootstrap.environment.(root)(C:\Program Files\Elastic\logstash-5.6.1\logstash-5.6.1\lib\bootstrap\environment.rb:71)", "C_3a_.Program_20_Files.
Elastic.logstash_minus_5_dot_6_dot_1.logstash_minus_5_dot_6_dot_1.lib.bootstrap.environment.(root)(C_3a_/Program_20_Files/Elastic/logstash_minus_5_dot_6_dot_1/logstash_minus_5_dot_
6_dot_1/lib/bootstrap/C:\Program Files\Elastic\logstash-5.6.1\logstash-5.6.1\lib\bootstrap\environment.rb:71)"]}

Does anyone know why or have had the same error ?
Thank you


(Mark Walkom) #2

What's the content of that file?

If you paste it, please make sure you format it using the </> button.


(Saikat Ghosh) #3

Hi Lousie,
I too getting same issue.


(Louise) #4

Saikat : I just delete and re-download logstash and it is working better now though it was way more difficult to dezip the file doesn't know why...

Warkolm : My log4j2.properties in my new download is like that :

>  status = error
> name = LogstashPropertiesConfig
> 
> appender.console.type = Console
> appender.console.name = plain_console
> appender.console.layout.type = PatternLayout
> appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
> 
> appender.json_console.type = Console
> appender.json_console.name = json_console
> appender.json_console.layout.type = JSONLayout
> appender.json_console.layout.compact = true
> appender.json_console.layout.eventEol = true
> 
> appender.rolling.type = RollingFile
> appender.rolling.name = plain_rolling
> appender.rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
> appender.rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
> appender.rolling.policies.type = Policies
> appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
> appender.rolling.policies.time.interval = 1
> appender.rolling.policies.time.modulate = true
> appender.rolling.layout.type = PatternLayout
> appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %-.10000m%n
> 
> appender.json_rolling.type = RollingFile
> appender.json_rolling.name = json_rolling
> appender.json_rolling.fileName = ${sys:ls.logs}/logstash-${sys:ls.log.format}.log
> appender.json_rolling.filePattern = ${sys:ls.logs}/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
> appender.json_rolling.policies.type = Policies
> appender.json_rolling.policies.time.type = TimeBasedTriggeringPolicy
> appender.json_rolling.policies.time.interval = 1
> appender.json_rolling.policies.time.modulate = true
> appender.json_rolling.layout.type = JSONLayout
> appender.json_rolling.layout.compact = true
> appender.json_rolling.layout.eventEol = true
> 
> 
> rootLogger.level = ${sys:ls.log.level}
> rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console
> rootLogger.appenderRef.rolling.ref = ${sys:ls.log.format}_rolling
> 
> # Slowlog
> 
> appender.console_slowlog.type = Console
> appender.console_slowlog.name = plain_console_slowlog
> appender.console_slowlog.layout.type = PatternLayout
> appender.console_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
> 
> appender.json_console_slowlog.type = Console
> appender.json_console_slowlog.name = json_console_slowlog
> appender.json_console_slowlog.layout.type = JSONLayout
> appender.json_console_slowlog.layout.compact = true
> appender.json_console_slowlog.layout.eventEol = true
> 
> appender.rolling_slowlog.type = RollingFile
> appender.rolling_slowlog.name = plain_rolling_slowlog
> appender.rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
> appender.rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
> appender.rolling_slowlog.policies.type = Policies
> appender.rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
> appender.rolling_slowlog.policies.time.interval = 1
> appender.rolling_slowlog.policies.time.modulate = true
> appender.rolling_slowlog.layout.type = PatternLayout
> appender.rolling_slowlog.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %.10000m%n
> 
> appender.json_rolling_slowlog.type = RollingFile
> appender.json_rolling_slowlog.name = json_rolling_slowlog
> appender.json_rolling_slowlog.fileName = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}.log
> appender.json_rolling_slowlog.filePattern = ${sys:ls.logs}/logstash-slowlog-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
> appender.json_rolling_slowlog.policies.type = Policies
> appender.json_rolling_slowlog.policies.time.type = TimeBasedTriggeringPolicy
> appender.json_rolling_slowlog.policies.time.interval = 1
> appender.json_rolling_slowlog.policies.time.modulate = true
> appender.json_rolling_slowlog.layout.type = JSONLayout
> appender.json_rolling_slowlog.layout.compact = true
> appender.json_rolling_slowlog.layout.eventEol = true
> 
> logger.slowlog.name = slowlog
> logger.slowlog.level = trace
> logger.slowlog.appenderRef.console_slowlog.ref = ${sys:ls.log.format}_console_slowlog
> logger.slowlog.appenderRef.rolling_slowlog.ref = ${sys:ls.log.format}_rolling_slowlog
> logger.slowlog.additivity = false

(Saikat Ghosh) #5

Thanks Lousie
In my case the issue was with the folder name where i extracted the logstash . My folder structure was ELK Stack>Logstash>bin.
The space between "ELK Stack" folder name was creating issue in running the logstash.bat file.
I renamed the folder to ELK_Stack>Logstash>bin and kept the logstash.config file in Config folder.
Now it's working.


(Mark Walkom) #6

@saikat17ster FYI we’ve renamed ELK to the Elastic Stack, otherwise Beats feels left out :wink:


(system) #7

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