# Can't enable system module: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes

**URL:** <https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 16, 2018, 4:02am UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971 "2018-11-16T04:02:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexJ](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@AlexJ](https://discuss.elastic.co/u/AlexJ)\
**Post date:** [November 16, 2018, 4:02am UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971/1 "2018-11-16T04:02:36Z")

</div>

Hello. I am running Filebeat 6.4 and Elasticsearch 6.3 on Amazon Linux 2018.03 and am receiving the following error in my filebeat log:

```json
{
"level":"error",
"timestamp":"2018-11-16T03:56:40.395Z",
"caller":"pipeline/output.go:100",
"message":"Failed to connect to backoff(elasticsearch(hostname)):
  Connection marked as failed because the onConnect callback failed:
    Error loading pipeline for fileset system/auth:
      couldn't load pipeline:
        couldn't load json. Error: 500 Server Error: {
          \"error\":{
            \"root_cause\":[
              {\"type\":\"not_x_content_exception\",
              \"reason\":\"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes\"}
            ],
            \"type\":\"not_x_content_exception\",
            \"reason\":\"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes\"},
            \"status\":500}. 
    Response body: {\"error\":{\"root_cause\":[{\"type\":\"not_x_content_exception\",\"reason\":\"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes\"}],\"type\":\"not_x_content_exception\",\"reason\":\"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes\"},\"status\":500}"
}

```

My filebeat config is (I tested with this file, nothing has been removed after the fact except hostname and some root fields):

```auto
filebeat.modules:
  - module: system
    syslog:
      enabled: true
    auth:
      enabled: true
logging:
  level: info
  json: true
  files:
    path: /var/log/filebeat
    keepfiles: 7
fields_under_root: true
fields:
  "@instance_id": x
  "@server_type": y
setup:
  template:
    name: filebeat
    pattern: filebeat-*
output.elasticsearch:
  hosts: [...]
  compression_level: 6
  indices:
    - index: filebeat-%{[beat.version]}-%{+yyyy.MM.dd}-unknown

```

Does anyone know why this happens? How can I fix it?

EDIT: I upgraded to Filebeat 6.5.0 and no change

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 16, 2018, 1:34pm UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971/2 "2018-11-16T13:34:22Z")

</div>

Does it work if you disable compression temporarily?

---

<div class="post-metadata">

**Author:** ![AlexJ](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@AlexJ](https://discuss.elastic.co/u/AlexJ)\
**Post date:** [November 19, 2018, 12:12am UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971/3 "2018-11-19T00:12:39Z")

</div>

...yes! That is strange. This also seems to have fixed [my other issue](https://discuss.elastic.co/t/json-parse-exception-illegal-character-ctrl-char/156790/5) as well. Is compression known to be buggy?? It's not a major issue for us to leave it disabled.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [November 19, 2018, 2:08pm UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971/4 "2018-11-19T14:08:48Z")

</div>

One can disable compression in Elastcisearch HTTP server, but other then that I'm not aware of any problems/bugs with compression in Elasticsearch.

---

<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:** [December 17, 2018, 2:08pm UTC](https://discuss.elastic.co/t/cant-enable-system-module-compressor-detection-can-only-be-called-on-some-xcontent-bytes-or-compressed-xcontent-bytes/156971/5 "2018-12-17T14:08:51Z")

</div>

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