# Logstash silently fails on trying to import csv

**URL:** <https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651>\
**Category:** Logstash\
**Created:** [June 14, 2015, 8:11pm UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651 "2015-06-14T20:11:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://discuss.elastic.co/u/juju)\
**Post date:** [June 14, 2015, 8:11pm UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/1 "2015-06-14T20:11:23Z")

</div>

Hello,

I'm trying to import a csv file into ELK and it fails silently even with output set to stdout/debug.

```
    $ cat /vagrant/sinkhole.csv | /opt/logstash/bin/logstash -f /vagrant/logstash-sinkhole.conf | tee log
Jun 14, 2015 8:01:51 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-elk-vagrant-32003-7948] version[1.5.1], pid[32003], build[5e38401/2015-04-09T13:41:35Z]
Jun 14, 2015 8:01:51 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-elk-vagrant-32003-7948] initializing ...
Jun 14, 2015 8:01:51 PM org.elasticsearch.plugins.PluginsService <init>
INFO: [logstash-elk-vagrant-32003-7948] loaded [], sites []
Jun 14, 2015 8:01:54 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-elk-vagrant-32003-7948] initialized
Jun 14, 2015 8:01:54 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-elk-vagrant-32003-7948] starting ...
Jun 14, 2015 8:01:54 PM org.elasticsearch.transport.TransportService doStart
INFO: [logstash-elk-vagrant-32003-7948] bound_address {inet[/0:0:0:0:0:0:0:0:9302]}, publish_address {inet[/10.0.2.15:9302]}
Jun 14, 2015 8:01:54 PM org.elasticsearch.discovery.DiscoveryService doStart
INFO: [logstash-elk-vagrant-32003-7948] elasticsearch/XZ4SjlIgQZWnvmrjEJ6Iag
Jun 14, 2015 8:01:57 PM org.elasticsearch.cluster.service.InternalClusterService$UpdateTask run
INFO: [logstash-elk-vagrant-32003-7948] detected_master [Grizzly][UMAeGzFgRb2TrVyY-0CjJw][elk-vagrant][inet[/127.0.0.1:9300]]{max_local_storage_nodes=1}, added {[Grizzly][UMAeGzFgRb2TrVyY-0CjJw][elk-vagrant][inet[/127.0.0.1:9300]]{max_local_storage_nodes=1},[logstash-elk-vagrant-31278-9802][pHxHzJoGSyiP03Fz_O6QFw][elk-vagrant][inet[/10.0.2.15:9301]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Grizzly][UMAeGzFgRb2TrVyY-0CjJw][elk-vagrant][inet[/127.0.0.1:9300]]{max_local_storage_nodes=1}])
Jun 14, 2015 8:01:57 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-elk-vagrant-32003-7948] started
$

```

I'm using a vagrant ELK and config for sinkhole as present here [https://github.com/juju4/ELK](https://github.com/juju4/ELK)  
Re-reading of file is force with since\_db and start\_position

Any pointer to understand why nothing is parsed and why no warning/errors?

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 14, 2015, 11:14pm UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/2 "2015-06-14T23:14:01Z")

</div>

I've had this happen if the file doesn't contain a CR/LF at the end of it, I'd try opening it in vim etc and then adding one and see if that works.

---

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://discuss.elastic.co/u/juju)\
**Post date:** [June 15, 2015, 12:11am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/3 "2015-06-15T00:11:21Z")

</div>

Thanks Mark. Already tried that. Checked again to be sure but it still fails.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2015, 12:14am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/4 "2015-06-15T00:14:53Z")

</div>

What does your config look like?  
Have you tried to change the output to just stdout to make sure data is making it through?

---

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://discuss.elastic.co/u/juju)\
**Post date:** [June 15, 2015, 1:27am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/5 "2015-06-15T01:27:18Z")

</div>

you can see the config in the github link and yeah, I tried with and without "stdout { codec =\> rubydebug }"

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 15, 2015, 7:03am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/6 "2015-06-15T07:03:36Z")

</div>

In the example output you are sending data into Logstash through stdin, although in the configuration file you have not defined stdin as an input, only a file path that is different from the one you are testing with: /home/vagrant/logs/sinkhole-\*.csv. Does this location contain any files to be processed?

---

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://discuss.elastic.co/u/juju)\
**Post date:** [June 17, 2015, 2:54am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/7 "2015-06-17T02:54:31Z")

</div>

I tried both as input file (yes log dir has one file) and stdin input and in both case, I just have logstash starting but displaying nothing else.  
Elasticsearch stays empty

```
$ /opt/logstash/bin/logstash -f /vagrant/logstash-sinkhole.conf
$ cat file | /opt/logstash/bin/logstash -f /vagrant/logstash-sinkhole.conf
[...]
INFO: [logstash-elk-vagrant-20285-9784] started

```

and after nothing more

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2015, 3:38am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/8 "2015-06-17T03:38:22Z")

</div>

You won't get anything else as the output sends to ES, not stdout.

---

<div class="post-metadata">

**Author:** ![juju](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@juju](https://discuss.elastic.co/u/juju)\
**Post date:** [June 18, 2015, 12:33am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/9 "2015-06-18T00:33:50Z")

</div>

Like input, I tried both configuration (output stdout or ES) and checked both without anythink.  
only have the index properties/fields made available but no data.

---

<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:** [July 6, 2017, 5:37am UTC](https://discuss.elastic.co/t/logstash-silently-fails-on-trying-to-import-csv/2651/10 "2017-07-06T05:37:10Z")

</div>


