# Logstash import of JSON-format file fails

**URL:** <https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773>\
**Category:** Logstash\
**Created:** [June 16, 2015, 5:54pm UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773 "2015-06-16T17:54:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnwlambert](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@johnwlambert](https://discuss.elastic.co/u/johnwlambert)\
**Post date:** [June 16, 2015, 5:54pm UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773/1 "2015-06-16T17:54:57Z")

</div>

I am trying to input logs from my server log file. This is my config file.

input {  
file {  
path =\> "/oncology-server/log/service.log"  
start\_position =\> "beginning"  
}  
}

filter {  
json {  
source =\> "message"  
remove\_field =\> ["message"]  
}  
}

output {  
stdout { codec =\> rubydebug }  
elasticsearch { host =\> localhost }  
}

Nothing shows up in elastic search however. Any help?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 17, 2015, 4:08am UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773/2 "2015-06-17T04:08:57Z")

</div>

Does anything show in stdout?

---

<div class="post-metadata">

**Author:** ![johnwlambert](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@johnwlambert](https://discuss.elastic.co/u/johnwlambert)\
**Post date:** [June 17, 2015, 4:42pm UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773/3 "2015-06-17T16:42:13Z")

</div>

this is what stdout says, with elastic search running in the background:

pa4tsp3w10pm:bin tempadmin$ ./logstash -f logstash-json6-filter.conf  
Jun 17, 2015 9:34:49 AM org.elasticsearch.node.internal.InternalNode   
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] version[1.5.1], pid[1033], build[5e38401/2015-04-09T13:41:35Z]  
Jun 17, 2015 9:34:49 AM org.elasticsearch.node.internal.InternalNode   
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] initializing ...  
Jun 17, 2015 9:34:49 AM org.elasticsearch.plugins.PluginsService   
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] loaded [], sites []  
Jun 17, 2015 9:34:55 AM org.elasticsearch.node.internal.InternalNode   
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] initialized  
Jun 17, 2015 9:34:55 AM org.elasticsearch.node.internal.InternalNode start  
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] starting ...  
Jun 17, 2015 9:34:55 AM org.elasticsearch.transport.TransportService doStart  
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] bound\_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish\_address {inet[/10.1.19.125:9301]}  
Jun 17, 2015 9:34:55 AM org.elasticsearch.discovery.DiscoveryService doStart  
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] elasticsearch/UQf8QITqRRqdUsyqVCK-iw  
[2015-06-17 09:34:58,885][INFO][cluster.service] [Baron Brimstone] added {[logstash-pa4tsp3w10pm.my.company.com-1033-9786][UQf8QITqRRqdUsyqVCK-iw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9301]]{data=false, client=true},}, reason: zen-disco-receive(join from node[[logstash-pa4tsp3w10pm.my.company.com-1033-9786][UQf8QITqRRqdUsyqVCK-iw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9301]]{data=false, client=true}])  
Jun 17, 2015 9:34:59 AM org.elasticsearch.cluster.service.InternalClusterService$UpdateTask run  
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] detected\_master [Baron Brimstone][HDV1qln6TQWqCIqG9te7Dw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9300]], added {[Baron Brimstone][HDV1qln6TQWqCIqG9te7Dw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9300]],}, reason: zen-disco-receive(from master [[Baron Brimstone][HDV1qln6TQWqCIqG9te7Dw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9300]]])  
Jun 17, 2015 9:34:59 AM org.elasticsearch.node.internal.InternalNode start  
INFO: [logstash-pa4tsp3w10pm.my.company.com-1033-9786] started  
Logstash startup completed  
^Z  
[2]+ Stopped ./logstash -f logstash-json6-filter.conf  
pa4tsp3w10pm:bin tempadmin$ ls[2015-06-17 09:36:47,021][INFO][cluster.service] [Baron Brimstone] removed {[logstash-pa4tsp3w10pm.my.company.com-1033-9786][UQf8QITqRRqdUsyqVCK-iw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9301]]{data=false, client=true},}, reason: zen-disco-node\_failed([logstash-pa4tsp3w10pm.my.company.com-1033-9786][UQf8QITqRRqdUsyqVCK-iw][[pa4tsp3w10pm.my.company.com](http://pa4tsp3w10pm.my.company.com)][inet[/10.1.19.125:9301]]{data=false, client=true}), reason failed to ping, tried [3] times, each with maximum [30s] timeout

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 18, 2015, 1:30am UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773/4 "2015-06-18T01:30:46Z")

</div>

I meant stdout, the one defined in your config.

But it looks like LS cannot talk to ES, try switching to the HTTP protocol and see if that help.

---

<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:** [July 6, 2017, 5:37am UTC](https://discuss.elastic.co/t/logstash-import-of-json-format-file-fails/23773/5 "2017-07-06T05:37:09Z")

</div>


