# Logstash has fetched the data but not shipped into Elasticsearch no error in logstash cmd

**URL:** <https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632>\
**Category:** Logstash\
**Created:** [December 5, 2019, 7:36am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632 "2019-12-05T07:36:52Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 7:36am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/1 "2019-12-05T07:36:52Z")

</div>

Hi,

I am fetching data from another database server.  
data is fetching but not inserted into elastcisearch,  
No error is showing in logstash cmd

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 9:08am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/2 "2019-12-05T09:08:14Z")

</div>

Hi @swati_dupare  
Thank you for reaching out. I've moved you topic from kibana to logstash, since it's logstash related, could you add some details, e.g. your logstash pipeline configuration, this would help debugging your problem  
Best,  
Matthias

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 9:34am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/3 "2019-12-05T09:34:22Z")

</div>

> [@matw](#):
>
> logstash pipeline configuration

input {  
jdbc {  
jdbc\_driver\_class =\> "com.mysql.cj.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://remote-ip-address:3306/testdb?serverTimezone=Asia/Kolkata"  
jdbc\_user =\> "root"  
jdbc\_password =\> "xxxx"  
tracking\_column =\> "unix\_ts\_in\_secs"  
use\_column\_value=\>true  
statement =\> "select \* from user"  
schedule =\> "0 \*/15 \* \* \* \*"  
}  
}

output {  
elasticsearch {  
document\_type =\> "doc"  
document\_id=\> "%{id}"  
index =\> "testindex"  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
}  
stdout{

codec =\> rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 9:42am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/4 "2019-12-05T09:42:10Z")

</div>

so it's written to stdout, but not to Elasticsearch?

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 9:46am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/5 "2019-12-05T09:46:55Z")

</div>

Means..?  
Actually,If connect to localhost , it's working fine ,but when i trying to connect it to remote database server data is not pushed to elasticsearch

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 9:49am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/6 "2019-12-05T09:49:12Z")

</div>

You're receiving the data from localhost successfully, so it's written into Elasticsearch. But it doesn't work when the database is remote? thx!

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 9:54am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/7 "2019-12-05T09:54:08Z")

</div>

so, What I need to do.??

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 10:05am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/8 "2019-12-05T10:05:41Z")

</div>

You need to make sure that logstash can connect to that remote db server, first you could check it it's possible to connect to the db instance without logstash.

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 10:09am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/9 "2019-12-05T10:09:39Z")

</div>

Actually,when I run my logstash configuration file "select \* from user" statement is executed and it shows data from remote server database in logstash cmd,but not pushing into elasticsearch

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 10:11am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/10 "2019-12-05T10:11:36Z")

</div>

> [@swati\_dupare](#):
>
> Actually,If connect to localhost , it's working fine ,but when i trying to connect it to remote database server data is not pushed to elasticsearch

so i misunderstood this, it doesn't work when Elasticsearch is remote, just when local?

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 10:19am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/11 "2019-12-05T10:19:00Z")

</div>

yes.. when connected to local, it's works properly.

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 11:03am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/12 "2019-12-05T11:03:11Z")

</div>

then you should try if you can connect to your remote ES machine without logstash (e.g. with curl )

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 5, 2019, 11:23am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/13 "2019-12-05T11:23:47Z")

</div>

my logstash and elasticsearch are on same server only database which I am trying to connect is on another server

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [December 5, 2019, 11:28am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/14 "2019-12-05T11:28:05Z")

</div>

> [@swati\_dupare](#):
>
> Actually,when I run my logstash configuration file "select \* from user" statement is executed and it shows data from remote server database in logstash cmd,but not pushing into elasticsearch

So the data is displayed in logstash (how?) but not stored in elasticsearch? could you try to remove` document_id=> "%{id}"` to see if it works in this case?  
thx

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 6, 2019, 5:02am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/15 "2019-12-06T05:02:51Z")

</div>

Yeah... It's working now.. issue with duplicate document ID.  
Thanx

---

<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:** [January 3, 2020, 5:02am UTC](https://discuss.elastic.co/t/logstash-has-fetched-the-data-but-not-shipped-into-elasticsearch-no-error-in-logstash-cmd/210632/16 "2020-01-03T05:02:55Z")

</div>

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