Unable to start logstash via conf file in windows

I am new to ELK. Installed ELK on Windows 7 desktop. Ensured i set the JAVA_HOME as per the guidelines. ELK services are running, i used nssm. I have a simple logstash.conf file to read tcp as below:

input {
tcp {
port => 5544
}
}

output {
elasticsearch {
host => "localhost"
protocol => "http"
}
}

I ran at cmd prompt using logstash -e 'input { stdin { } } output { stdout {} }' and it worked correctly.

When I try to run logstash using cmd line from bin directory where the conf file sits and give the below command I get the attached

error:
C:\ELK\logstash\bin>logstash -f logstash.conf
Settings: Default pipeline workers: 4
←[31mPipeline aborted due to error {:exception=>"LogStash::ConfigurationError",
:backtrace=>["C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-j
ava/lib/logstash/config/mixin.rb:88:in config_init'", "org/jruby/RubyHash.java: 1342:ineach'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4
.0-java/lib/logstash/config/mixin.rb:72:in config_init'", "C:/ELK/logstash/vend or/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/outputs/base.rb:7 9:ininitialize'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-
2.4.0-java/lib/logstash/output_delegator.rb:74:in register'", "C:/ELK/logstash/ vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline.rb:1 81:instart_workers'", "org/jruby/RubyArray.java:1613:in each'", "C:/ELK/logst ash/vendor/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/pipeline. rb:181:instart_workers'", "C:/ELK/logstash/vendor/bundle/jruby/1.9/gems/logsta
sh-core-2.4.0-java/lib/logstash/pipeline.rb:136:in run'", "C:/ELK/logstash/vend or/bundle/jruby/1.9/gems/logstash-core-2.4.0-java/lib/logstash/agent.rb:491:in
start_pipeline'"], :level=>:error}←[0m
stopping pipeline {:id=>"main"}
The signal HUP is in use by the JVM and will not work correctly on this platform

I also tried logstash -f "C:/ELK/logstash/bin/logstash.conf" no luck!

Please guide me what the issue is?

host => "localhost"

Change to:

hosts => ["localhost"]

Magnus, I did the change you suggested to logstash.conf and ran the same command logstash –f logstash.conf from the >bin directory. I also restarted the ELK services and then restarted the desktop too.

I get a little different error now. Should ELK files be in the same path as Java? My Java obviously is in C:/Program Files is that the issue.

Drop protocol => "http" from your config.

It's seems you're following obsolete documentation. Be careful about that, and make sure you consult the official documentation of the Logstash release you're running.

Please don't post screenshots. Use copy/paste.