# Logstash ('No configuration found in the configured sources')

**URL:** <https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765>\
**Category:** Logstash\
**Created:** [March 1, 2021, 9:04am UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765 "2021-03-01T09:04:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 1, 2021, 9:04am UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/1 "2021-03-01T09:04:39Z")

</div>

Hi everyone, I tried to load the JSON file in elastic search through Logstash in windows10.

I show you my "MATTEOLOGSTASHCONF.conf" file:  
input {  
file {  
start\_position =\> "beginning"  
path =\> "C:/Users/matte/Desktop/Magistrale/"2 ANNO"/TESI/query\_2.json"  
sincedb\_path =\> "/dev/null"  
}  
}

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "Mqattep"  
document\_type =\> "doc\_tty"  
}  
stdout{}  
}

Following, this is my command line in cmd:  
logstash -f C:/Users/matte/Desktop/TESI/logstash-7.11.1/config/MATTEOLOGSTASHCONF.conf

And this is what the program returns:  
Using JAVA\_HOME defined java: C:\Program Files\Java\jdk-12.0.1  
WARNING, using JAVA\_HOME while Logstash distribution comes with a bundled JDK  
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
Sending Logstash logs to C:/Users/matte/Desktop/TESI/logstash-7.11.1/logs which is now configured via log4j2.properties  
[2021-03-01T09:50:50,261][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.11.1", "jruby.version"=\>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 12.0.1+12 on 12.0.1+12 +indy +jit [mswin32-x86\_64]"}  
[2021-03-01T09:50:50,544][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2021-03-01T09:50:51,159][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.  
[2021-03-01T09:50:51,667][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2021-03-01T09:50:56,380][INFO][logstash.runner] Logstash shut down.  
[2021-03-01T09:50:56,418][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit  
org.jruby.exceptions.SystemExit: (SystemExit) exit  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.13.0.jar:?]  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.13.0.jar:?]  
at C\_3a\_.Users.matte.Desktop.TESI.logstash\_minus\_7\_dot\_11\_dot\_1.lib.bootstrap.environment.(C:\Users\matte\Desktop\TESI\logstash-7.11.1\lib\bootstrap\environment.rb:89) ~[?:?]

What are my errors?

Also, I tried to write the pipelines.yml:  
pipeline.id: test  
pipeline.workers: 1  
pipeline.batch.size: 500  
queue.type: persisted  
queue.max\_bytes: 1gb # Default = 1024mb  
queue.drain: true  
pipeline.output.workers: 1  
path.config: "C:/Users/matte/Desktop/TESI/logstash-7.11.1/config/MATTEOLOGSTASHCONF.conf"

I run the command line both with pipelines.yml file and without it.

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [March 1, 2021, 1:39pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/2 "2021-03-01T13:39:19Z")

</div>

The error `No configuration found in the configured sources.` means it can't find the file you entered. I would verify that path.

Also on Windows it will be `sincedb_path => "NUL"` instead of `sincedb_path => "/dev/null"` but that is not your current problem.

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 1, 2021, 4:58pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/3 "2021-03-01T16:58:06Z")

</div>

Thank you,

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 1, 2021, 4:58pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/4 "2021-03-01T16:58:56Z")

</div>

The path on "2 ANNO" was wrong.

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 1, 2021, 6:39pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/5 "2021-03-01T18:39:11Z")

</div>

@aaron-nimocks please, can you help me again?

I want to insert into ES (elasticsearch) the json file, NOT line for line but the datas of the json file.  
Example of json:

[{"\_id": {"$oid": "603bf573e462e7ea44be9432" }, "NUM\_TEL": "89123732", "Assente": true},{ "\_id": { "$oid": "603bf573e462e7ea44be9433" }, "NUM\_TEL": "318731123", "Assente": true}]

When I load the json file in elasticsearch and i get wirh command: GET /mattep/\_search,  
it returns:  
hit:{  
[...]  
"message" : " "$oid": "603bf573e462e7ea44be9432"",  
[...]},  
hit{[...]  
"message" : " "$NUM\_TEL": "89123732"",  
[...]}

I tried to write different .conf files. It is the last file:

input {

```
file {
		type => "json"
		start_position => "beginning"
		path => "C:/Users/matte/Desktop/Magistrale/query_2.json"
		sincedb_path => "NUL"
}

```

}

filter { json { source =\> "message" } }

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "mattep"  
document\_type =\> "json"  
}

```
stdout { codec => rubydebug }

```

}

My goal is to put the data into Elasticsearch with the json file so that I can show it with Kibana.  
I would to see, when I run "GET /MY\_INDEX/\_search [...]":

hit:{  
[...]  
"\_id" : "603bf573e462e7ea44be9432",  
"NUM\_TEL": 2990129039,  
[...]}

I've been reading every topic and document all afternoon.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 1, 2021, 7:45pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/6 "2021-03-01T19:45:32Z")

</div>

> [@matteo001](#):
>
> I want to insert into ES (elasticsearch) the json file, NOT line for line but the datas of the json file.

Use a multiline codec on the file input. There is an example [here](https://discuss.elastic.co/t/ingest-multiple-json-files-under-a-folder/190026/5).

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 1, 2021, 8:18pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/7 "2021-03-01T20:18:37Z")

</div>

I thank you tour reply but I don't understand it.  
This is my conf file:  
input {  
file {  
start\_position =\> "beginning"  
path =\> "C:/Users/matte/Desktop/Magistrale/query\_2.json"  
sincedb\_path =\> "NUL"  
codec =\> multiline { pattern =\> "^}" negate =\> true what =\> next  
auto\_flush\_interval =\> 1 }  
}  
}  
filter { json { source =\> "message" } }  
output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "matte0\_jud"  
document\_type =\> "json"  
}  
stdout { codec =\> rubydebug }  
}

I m sorry if I tell you some bulllshit (if it is the term in english) .  
SO, what is the problem in my conf file?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 1, 2021, 8:26pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/8 "2021-03-01T20:26:49Z")

</div>

> [@matteo001](#):
>
> what is the problem in my conf file?

I have no idea. What do you not like about the result?

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 2, 2021, 3:42pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/9 "2021-03-02T15:42:50Z")

</div>

This not good because I Have:  
[...]  
"hits" : [  
{  
"\_index" : "mattep",  
"\_type" : "json",  
"\_id" : "uanr7ncB22tqv8EEWKTF",  
"\_score" : 1.0,  
"\_source" : {  
"tags" : [  
"\_jsonparsefailure"  
],  
"@timestamp" : "2021-03-01T17:51:41.506Z",  
"@version" : "1",  
"type" : "json",  
"message" : " "$oid": "603bf573e462e7ea44be9432"",  
"path" : "C:/Users/matte/Desktop/Magistrale/query\_2.json",  
"host" : "DESKTOP-6FJNOJN"  
}  
},  
{  
"\_index" : "mattep",  
"\_type" : "json",  
"\_id" : "u6nr7ncB22tqv8EEWKTF",  
"\_score" : 1.0,  
"\_source" : {  
"tags" : [  
"\_jsonparsefailure"  
],  
"@timestamp" : "2021-03-01T17:51:41.509Z",  
"@version" : "1",  
"type" : "json",  
"message" : "},{",  
"path" : "C:/Users/matte/Desktop/Magistrale/query\_2.json",  
"host" : "DESKTOP-6FJNOJN"  
}  
},  
{  
"\_index" : "mattep",  
"\_type" : "json",  
"\_id" : "Iqnr7ncB22tqv8EEWKbG",  
"\_score" : 1.0,  
"\_source" : {  
"tags" : [  
"\_jsonparsefailure"  
],  
"@timestamp" : "2021-03-01T17:51:41.646Z",  
"@version" : "1",  
"type" : "json",  
"message" : " "$oid": "603bf574e462e7ea44be945f"",  
"path" : "C:/Users/matte/Desktop/Magistrale/query\_2.json",  
"host" : "DESKTOP-6FJNOJN"  
}  
},  
[....]

Instead, I want to have NO MESSAGE  
"message" : "$\_id": "603bf573e462e7ea44be9432"",

but I want:  
{  
'\_id': "603bf573e462e7ea44be9432",  
'NUM\_TEL' : '089328192123',  
...}

Did you understand?  
In a nutshell, I would like to insert a list of KEY: VALUE in elasticsearch by giving it a json file as input.  
When I do a get I would like to see the data as JSON output in ES, not have the json unpacked in rows, the json must be inserted into the ES data.

---

<div class="post-metadata">

**Author:** ![matteo001](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@matteo001](https://discuss.elastic.co/u/matteo001)\
**Post date:** [March 2, 2021, 5:48pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/10 "2021-03-02T17:48:26Z")

</div>

I'd like to insert the value in ES so, i can shoe it with get command.  
Example:  
JSon datas:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c6aea72f7758342189c0e541782ad0f9a3b9a34b.png)  
I want it in ES, so:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/1/818cf38359ccb488b3b17708403388c2d6804da3.png) .

After, I 'd like to show these results in kibana canvas (and also here i have a few problems)

I don't understand what is my problem! .conf file? Json file? ....????

Thank you for your responses in advance. 🙏

---

<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:** [March 30, 2021, 5:48pm UTC](https://discuss.elastic.co/t/logstash-no-configuration-found-in-the-configured-sources/265765/11 "2021-03-30T17:48:55Z")

</div>

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