# Can't import data to elasticsearch from csv, stops at "Successfully started Logstash API endpoint {:port=\>9600}"

**URL:** <https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173>\
**Category:** Logstash\
**Created:** [February 5, 2019, 6:02pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173 "2019-02-05T18:02:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_Yanez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pablo_yanez/32/40584_2.png) [@Pablo\_Yanez](https://discuss.elastic.co/u/Pablo_Yanez)\
**Post date:** [February 5, 2019, 6:02pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/1 "2019-02-05T18:02:45Z")

</div>

I'm working on CentOS 7, this is my configuration file for Logstash:

> input {  
> file {  
> path =\> "/etc/logstash/files/Chile.csv"  
> start\_position =\> "beginning"  
> }  
> }  
> filter {  
> csv {  
> columns =\> ["ID","region","population","sex","age","education","income","statusquo","vote"]  
> separator =\> ","  
> }  
> }  
> output {  
> stdout { codec =\> json\_lines }  
> elasticsearch {  
> "hosts" =\> "[http://10.33.32.194:9200](http://10.33.32.194:9200)"  
> "index" =\> "elecciones"  
> }  
> }

And this is the response:

> Feb 05 15:01:46 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:46,926][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es\_version=\>6}  
> Feb 05 15:01:46 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:46,929][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document \_type {:es\_version=\>6}  
> Feb 05 15:01:46 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:46,963][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::Elasticsearch", :hosts=\>["[http://10.33.32.194:9200](http://10.33.32.194:9200)"]}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,010][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,030][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>60001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword", "ignore\_above"=\>256}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date"}, "@version"=\>{"type"=\>"keyword"}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,355][INFO][logstash.inputs.file] No sincedb\_path set, generating one based on the "path" setting {:sincedb\_path=\>"/var/lib/logstash/plugins/inputs/file/.sincedb\_a853088c41dbc64d8b4fd23b46272715", :path=\>["/etc/logstash/files/Chile.csv"]}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,402][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x33f1a1a2 run\>"}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,484][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
> Feb 05 15:01:47 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:47,515][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections  
> Feb 05 15:01:48 caas-lv3-web194 logstash[7719]: [2019-02-05T15:01:48,057][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

And it does not import the data from the file.

---

<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:** [February 5, 2019, 6:08pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/2 "2019-02-05T18:08:05Z")

</div>

My guess is that there is a sincedb that is telling it it has already read the file, and it is waiting for data to be appended to it. Try adding

```
 sincedb_path => "/dev/null"

```

to the file input. If that does not help then enable "--log.level trace" and see what filewatch has to say.

---

<div class="post-metadata">

**Author:** ![Pablo\_Yanez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pablo_yanez/32/40584_2.png) [@Pablo\_Yanez](https://discuss.elastic.co/u/Pablo_Yanez)\
**Post date:** [February 5, 2019, 6:09pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/3 "2019-02-05T18:09:26Z")

</div>

I actually deleted that part, because it was something I was just trying. But is actually the same thing if I run it without it. Thx for replaying

I tried adding sincedb\_path =\> "/dev/null" and it made it not even run, it just restarted every 2 minutes.

---

<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:** [February 5, 2019, 6:18pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/4 "2019-02-05T18:18:34Z")

</div>

> [@Pablo\_Yanez](#):
>
> I tried adding sincedb\_path =\> "/dev/null" and it made it not even run, it just restarted every 2 minutes.

Does it log an error?

---

<div class="post-metadata">

**Author:** ![Pablo\_Yanez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pablo_yanez/32/40584_2.png) [@Pablo\_Yanez](https://discuss.elastic.co/u/Pablo_Yanez)\
**Post date:** [February 5, 2019, 6:20pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/5 "2019-02-05T18:20:38Z")

</div>

it worked 🙂 thx i write it the wrong way, but adding the sincedb\_path made it work, ty

---

<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:** [March 5, 2019, 6:20pm UTC](https://discuss.elastic.co/t/cant-import-data-to-elasticsearch-from-csv-stops-at-successfully-started-logstash-api-endpoint-port-9600/167173/6 "2019-03-05T18:20:43Z")

</div>

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