# Need help with debugging

**URL:** <https://discuss.elastic.co/t/need-help-with-debugging/166449>\
**Category:** Elasticsearch\
**Created:** [January 30, 2019, 11:57pm UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449 "2019-01-30T23:57:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbieelastic](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@newbieelastic](https://discuss.elastic.co/u/newbieelastic)\
**Post date:** [January 30, 2019, 11:57pm UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/1 "2019-01-30T23:57:12Z")

</div>

I am getting a parsing error. Could you see what I could be doing wrong? Thanks!

PUT /\_template/flightdata\_template  
{  
"index\_patterns": ["flightdata\*"],  
"mappings" : {  
"\_doc" : {  
"dynamic": "strict",  
"properties" : {  
"thedate": {  
"type": "date",  
"format": "yyyy.mm.dd HH:mm:ss"},  
"airline": { "type": "text" },  
"flight": { "type": "text" },  
"origin": { "type": "text" },  
"destination": { "type": "text" }  
}  
}  
},  
"aliases": {  
"flightdata": {}  
}  
}

GET /\_template/flightdata\_template

POST /flightdata\_1/\_doc -H "content-type: application/json" -d @-  
{  
"Thedate": "2017.10.01 15:00:00",  
"airline": "HA",  
"flight": "1",  
"origin": "LAX",  
"destination": "HNL"  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 12:11am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/2 "2019-01-31T00:11:21Z")

</div>

Maybe `Thedate` should the `thedate`?

What is the error message ?

BTW could you please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

---

<div class="post-metadata">

**Author:** ![newbieelastic](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@newbieelastic](https://discuss.elastic.co/u/newbieelastic)\
**Post date:** [January 31, 2019, 12:17am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/3 "2019-01-31T00:17:06Z")

</div>

Below is the error code. I will read the guide. Sorry about that.

```
{
  "error": {
    "root_cause": [
      {
        "type": "not_x_content_exception",
        "reason": "not_x_content_exception: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse",
    "caused_by": {
      "type": "not_x_content_exception",
      "reason": "not_x_content_exception: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"
    }
  },
  "status": 400
}
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 12:51am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/5 "2019-01-31T00:51:43Z")

</div>

> [@newbieelastic](#):
>
> POST /flightdata\_1/\_doc -H "content-type: application/json" -d @-  
> {  
> "Thedate": "2017.10.01 15:00:00",  
> "airline": "HA",  
> "flight": "1",  
> "origin": "LAX",  
> "destination": "HNL"  
> }

This does not look like a Kibana dev console command. How are you executing the code exactly ?

---

<div class="post-metadata">

**Author:** ![newbieelastic](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@newbieelastic](https://discuss.elastic.co/u/newbieelastic)\
**Post date:** [January 31, 2019, 1:09am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/6 "2019-01-31T01:09:33Z")

</div>

I am using Kibana DEV Console. The command earlier worked with curl. Since my new elastic instance has https ..the curl command had issues with SSL protocol. So I switched to Console. Is the console syntax for POST different?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 5:08am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/7 "2019-01-31T05:08:46Z")

</div>

It should be:

```
POST /flightdata_1/_doc
```

---

<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:** [February 28, 2019, 5:08am UTC](https://discuss.elastic.co/t/need-help-with-debugging/166449/8 "2019-02-28T05:08:49Z")

</div>

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