# Error Importing csv files using logstash

**URL:** <https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113>\
**Category:** Logstash\
**Created:** [April 6, 2018, 1:59pm UTC](https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113 "2018-04-06T13:59:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)\
**Post date:** [April 6, 2018, 1:59pm UTC](https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113/1 "2018-04-06T13:59:53Z")

</div>

Hey Guys,

I have been struggling to get through this issue from past one week.  
Trying to upload a sample csv file using logstash and keep getting error, digged up in lot many documents and places and still didnt get any solution.

**cmd i used :** /usr/share/logstash/bin/logstash -f sample.config  
**OUTPUT:** Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties  
Elasticsearch Unreachable: [[http://localhost:9200/](http://localhost:9200/)][Manticore::SocketException] Connection refused (Connection refused)  
No Available connections

Got these from /var/logs/logstash/logstash-plain.log

[ERROR][logstash.licensechecker.licensemanager] Unable to retrieve license information from license server {:message=\>"Elasticsearch Unreachable: [[http://logstash\_system:xxxxxx@localhost:9200/](http://logstash_system:xxxxxx@localhost:9200/)][Manticore::SocketException] Connection refused (Connection refused)", :class=\>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}

Have anybody faced this type of issue before, requesting your help.

Thanks  
Gautham

---

<div class="post-metadata">

**Author:** ![camarar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/camarar/32/20476_2.png) [@camarar](https://discuss.elastic.co/u/camarar)\
**Post date:** [April 6, 2018, 3:02pm UTC](https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113/2 "2018-04-06T15:02:33Z")

</div>

Hi @Gauti,

Could you verify if elasticsearch is up? You can identify in elasticsearch logs or can try send telnet command "telnet localhost 9200".

I think that there is other logstash config file trying to connect with elasticsearch in this url [[http://logstash\_system:xxxxxx@localhost:9200/](http://logstash_system:xxxxxx@localhost:9200/)]. Check if you have another config file in /logstash/conf.d/.

---

<div class="post-metadata">

**Author:** ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)\
**Post date:** [April 9, 2018, 9:43am UTC](https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113/3 "2018-04-09T09:43:13Z")

</div>

hi @camarar

I had some issue connecting with localhost, now the issue is resolved and i'm able to telnet the localhost with port 9200

had tried running the csv upload command now and got the error  
[FATAL][logstash.runner] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.

I have logstash service running already.

cmd i tried : /usr/share/logstash -f test.config

Also logstash/conf.d directory is empty.

Thanks  
Gautham

---

<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:** [May 7, 2018, 9:43am UTC](https://discuss.elastic.co/t/error-importing-csv-files-using-logstash/127113/4 "2018-05-07T09:43:17Z")

</div>

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