“Microsystems was unexpected at this time.” is a frustrating error which appears when you run Logstash 7.6.1 on a windows machine in command line window. Here is a workaround to get around it.
Environment
Logstash version: 7.6.1
Operating system: Windows 10
Java version :
openjdk version “11.0.5” 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
Github issue tracker.
Possible reason
The commas in the value of JAVA_TOOL_OPTIONS trip the elasticsearch as reported here. Maybe they have to migrate the fix to logstash also.
Workaround
In the bin folder find the file setup.bat
and comment out few line as shown.
Before:
rem do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default) if not "%JAVA_TOOL_OPTIONS%" == "" ( echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS" set JAVA_TOOL_OPTIONS= )
After:
rem do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default) rem if not "%JAVA_TOOL_OPTIONS%" == "" ( rem echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS" rem set JAVA_TOOL_OPTIONS= rem ) set JAVA_TOOL_OPTIONS=
Save the file. And run logstash again.
“Microsystems was unexpected at this time.” error will be gone and logstash starts.
PS : This is the first in my upcoming series of microposts. It is my attempt to address the general feedback that my posts are too long and readers are time poor.
PPS: Unreasonably large number of my readers are fans for Cameron Diaz. Hence the picture.