error=>#<NoMethodError: undefined method `<' for nil:NilClass>

Hello, I test all in windows and run well, now try move to CentOS7 and get this error.
I create a "Squid" dir in "/usr/share/logstash" with the files: access.log and config file.


bin/logstash -f Squid/logstash_squid.conf

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads a
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continui
Could not find log4j2 configuration at path /usr/share/logstash/config/ Using default config which logs errors to the console

[WARN ] 2018-03-05 13:08:28.443 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified

[WARN ] 2018-03-05 13:08:31.952 [[main]-pipeline-manager] elasticsearch - Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"ht::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused

[FATAL] 2018-03-05 13:08:33.475 [LogStash::Runner] runner - An unexpected error occurred! {:error=>#<NoMethodError: undefined method <' for nil:NilClass>, :elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:213:inget_event_type'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-:in event_action_params'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/c.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:34:inblock in multi_receive'", "org/jruby/ multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegaore/lib/logstash/output_delegator.rb:49:inmulti_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:479:in block in output_batch'", "orgstash/pipeline.rb:478:inoutput_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:430:in `worker_loop'", "/usr/share/logstash/logstash-c
[ERROR] 2018-03-05 13:08:33.587 [LogStash::Runner] Logstash - java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (SystemExit) exit

config file:

input {
  file {
    type => "squid"
    start_position => "beginning"
    path => "/usr/share/logstash/Squid/access.log"
    sincedb_path => "/dev/null"

filter {
    grok {
        match => ["message","%{INT:timestamp}.%{INT}\s*%{NUMBER:request_msec:float} %{IPORHOST:src_ip} %{WORD:cache_result}/%{NUMBER:response_status:int} %{$
        add_tag => ["squid"]
    date {
        match => [ "timestamp", "UNIX" ]

output {
  elasticsearch {
                hosts => ["localhost:9200"]
                manage_template => false
                index => "squid-%{+YYYY.MM.dd}"
  stdout {
                codec => rubydebug
1 Like

Here's the error message you should pay attention to:

Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused

So, is ES supposed to be running at localhost:9200?


thanks so much =D

I changed the domain name.


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