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

**URL:** <https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513>\
**Category:** Logstash\
**Created:** [March 5, 2018, 1:03pm UTC](https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513 "2018-03-05T13:03:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilNilClass](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nilNilClass](https://discuss.elastic.co/u/nilNilClass)\
**Post date:** [March 5, 2018, 1:03pm UTC](https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513/1 "2018-03-05T13:03:46Z")

</div>

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.

execute:

`bin/logstash -f Squid/logstash_squid.conf`

error:  
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/log4j2.properties. 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/](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:in`get\_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:in`block in multi\_receive'", "org/jruby/RubyArray.java:24t-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:34:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegaore/lib/logstash/output_delegator.rb:49:in`multi\_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:479:in `block in output_batch'", "orgstash/pipeline.rb:478:in`output\_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
  }
}
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 5, 2018, 1:14pm UTC](https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513/2 "2018-03-05T13:14:15Z")

</div>

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

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

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

---

<div class="post-metadata">

**Author:** ![nilNilClass](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nilNilClass](https://discuss.elastic.co/u/nilNilClass)\
**Post date:** [March 5, 2018, 1:22pm UTC](https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513/3 "2018-03-05T13:22:08Z")

</div>

thanks so much =D

I changed the domain name.

SOLVED

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2018, 1:22pm UTC](https://discuss.elastic.co/t/error-nomethoderror-undefined-method-for-nil-nilclass/122513/4 "2018-04-02T13:22:18Z")

</div>

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