# Problems with evebox elastic-import

**URL:** <https://forum.suricata.io/t/problems-with-evebox-elastic-import/922>\
**Category:** Help\
**Created:** [December 22, 2020, 10:39pm UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922 "2020-12-22T22:39:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/russell_fulton/32/295_2.png) [@Russell\_Fulton](https://forum.suricata.io/u/Russell_Fulton)\
**Post date:** [December 22, 2020, 10:39pm UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922/1 "2020-12-22T22:39:33Z")

</div>

I am trying to use evebox elastic-import (tried both 12.0 & 13.0-dev) against an ES server running 7.10.

What happens is that evebox does not connect to the ES server. It waits a minute and then prints an error – 60 sec timeout. Tcpdump show no connection attempt.

```auto
sensors@secmonprd10:~$ cat /etc/evebox/es-import.yaml
elasticsearch: http://10.6.0.67:9200
index: evebox
bookmark: true
bookmark-dir: /data/sensors
bookmark-filename: /data/sensors/eve.json.bookmark
input: /data/sensors/eve.json
sensors@secmonprd10:~$ nc 10.6.0.67 9200
get
HTTP/1.0 400 Bad Request
content-type: application/json; charset=UTF-8
content-length: 203

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"}],"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"},"status":400}get
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"}],"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"},"status":400

```

which shows we have network connectivity to ES

```auto
sensors@secmonprd10:~$ evebox version
EveBox Version 0.13.0-dev (rev 15dadd8); x86_64-unknown-linux-musl

evebox elastic-import -c /etc/evebox/es-import.yaml -vv
2020-12-23 11:18:27 DEBUG evebox::commands::elastic_import: Testing for bookmark directory writability with file: /data/sensors/.evebox
2020-12-23 11:18:27 DEBUG evebox::commands::elastic_import: Bookmark directory is writable: directory="/data/sensors"
2020-12-23 11:19:27 ERROR evebox::commands::elastic_import: Failed to get Elasticsearch version, will try again: error=json: expected value at line 1 column 1
2020-12-23 11:20:28 ERROR evebox::commands::elastic_import: Failed to get Elasticsearch version, will try again: error=json: expected value at line 1 column 1

```

What am I missing?

Russell

---

<div class="post-metadata">

**Author:** ![ish](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/ish/32/8_2.png) [@ish](https://forum.suricata.io/u/ish)\
**Post date:** [December 22, 2020, 11:01pm UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922/2 "2020-12-22T23:01:04Z")

</div>

Hi Russel, there does appear to be an issue with getting the elasticsearch URL out of the configuration file. A quick work-around is to provide it on the command line with a `-e http://10.6.0.67:9200`, then your config at least works for me.

I’ll address this in the builds a.s.a.p.

Thanks.

---

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/russell_fulton/32/295_2.png) [@Russell\_Fulton](https://forum.suricata.io/u/Russell_Fulton)\
**Post date:** [December 22, 2020, 11:38pm UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922/3 "2020-12-22T23:38:58Z")

</div>

I did try that before to no avail. I have now deleted the line from the config altogether and just put the -e but it still behaves the same.

```auto
cat /etc/evebox/es-import.yaml
index: evebox
bookmark: true
bookmark-dir: /data/sensors
bookmark-filename: /data/sensors/eve.json.bookmark
input: /data/sensors/eve.json
sensors@secmonprd10:~$ evebox elastic-import -c /etc/evebox/es-import.yaml -v -e http://10.6.0.67:9200
2020-12-23 12:32:55 DEBUG evebox::commands::elastic_import: Testing for bookmark directory writability with file: /data/sensors/.evebox
2020-12-23 12:32:55 DEBUG evebox::commands::elastic_import: Bookmark directory is writable: directory="/data/sensors"
2020-12-23 12:33:55 ERROR evebox::commands::elastic_import: Failed to get Elasticsearch version, will try again: error=json: expected value at line 1 column 1

```

BTW I assume you and have fqdn as well as IP addresses. First thing I tried was to change everything to IP addresses.

And what is your recommended way of getting data into evebox from about half a dozen suricata instances (given that we have a ES cluster anyway)

---

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/russell_fulton/32/295_2.png) [@Russell\_Fulton](https://forum.suricata.io/u/Russell_Fulton)\
**Post date:** [December 23, 2020, 12:10am UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922/4 "2020-12-23T00:10:25Z")

</div>

solved it! I tried running strace to see what was happening under the hood. Evebox was trying to use the external proxy! Doh!

–noproxy flag ???

---

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/russell_fulton/32/295_2.png) [@Russell\_Fulton](https://forum.suricata.io/u/Russell_Fulton)\
**Post date:** [December 23, 2020, 8:47pm UTC](https://forum.suricata.io/t/problems-with-evebox-elastic-import/922/5 "2020-12-23T20:47:31Z")

</div>

Hmp!! I have just discovered the noproxy environment var! DOH!!
