Problem on Logstash setup

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

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

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.

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

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.

Hey,

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

Tks for the help