# Logstash http input fails

**URL:** <https://discuss.elastic.co/t/logstash-http-input-fails/312268>\
**Category:** Logstash\
**Created:** [August 17, 2022, 10:36am UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268 "2022-08-17T10:36:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cihady](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cihady](https://discuss.elastic.co/u/cihady)\
**Post date:** [August 17, 2022, 10:36am UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268/1 "2022-08-17T10:36:38Z")

</div>

I am trying to api call logstash by using http input but when I send request I got error below

Here is my config file

```auto
input {
  http {
		host=>"0.0.0.0"
		port =>"2020"
		
  }
}

output {
  elasticsearch {
    hosts => ["10.216.73.45:9200"]
	index => "abcfront"
  }
}

```

and here is my error log

`[2022-08-17T13:32:55,710][WARN][logstash.outputs.abc][main][97e0a2c5c534e1761e20eb9cd124dad3c5f10f0019d8b023763a076f395d45b9] Could not index event to asd. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"abcfront", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x6e90b9f6>], :response=>{"index"=>{"_index"=>"abcfront", "_type"=>"_doc", "_id"=>"VCxdq4IBhV40gealAsF8", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [host] tried to parse field [host] as object, but found a concrete value"}}}}`

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 17, 2022, 12:55pm UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268/2 "2022-08-17T12:55:53Z")

</div>

Hello there!  
I think you should consider changing 0.0.0.0 to your node IP address.

> [@cihady](#):
>
> ` host=>"0.0.0.0"`

Chris

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 17, 2022, 3:39pm UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268/3 "2022-08-17T15:39:03Z")

</div>

> [@cihady](#):
>
> "reason"=\>"object mapping for [host] tried to parse field [host] as object, but found a concrete value"}}}}

See [this](https://discuss.elastic.co/t/getting-illegal-state-exception-error-while-pushing-logs-to-elasticsearch/290029/2) thread.

---

<div class="post-metadata">

**Author:** ![cihady](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cihady](https://discuss.elastic.co/u/cihady)\
**Post date:** [August 20, 2022, 6:56am UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268/4 "2022-08-20T06:56:27Z")

</div>

I solve this issue by removing host field from my event in logstash

---

<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:** [September 17, 2022, 6:56am UTC](https://discuss.elastic.co/t/logstash-http-input-fails/312268/5 "2022-09-17T06:56:54Z")

</div>

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