Logstash cannot find config file

Hi guys ,

I am trying to run logstash as a container on marathon framework (DCOS) taking input from Kafka .
the marathon json file fetches the uri from gist which has the logstash.conf file . I can also see the conf file in the sandbox. But logstash is not able to load the conf flie .
this is the json file for launching logstash

   {
      "id": "logstash",
      "cmd": "logstash -t -f ./logstash.conf",
      "cpus": 0.4,
      "mem": 512,
      "ports":[5000],
      "requirePorts":true,
      "instances": 1,
      "uris": [
            "https://gist.githubusercontent.com/SMR39/efc288663949a47277bc/raw/4b393fcef342ee6b1194b35463cd6179fe87e417/logstash.conf"
        ],
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "logstash:2.2",
          "network": "HOST"
        }
      }
    }

The stdout looks like this

Starting task logstash.1fb3452b-f2db-11e5-a4e9-0242355bdcac
Error: No config files found: /logstash.conf
Can you make sure this path is a logstash config file?

Looks like it's not accepting the . before and so it's looking in root.

@warkolm found it its /mnt/mesos/sandbox/logstash.conf :) it uses a different path for docker

but I am still not able to get past

Expected one of #, } at line 3, column 25 (byte 46) after input {  
  kafka { 
    zk_connect => 172.16

Maybe if you past your config we can help.

It's solved thank you was a double quote problem ..

@Shashi_Ravula how can you resolved your probleme.i still have the same error.
C:\logstash-5.4.0\bin>logstash -f sample.conf
Could not find log4j2 configuration at path /logstash-5.4.0/config/log4j2.properties. Using default config which logs to console
14:11:58.149 [LogStash::Runner] INFO logstash.agent - No config files found in path {:path=>"C:/logstash-5.4.0/bin/sample.conf"}
14:11:58.154 [LogStash::Runner] ERROR logstash.agent - failed to fetch pipeline configuration {:message=>"No config files found: sample.conf. Can you make sure this path is a logstash config file?"}
and this is config file:
input { stdin { } }
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
thank you for your help.

@baha1, it seems that sample.conf is not in the C:\logstash-5.4.0\bin directory. Where is it? You should perhaps specify a full path to the configuration file, e.g. logstash -f C:\path\to\sample.conf

@theuntergeek thank you so match for your answer.i have the file sample.conf in C:\logstash-5.4.0\bin\sample.conf.
that what i excute in cmd commande:
C:\logstash-5.4.0\bin>logstash -f sample.conf

You should still specify the full path to the configuration file. I also don't recommend keeping configuration files in the bin directory.

i have the folder logstash,so what i have to do next,tell me all the steep please.

@theuntergeek it works fine now,thanks.