Logstash error when attempting to ingest

Hi all,

I'm pretty new to this, and this will be my first attempt to load a file into Elasticsearch.

I have a csv file.
I have Kibana and Elasticsearch running on a Windows 10 laptop
I configured a config file the following parameters:

//

input {
file {
path => "C:\Workspace\billingfile.csv
start_position => "beginning"
sincedb_path => "/dev/null"

filter {
csv {

seperator => ","
	
	columns => [ "Customer Name", "Customer ID", "Description", "Quantity", "Cost",  "Cost Rate", "Total Cost", "Price", "Type" ,"Rate", "Total Price" ,"Currency" ,"Date" ]
}
mutate {convert => ["Quantity", "integer"] }
mutate {convert => ["Cost", "float"] }
mutate {convert => ["Total Cost", "float"] }
mutate {convert => ["Total Price", "float"] }	

}
output {
elasticsearch {
hosts => "localhost"

//

I run the command file in my dos prompt:

.\bin\logstash -f "billingfile.csv"

I'm getting the error running as Administrator:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/logstash/Logstash : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.logstash.Logstash. Program will exit.

Any idea what the issue might be?

Thanks

You appear to be running java code compiled with Java 8 using an older version of Java. logstash only supports Java versions 1.8.0 and 11.

Also, do not use backslash in the path option of a file input, use forward slash.

Also, on Windows, if you do not want the in-memory sincedb persisted across restarts, then use "NUL", not "/dev/null".

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