# Import data into ES

**URL:** https://discuss.elastic.co/t/import-data-into-es/279044
**Category:** Logstash
**Created:** [July 19, 2021, 10:04am UTC](https://discuss.elastic.co/t/import-data-into-es/279044 "2021-07-19T10:04:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kfaf](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kfaf](https://discuss.elastic.co/u/kfaf)
#### Post date: [July 19, 2021, 10:04am UTC](https://discuss.elastic.co/t/import-data-into-es/279044/1 "2021-07-19T10:04:39Z")

</div>

Please i really need help.  
i want to import json file to my ES using logstash. but nothing goes well on my side.  
this is my logstash.conf:  
\<  
input  
{  
file  
{  
start\_position =\> "beginning"  
path =\> "C:\Users\Download\out2.json"  
sincedb\_path =\> "null"

```
	}
}

```

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

output{  
elasticsearch {  
hosts =\> "[http://localhost:9200](http://localhost:9200)"  
index =\> "test"  
}  
stdout { codec =\> rubydebug { metadata =\> true } }

# stdout { codec =\> dots }

}  
/\>

but i got this error:  
\<  
"Using bundled JDK: ""  
OpenJDK 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/sx074/Tools/logstash-7.13.2/logs which is now configured via log4j2.properties  
[2021-07-19T11:37:34,686][INFO][logstash.runner] Log4j configuration path used is: C:\Users\sx074\Tools\logstash-7.13.2\config\log4j2.properties  
[2021-07-19T11:37:34,704][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.13.2", "jruby.version"=\>"jruby 9.2.16.0 (2.5.7) 2021-03-03 f82228dc32 OpenJDK 64-Bit Server VM 11.0.11+9 on 11.0.11+9 +indy +jit [mswin32-x86\_64]"}  
[2021-07-19T11:37:34,905][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2021-07-19T11:37:35,524][INFO][logstash.config.source.local.configpathloader] No config files found in path {:path=\>"C:/Users/sx074/Tools/logstash-7.13.2/bin/logstash.conf"}  
[2021-07-19T11:37:35,535][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.  
[2021-07-19T11:37:35,905][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2021-07-19T11:37:40,939][INFO][logstash.runner] Logstash shut down.  
[2021-07-19T11:37:40,952][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.16.0.jar:?]  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.16.0.jar:?]  
at C\_3a\_.Users.sx074.Tools.logstash\_minus\_7\_dot\_13\_dot\_2.lib.bootstrap.environment.(C:\Users\sx074\Tools\logstash-7.13.2\lib\bootstrap\environment.rb:89) ~[?:?]  
/\>

---

<div class="post-metadata">

### Author: ![Cad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cad/32/86661_2.png) [@Cad](https://discuss.elastic.co/u/Cad)
#### Post date: [July 20, 2021, 8:17am UTC](https://discuss.elastic.co/t/import-data-into-es/279044/2 "2021-07-20T08:17:39Z")

</div>

Hi,

How did you run logstash ?  
Where is located your configuration file .conf ?

---

<div class="post-metadata">

### Author: ![kfaf](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kfaf](https://discuss.elastic.co/u/kfaf)
#### Post date: [July 20, 2021, 9:08am UTC](https://discuss.elastic.co/t/import-data-into-es/279044/3 "2021-07-20T09:08:03Z")

</div>

HI

- logstash -f logstash.conf

About my .conf file :  
input  
{  
file  
{  
start\_position =\> "beginning"  
path =\> "C:/Users/Download/out2.json"  
sincedb\_path =\> "null"

```
	}
}

```

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

output{  
elasticsearch {  
hosts =\> "[http://localhost:9200](http://localhost:9200)"  
index =\> "test"  
}  
stdout {}

}

---

<div class="post-metadata">

### Author: ![Cad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cad/32/86661_2.png) [@Cad](https://discuss.elastic.co/u/Cad)
#### Post date: [July 20, 2021, 9:29am UTC](https://discuss.elastic.co/t/import-data-into-es/279044/4 "2021-07-20T09:29:47Z")

</div>

It looks like you run the command in  
`C:/Users/sx074/Tools/logstash-7.13.2/bin`  
So with the command

> [@kfaf](#):
>
> logstash -f logstash.conf

You tell to logstash that the configuration file is in `C:/Users/sx074/Tools/logstash-7.13.2/bin` but it seems that is not the case according to the error :

> [@kfaf](#):
>
> No config files found in path {:path=\>"C:/Users/sx074/Tools/logstash-7.13.2/bin/logstash.conf"}  
> [2021-07-19T11:37:35,535][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.

So edit your run command with the full path to the conf file instead of just giving the name of the file.

---

<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: [August 17, 2021, 9:30am UTC](https://discuss.elastic.co/t/import-data-into-es/279044/5 "2021-08-17T09:30:29Z")

</div>

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