# Problem on Logstash setup

**URL:** <https://discuss.elastic.co/t/problem-on-logstash-setup/52405>\
**Category:** Logstash\
**Created:** [June 10, 2016, 5:15am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405 "2016-06-10T05:15:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ybritto](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@ybritto](https://discuss.elastic.co/u/ybritto)\
**Post date:** [June 10, 2016, 5:15am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/1 "2016-06-10T05:15:42Z")

</div>

Hi,

I'm new on ELK stack. In fact, I'm in the first steps of.

I was following this tutorial [https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html](https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html)

Everything was doing good until the step where I've to run the command: curl -XGET 'localhost:9200/logstash-2016.06.10/\_search?q=response=200'

I got the message "curl: (6) Could not resolve host: 'localhost"

But if I change the command to curl -XGET "localhost:9200/logstash-2016.06.10/\_search?q=response=200" (I changed the quote) I got this message

curl: (7) Failed to connect to localhost port 9200: Connection refused

I'm trying to run this on my PC with a Windows 7, btw.

How can I fix that?

Sorry about this newbie question.  
Let me know if you need any other information

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 10, 2016, 5:46am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/2 "2016-06-10T05:46:35Z")

</div>

> I got the message "curl: (6) Could not resolve host: 'localhost"

Are you sure the single quote in your command actually is a straight single quote and not something else? Microsoft programs are known for screwing this up.

> curl: (7) Failed to connect to localhost port 9200: Connection refused

Elasticsearch isn't running, or it's running and not answering on port 9200 (which would be weird since that's the default). Alternatively you have a firewall blocking the access.

---

<div class="post-metadata">

**Author:** ![ybritto](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@ybritto](https://discuss.elastic.co/u/ybritto)\
**Post date:** [June 10, 2016, 1:43pm UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/3 "2016-06-10T13:43:27Z")

</div>

Hey, tks for your reply,

A stupid question, Should I start elasticsearch first and then logstash?  
Cause, following the tutorial, nothing about start Elasticsearch was mentioned.

Plus, I turn off all my firewall configurations and about the quotes, I input that again, certifying that it's the right one and I got the same error.

Tks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 13, 2016, 5:45am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/4 "2016-06-13T05:45:57Z")

</div>

> A stupid question, Should I start elasticsearch first and then logstash?

Shouldn't matter since LS retries failing requests, but LS needs ES and not vice versa so starting ES first makes good sense.

---

<div class="post-metadata">

**Author:** ![ybritto](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@ybritto](https://discuss.elastic.co/u/ybritto)\
**Post date:** [June 16, 2016, 12:27am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/5 "2016-06-16T00:27:53Z")

</div>

Hey,

Again tks for your answer.  
I started ES up and everything works fine.

Tks for the help

---

<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, 4:52am UTC](https://discuss.elastic.co/t/problem-on-logstash-setup/52405/6 "2017-07-06T04:52:37Z")

</div>


