'Cannot run logstach 8.1.0 with the command

I have a problem about running defined configuration file in logstash though its command.

Here is my conf file shown below.

input {
  file {
    type => "userslog"
    path => "C:\Users\aaa\Downloads\logstash-8.1.0\users-ms.log"
  }
 
   file {
    type => "albumslog"
    path => "C:\Users\aaa\Downloads\logstash-8.1.0\albums-ms.log"
  }
}
output {
    if[type]=="userslog"{
 
          elasticsearch {
            hosts => ["localhost:9200"]
            index => "userslog-%{+YYYY.MM.dd}"
          }
      
    } else if[type]=="albumslog"{
 
          elasticsearch {
            hosts => ["localhost:9200"]
            index => "albumslog-%{+YYYY.MM.dd}"
          }
      
    } 
    stdout {codec => rubydebug}
}

Here is the result shown below.

C:\Users\aaa\Desktop\logstash-8.1.0\bin>logstash logstash-simple.conf
"Using bundled JDK: ."
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[FATAL] 2022-03-17 12:03:32.267 [main] Logstash - Logstash stopped processing because of an error: (NameError) missing class name (`org.apache.http.─▒mpl.client.StandardHttpRequestRetryHandler')
org.jruby.exceptions.NameError: (NameError) missing class name (`org.apache.http.─▒mpl.client.StandardHttpRequestRetryHandler')

When changed 'Java::OrgApacheHttpImplClient::StandardHttpRequestRetryHandler' to 'Java::OrgApacheHttp.impl.client::StandardHttpRequestRetryHandler', it didn't work.

How can I fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source