# Couchbase elasticsearch sync issue

**URL:** <https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252>\
**Category:** Elasticsearch\
**Created:** [October 5, 2012, 1:25pm UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252 "2012-10-05T13:25:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amy](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Amy](https://discuss.elastic.co/u/Amy)\
**Post date:** [October 5, 2012, 1:25pm UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252/1 "2012-10-05T13:25:36Z")

</div>

I've been investigating whether to use couchbase with elasticsearch.  
There's an excellent blog[http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search](http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search)on how to set this up. I have one issue.  
If elasticsearch is down, and you send a document to couchbase, then bring  
back up elasticsearch, the document won't be indexed by elasticsearch.  
I've tried flushing the index to have elasticsearch pick up the document,  
but flushing doesn't seem to work. In fact, I see that only half the shards  
flushed successfully.  
curl -XPOST [http://localhost:9200/beer-sample/\_flush](http://localhost:9200/beer-sample/_flush)  
{"ok":true,"\_shards":{"total":10,"successful":5,"failed":0}}  
I'm not sure if this is an issue as half my shards seem to be under the  
name "Unassigned".  
My only current solution is to restart Couchbase, but obviously I wouldn't  
want to do that in production.  
Am I missing something?

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [October 6, 2012, 3:55am UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252/2 "2012-10-06T03:55:21Z")

</div>

Hi Amy,

I think that's really the Q for CouchBase people. I spoke to the author of  
that plugin and if I remember correctly, he said CouchBase should attempt  
reindexing. So I'd check with CouchBase people.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Friday, October 5, 2012 9:25:36 AM UTC-4, Amy wrote:

> I've been investigating whether to use couchbase with elasticsearch.  
> There's an excellent blog[http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search](http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search)on how to set this up. I have one issue.  
> If elasticsearch is down, and you send a document to couchbase, then bring  
> back up elasticsearch, the document won't be indexed by elasticsearch.  
> I've tried flushing the index to have elasticsearch pick up the document,  
> but flushing doesn't seem to work. In fact, I see that only half the shards  
> flushed successfully.  
> curl -XPOST [http://localhost:9200/beer-sample/\_flush](http://localhost:9200/beer-sample/_flush)  
> {"ok":true,"\_shards":{"total":10,"successful":5,"failed":0}}  
> I'm not sure if this is an issue as half my shards seem to be under the  
> name "Unassigned".  
> My only current solution is to restart Couchbase, but obviously I wouldn't  
> want to do that in production.  
> Am I missing something?

--

---

<div class="post-metadata">

**Author:** ![Marty\_Schoch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marty_schoch/32/2691_2.png) [@Marty\_Schoch](https://discuss.elastic.co/u/Marty_Schoch)\
**Post date:** [October 8, 2012, 10:09pm UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252/3 "2012-10-08T22:09:46Z")

</div>

Hi Amy,

Just saw this post here and wasn't sure if it was before or after our email  
exchange about this. The XDCR process used to send data to the Couchbase  
Elasticsearch adapter follows an exponential backoff process when retrying  
connections to an Elasticsearch cluster that was down. Depending on how  
long your ES cluster was down, this could cause significant delays before  
those changes are propagated.

I'm still working to reproduce the scenario you described and get  
clarification on the parameters of the backoff. I'll update you when I  
know more.

marty

On Friday, October 5, 2012 9:25:36 AM UTC-4, Amy wrote:

> I've been investigating whether to use couchbase with elasticsearch.  
> There's an excellent blog[http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search](http://blog.couchbase.com/couchbase-and-full-text-search-couchbase-transport-elastic-search)on how to set this up. I have one issue.  
> If elasticsearch is down, and you send a document to couchbase, then bring  
> back up elasticsearch, the document won't be indexed by elasticsearch.  
> I've tried flushing the index to have elasticsearch pick up the document,  
> but flushing doesn't seem to work. In fact, I see that only half the shards  
> flushed successfully.  
> curl -XPOST [http://localhost:9200/beer-sample/\_flush](http://localhost:9200/beer-sample/_flush)  
> {"ok":true,"\_shards":{"total":10,"successful":5,"failed":0}}  
> I'm not sure if this is an issue as half my shards seem to be under the  
> name "Unassigned".  
> My only current solution is to restart Couchbase, but obviously I wouldn't  
> want to do that in production.  
> Am I missing something?

--

---

<div class="post-metadata">

**Author:** ![varu06](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@varu06](https://discuss.elastic.co/u/varu06)\
**Post date:** [May 12, 2013, 4:31pm UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252/4 "2013-05-12T16:31:52Z")

</div>

Hi,

was any foolow up on this issue? Is it still valid or not?

Cheers,  
Dany

---

<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, 2:37am UTC](https://discuss.elastic.co/t/couchbase-elasticsearch-sync-issue/9252/5 "2017-07-06T02:37:01Z")

</div>


