# Problem in CouchDB integration

**URL:** <https://discuss.elastic.co/t/problem-in-couchdb-integration/8451>\
**Category:** Elasticsearch\
**Created:** [July 18, 2012, 4:38pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451 "2012-07-18T16:38:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 18, 2012, 4:38pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/1 "2012-07-18T16:38:24Z")

</div>

Hi everyody,

I want to integrate CouchDB into elastic search follwing the tutorial of  
elastic search web site  
([http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
Other wise, when I run this command in the terminal :  
curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
"type" : "couchdb",  
"couchdb" : {  
"user" : "Sellami",  
"password" : "12345",  
"host" : 127.0.0.1,  
"port" : 5984,  
"db" : "mycouchshop",  
"ignore\_attachments":true,  
"filter" : null  
}  
}'

I get this errorr message :

{"error":"MapperParsingException[Failed to parse]; nested:  
JsonParseException[Unexpected character ('.' (code 46)): was expecting  
comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}

Could you please help me?

Thanks in advance 🙂

Best regards,  
Rami Sellami

---

<div class="post-metadata">

**Author:** ![Dan\_Fairs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_fairs/32/1205_2.png) [@Dan\_Fairs](https://discuss.elastic.co/u/Dan_Fairs)\
**Post date:** [July 18, 2012, 4:46pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/2 "2012-07-18T16:46:42Z")

</div>

> ```
> curl -XPUT 'http://localhost:9200/_river/my_es_idx/_meta' -d '{
> "type" : "couchdb",
> "couchdb" : {
> "user" : "Sellami",
> "password" : "12345",
> "host" : 127.0.0.1,
> "port" : 5984,
> "db" : "mycouchshop",
> "ignore_attachments":true,
> "filter" : null
> }
> }'
> 
> ```
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested: JsonParseException[Unexpected character ('.' (code 46)): was expecting comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}

Shouldn't the value for your "host" key be quoted? It's a string.

## Cheers, Dan

Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 18, 2012, 4:56pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/3 "2012-07-18T16:56:03Z")

</div>

Hi Dan,  
Thank you for your quick response. However, your suggestion did not work.  
This is the error message :

{"error":"MapperParsingException[Failed to parse [couchdb.host]]; nested:  
NumberFormatException[multiple points]; ","status":400}.

Hence, I think that the host shoul not be as a string.

Regards,  
Rami Sellami

Le mercredi 18 juillet 2012 18:46:42 UTC+2, Dan Fairs a écrit :

> ```
> curl -XPUT 'http://localhost:9200/_river/my_es_idx/_meta' -d '{
> "type" : "couchdb",
> "couchdb" : {
> "user" : "Sellami",
> "password" : "12345",
> "host" : 127.0.0.1,
> "port" : 5984,
> "db" : "mycouchshop",
> "ignore_attachments":true,
> "filter" : null
> }
> }'
> 
> ```
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested:  
> JsonParseException[Unexpected character ('.' (code 46)): was expecting  
> comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Shouldn't the value for your "host" key be quoted? It's a string.
> 
> ## Cheers, Dan
> 
> Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 18, 2012, 5:04pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/4 "2012-07-18T17:04:39Z")

</div>

Hi Dan,  
Thank you for your quick response. However, your suggestion did not work.  
This is the error message :

{"error":"  
MapperParsingException[Failed to parse [couchdb.host]]; nested:  
NumberFormatException[multiple points]; ","status":400}.

Hence, I think that the host shoul not be as a string.

Regards,  
Rami Sellami

---

<div class="post-metadata">

**Author:** ![Dan\_Fairs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_fairs/32/1205_2.png) [@Dan\_Fairs](https://discuss.elastic.co/u/Dan_Fairs)\
**Post date:** [July 18, 2012, 5:13pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/5 "2012-07-18T17:13:58Z")

</div>

> Hi Dan,  
> Thank you for your quick response. However, your suggestion did not work. This is the error message :
> 
> {"error":"  
> MapperParsingException[Failed to parse [couchdb.host]]; nested: NumberFormatException[multiple points]; ","status":400}.
> 
> Hence, I think that the host shoul not be as a string.

Well - my system POSTs data like this when it creates a CouchDB river:

{"index": {"bulk\_timeout": "100ms", "index": "unittest\_2012\_22", "type": "docs", "bulk\_size": "100"}, "couchdb": {"filter": null, "host": "localhost", "ignore\_attachments": true, "db": "unittest\_2012\_22", "port": 5984}, "type": "couchdb"}

Perhaps try the hostname?

## Cheers, Dan

Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 18, 2012, 5:17pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/6 "2012-07-18T17:17:35Z")

</div>

Sorry Dan, but what do you mean by "hostname"?

Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :

> Hi everyody,
> 
> I want to integrate CouchDB into Elasticsearch follwing the tutorial of  
> Elasticsearch web site (  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
> Other wise, when I run this command in the terminal :  
> curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> "type" : "couchdb",  
> "couchdb" : {  
> "user" : "Sellami",  
> "password" : "12345",  
> "host" : 127.0.0.1,  
> "port" : 5984,  
> "db" : "mycouchshop",  
> "ignore\_attachments":true,  
> "filter" : null  
> }  
> }'
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested:  
> JsonParseException[Unexpected character ('.' (code 46)): was expecting  
> comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Could you please help me?
> 
> Thanks in advance 🙂
> 
> Best regards,  
> Rami Sellami

---

<div class="post-metadata">

**Author:** ![Dan\_Fairs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_fairs/32/1205_2.png) [@Dan\_Fairs](https://discuss.elastic.co/u/Dan_Fairs)\
**Post date:** [July 18, 2012, 5:18pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/7 "2012-07-18T17:18:15Z")

</div>

> Well - my system POSTs data like this when it creates a CouchDB river:

Apologies - it's a PUT not POST, to [http://127.0.0.1:9200/\_river/unittest\_2012\_22/\_meta](http://127.0.0.1:9200/_river/unittest_2012_22/_meta)

Cheers,  
Dan

> {"index": {"bulk\_timeout": "100ms", "index": "unittest\_2012\_22", "type": "docs", "bulk\_size": "100"}, "couchdb": {"filter": null, "host": "localhost", "ignore\_attachments": true, "db": "unittest\_2012\_22", "port": 5984}, "type": "couchdb"}
> 
> Perhaps try the hostname?
> 
> ## Cheers, Dan
> 
> Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

--  
Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

---

<div class="post-metadata">

**Author:** ![Dan\_Fairs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_fairs/32/1205_2.png) [@Dan\_Fairs](https://discuss.elastic.co/u/Dan_Fairs)\
**Post date:** [July 18, 2012, 5:57pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/8 "2012-07-18T17:57:47Z")

</div>

On 18 Jul 2012, at 18:17, rami sellami wrote:

> Sorry Dan, but what do you mean by "hostname"?

Take a look at the sample - I used "localhost" rather than "127.0.0.1".

Cheers,  
Dan

> Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :  
> Hi everyody,
> 
> I want to integrate CouchDB into Elasticsearch follwing the tutorial of Elasticsearch web site ([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)). Other wise, when I run this command in the terminal :  
> curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> "type" : "couchdb",  
> "couchdb" : {  
> "user" : "Sellami",  
> "password" : "12345",  
> "host" : 127.0.0.1,  
> "port" : 5984,  
> "db" : "mycouchshop",  
> "ignore\_attachments":true,  
> "filter" : null  
> }  
> }'
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested: JsonParseException[Unexpected character ('.' (code 46)): was expecting comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Could you please help me?
> 
> Thanks in advance 🙂
> 
> Best regards,  
> Rami Sellami

--  
Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 18, 2012, 6:04pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/9 "2012-07-18T18:04:25Z")

</div>

It did not work. I think that it is a configuration problem and I do not  
know how to solve it. ☹

2012/7/18 Dan Fairs [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com)

> On 18 Jul 2012, at 18:17, rami sellami wrote:
> 
> Sorry Dan, but what do you mean by "hostname"?
> 
> Take a look at the sample - I used "localhost" rather than "127.0.0.1".
> 
> Cheers,  
> Dan
> 
> Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :
> 
> > Hi everyody,
> > 
> > I want to integrate CouchDB into Elasticsearch follwing the tutorial of  
> > Elasticsearch web site ([http://www.elasticsearch.org/](http://www.elasticsearch.org/)\*\*  
> > tutorials/2010/08/01/couchb-\*\*integration.html[http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
> > Other wise, when I run this command in the terminal :  
> > curl -XPUT '[http://localhost:9200/\_river/\*\*my\_es\_idx/\_meta](http://localhost:9200/_river/**my_es_idx/_meta)[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)'  
> > -d '{  
> > "type" : "couchdb",  
> > "couchdb" : {  
> > "user" : "Sellami",  
> > "password" : "12345",  
> > "host" : 127.0.0.1,  
> > "port" : 5984,  
> > "db" : "mycouchshop",  
> > "ignore\_attachments":true,  
> > "filter" : null  
> > }  
> > }'
> > 
> > I get this errorr message :
> > 
> > {"error":"\*\*MapperParsingException[Failed to parse]; nested:  
> > JsonParseException[Unexpected character ('.' (code 46)): was expecting  
> > comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> > 
> > Could you please help me?
> > 
> > Thanks in advance 🙂
> > 
> > Best regards,  
> > Rami Sellami
> 
> --  
> Dan Fairs | [dan.fairs@gmail.com](mailto:dan.fairs@gmail.com) | @danfairs | [www.fezconsulting.com](http://www.fezconsulting.com)

--  
Cordialement,  
Rami Sellami

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 20, 2012, 10:11am UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/10 "2012-07-20T10:11:01Z")

</div>

Hi all,  
Please help me, I stilli have the same problem!!! I do not how to solve it

Thanks in advance

Best regard,  
Rami Sellmai  
Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :

> Hi everyody,
> 
> I want to integrate CouchDB into Elasticsearch follwing the tutorial of  
> Elasticsearch web site (  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
> Other wise, when I run this command in the terminal :  
> curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> "type" : "couchdb",  
> "couchdb" : {  
> "user" : "Sellami",  
> "password" : "12345",  
> "host" : 127.0.0.1,  
> "port" : 5984,  
> "db" : "mycouchshop",  
> "ignore\_attachments":true,  
> "filter" : null  
> }  
> }'
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested:  
> JsonParseException[Unexpected character ('.' (code 46)): was expecting  
> comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Could you please help me?
> 
> Thanks in advance 🙂
> 
> Best regards,  
> Rami Sellami

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2012, 12:52pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/11 "2012-07-20T12:52:21Z")

</div>

I suggest one thing:

Copy your JSON content (aka your river definition), paste it into  
[http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/)  
[http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/) and click on process.

And see if there are errors.

If there are errors, it could be a bad encoding character.

BTW, are you sure you are pasting the real curl command ?

David

Le 20 juillet 2012 à 12:11, rami sellami [sel.rami@gmail.com](mailto:sel.rami@gmail.com) a écrit :

> Hi all,  
> Please help me, I stilli have the same problem!!! I do not how to solve it
> 
> Thanks in advance
> 
> Best regard,  
> Rami Sellmai  
> Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :
> 
> > > Hi everyody,
> > 
> > I want to integrate CouchDB into Elasticsearch follwing the tutorial of  
> > Elasticsearch web site (  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
> > Other wise, when I run this command in the terminal :  
> > curl -XPUT '  
> > [http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)  
> > [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> > "type" : "couchdb",  
> > "couchdb" : {  
> > "user" : "Sellami",  
> > "password" : "12345",  
> > "host" : 127.0.0.1,  
> > "port" : 5984,  
> > "db" : "mycouchshop",  
> > "ignore\_attachments":true,  
> > "filter" : null  
> > }  
> > }'
> > 
> > I get this errorr message :
> > 
> > {"error":"MapperParsingException[Failed to parse]; nested:  
> > JsonParseException[Unexpected character ('.' (code 46)): was expecting comma  
> > to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]];  
> > ","status":400}
> > 
> > Could you please help me?
> > 
> > Thanks in advance 🙂
> > 
> > Best regards,  
> > Rami Sellami  
> > [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)
> > 
> > > [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)

--  
David Pilato  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 20, 2012, 1:23pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/12 "2012-07-20T13:23:29Z")

</div>

Dear David,

thank you for answering me. It doesn't work [?].  
I tried this also  
sellami@ubuntu:~$ curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)'  
-d '{  
"type":"couchdb",  
"couchdb":{  
"user":"Sellami",  
"password":"12345",  
"host":"127.0.0.1",  
"port":5984,  
"db":"mycouchshop",  
"ignore\_attachments":true,  
"filter":null  
}  
}'

{"error":"MapperParsingException[Failed to parse [couchdb.host]]; nested:  
NumberFormatException[multiple points]; ","status":400}

Have you got any other suggestion??

Regard,  
Rami Sellami

2012/7/20 David Pilato [david@pilato.fr](mailto:david@pilato.fr)

> \*\*
> 
> I suggest one thing:
> 
> Copy your JSON content (aka your river definition), paste it into  
> [http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/) and click on process.
> 
> And see if there are errors.
> 
> If there are errors, it could be a bad encoding character.
> 
> BTW, are you sure you are pasting the real curl command ?
> 
> David
> 
> Le 20 juillet 2012 à 12:11, rami sellami [sel.rami@gmail.com](mailto:sel.rami@gmail.com) a écrit :
> 
> Hi all,  
> Please help me, I stilli have the same problem!!! I do not how to solve it
> 
> Thanks in advance
> 
> Best regard,  
> Rami Sellmai  
> Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :
> 
> Hi everyody,
> 
> I want to integrate CouchDB into Elasticsearch follwing the tutorial of  
> Elasticsearch web site ( [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)).  
> Other wise, when I run this command in the terminal :  
> curl -XPUT '[http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html) [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)'  
> -d '{
> 
> ```
> "type" : "couchdb",
> "couchdb" : {
> "user" : "Sellami",
> "password" : "12345",
> "host" : 127.0.0.1,
> "port" : 5984,
> "db" : "mycouchshop",
> "ignore_attachments":true,
> "filter" : null
> }
> }'
> 
> ```
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested:  
> JsonParseException[Unexpected character ('.' (code 46)): was expecting  
> comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Could you please help me?
> 
> Thanks in advance 🙂
> 
> Best regards,  
> Rami Sellami  
> [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)
> 
> [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

--  
Cordialement,  
Rami Sellami

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2012, 1:28pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/13 "2012-07-20T13:28:13Z")

</div>

Use localhost instead of 127.0.0.1

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 20 juil. 2012 à 15:23, rami sellami [sel.rami@gmail.com](mailto:sel.rami@gmail.com) a écrit :

> Dear David,
> 
> thank you for answering me. It doesn't work \<343.gif\>.  
> I tried this also  
> sellami@ubuntu:~$ curl -XPUT '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> "type":"couchdb",  
> "couchdb":{  
> "user":"Sellami",  
> "password":"12345",  
> "host":"127.0.0.1",  
> "port":5984,  
> "db":"mycouchshop",  
> "ignore\_attachments":true,  
> "filter":null  
> }  
> }'
> 
> {"error":"MapperParsingException[Failed to parse [couchdb.host]]; nested: NumberFormatException[multiple points]; ","status":400}
> 
> Have you got any other suggestion??
> 
> Regard,  
> Rami Sellami
> 
> 2012/7/20 David Pilato [david@pilato.fr](mailto:david@pilato.fr)  
> I suggest one thing:
> 
> Copy your JSON content (aka your river definition), paste it into [http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/) and click on process.
> 
> And see if there are errors.
> 
> If there are errors, it could be a bad encoding character.
> 
> BTW, are you sure you are pasting the real curl command ?
> 
> David
> 
> Le 20 juillet 2012 à 12:11, rami sellami [sel.rami@gmail.com](mailto:sel.rami@gmail.com) a écrit :
> 
> Hi all,  
> Please help me, I stilli have the same problem!!! I do not how to solve it
> 
> Thanks in advance
> 
> Best regard,  
> Rami Sellmai  
> Le mercredi 18 juillet 2012 18:38:24 UTC+2, rami sellami a écrit :  
> Hi everyody,
> 
> I want to integrate CouchDB into Elasticsearch follwing the tutorial of Elasticsearch web site ( [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)). Other wise, when I run this command in the terminal :  
> curl -XPUT ' [http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{
> 
> ```
> "type" : "couchdb",
> "couchdb" : {
> "user" : "Sellami",
> "password" : "12345",
> "host" : 127.0.0.1,
> "port" : 5984,
> "db" : "mycouchshop",
> "ignore_attachments":true,
> "filter" : null
> }
> }'
> 
> ```
> 
> I get this errorr message :
> 
> {"error":"MapperParsingException[Failed to parse]; nested: JsonParseException[Unexpected character ('.' (code 46)): was expecting comma to separate OBJECT entries\n at [Source: [B@78f0ec3d; line: 6, column: 24]]; ","status":400}
> 
> Could you please help me?
> 
> Thanks in advance 🙂
> 
> Best regards,  
> Rami Sellami
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet
> 
> --  
> Cordialement,  
> Rami Sellami

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 20, 2012, 1:32pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/14 "2012-07-20T13:32:48Z")

</div>

On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:

> Dear David,
> 
> thank you for answering me. It doesn't work .  
> I tried this also  
> sellami@ubuntu:~$ curl -XPUT  
> '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> "type":"couchdb",  
> "couchdb":{  
> "user":"Sellami",  
> "password":"12345",  
> "host":"127.0.0.1",  
> "port":5984,  
> "db":"mycouchshop",  
> "ignore\_attachments":true,  
> "filter":null  
> }  
> }'

Your 'host' field is mapped as a number, which means that if you try to  
put 127.0.0.1 into it, it fails, because that is clearly not a number.

clint

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 20, 2012, 1:40pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/15 "2012-07-20T13:40:20Z")

</div>

@ David, I tried localhost but didn't work. I think localhost is proper to  
the elasticsearch.  
@clint Have you got a suggestion??

2012/7/20 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)

> On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:
> 
> > Dear David,
> > 
> > thank you for answering me. It doesn't work .  
> > I tried this also  
> > sellami@ubuntu:~$ curl -XPUT  
> > '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> > "type":"couchdb",  
> > "couchdb":{  
> > "user":"Sellami",  
> > "password":"12345",  
> > "host":"127.0.0.1",  
> > "port":5984,  
> > "db":"mycouchshop",  
> > "ignore\_attachments":true,  
> > "filter":null  
> > }  
> > }'
> 
> Your 'host' field is mapped as a number, which means that if you try to  
> put 127.0.0.1 into it, it fails, because that is clearly not a number.
> 
> clint

--  
Cordialement,  
Rami Sellami

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 20, 2012, 1:58pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/16 "2012-07-20T13:58:48Z")

</div>

On Fri, 2012-07-20 at 15:40 +0200, rami sellami wrote:

> @ David, I tried localhost but didn't work. I think localhost is  
> proper to the elasticsearch.  
> @clint Have you got a suggestion??

Yes. Fix your mapping for that field. It should be:

{ type: "string", "index": "not\_analyzed"}

> 2012/7/20 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)  
> On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:  
> \> Dear David,  
> \>  
> \> thank you for answering me. It doesn't work .  
> \> I tried this also  
> \> sellami@ubuntu:~$ curl -XPUT  
> \> '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> \> "type":"couchdb",  
> \> "couchdb":{  
> \> "user":"Sellami",  
> \> "password":"12345",  
> \> "host":"127.0.0.1",  
> \> "port":5984,  
> \> "db":"mycouchshop",  
> \> "ignore\_attachments":true,  
> \> "filter":null  
> \> }  
> \> }'
> 
> ```
> Your 'host' field is mapped as a number, which means that if
> you try to
> put 127.0.0.1 into it, it fails, because that is clearly not a
> number.
>     
> clint
> 
> ```
> 
> --  
> Cordialement,  
> Rami Sellami

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2012, 10:15pm UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/17 "2012-07-20T22:15:09Z")

</div>

Hum. I see.

So Rami first send a river creation in \_river/my\_es\_idx with hostname starting with number.  
So ES tried to dynamically map it to Number, but fails.  
Then he tried to push a new river definition with "localhost" and it fails also as the mapping already exists.

Is it what you have in mind Clint ?

If so, may I suggest to Rani to:

1. Delete the \_river index (and all its associated mappings)
2. Send a river creation document with "localhost" as "host"

Then if really needed, he could push an update for the river with "172.0.0.1". This host will be read as a String by ES, because mapping will already exist.

It should work, isn't it ?

Cheers  
David.

> -----Message d'origine-----  
> De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Clinton Gormley  
> Envoyé : vendredi 20 juillet 2012 15:59  
> À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> Objet : Re: Problem in CouchDB integration
> 
> On Fri, 2012-07-20 at 15:40 +0200, rami sellami wrote:
> 
> > @ David, I tried localhost but didn't work. I think localhost is  
> > proper to the elasticsearch.  
> > @clint Have you got a suggestion??
> 
> Yes. Fix your mapping for that field. It should be:
> 
> { type: "string", "index": "not\_analyzed"}
> 
> > 2012/7/20 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)  
> > On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:  
> > \> Dear David,  
> > \>  
> > \> thank you for answering me. It doesn't work .  
> > \> I tried this also  
> > \> sellami@ubuntu:~$ curl -XPUT  
> > \> '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> > \> "type":"couchdb",  
> > \> "couchdb":{  
> > \> "user":"Sellami",  
> > \> "password":"12345",  
> > \> "host":"127.0.0.1",  
> > \> "port":5984,  
> > \> "db":"mycouchshop",  
> > \> "ignore\_attachments":true,  
> > \> "filter":null  
> > \> }  
> > \> }'
> > 
> > ```
> > Your 'host' field is mapped as a number, which means that if
> > you try to
> > put 127.0.0.1 into it, it fails, because that is clearly not
> > 
> > ```
> 
> a
> 
> > ```
> > number.
> > 
> > clint
> > 
> > ```
> > 
> > --  
> > Cordialement,  
> > Rami Sellami

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 21, 2012, 8:50am UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/18 "2012-07-21T08:50:32Z")

</div>

On Sat, 2012-07-21 at 00:15 +0200, David Pilato wrote:

> Hum. I see.
> 
> So Rami first send a river creation in \_river/my\_es\_idx with hostname starting with number.  
> So ES tried to dynamically map it to Number, but fails.  
> Then he tried to push a new river definition with "localhost" and it fails also as the mapping already exists.
> 
> Is it what you have in mind Clint ?

Correct

> If so, may I suggest to Rani to:
> 
> 1. Delete the \_river index (and all its associated mappings)
> 2. Send a river creation document with "localhost" as "host"
> 
> Then if really needed, he could push an update for the river with "172.0.0.1". This host will be read as a String by ES, because mapping will already exist.
> 
> It should work, isn't it ?

Yes

Or, even better (but more work) - delete the current index, create a new  
index with the proper mappings, then recreate the river. That way you  
can avoid more datatype mismatches.

clint

> Cheers  
> David.
> 
> > -----Message d'origine-----  
> > De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Clinton Gormley  
> > EnvoyÃ© : vendredi 20 juillet 2012 15:59  
> > Ã : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > Objet : Re: Problem in CouchDB integration
> > 
> > On Fri, 2012-07-20 at 15:40 +0200, rami sellami wrote:
> > 
> > > @ David, I tried localhost but didn't work. I think localhost is  
> > > proper to the elasticsearch.  
> > > @clint Have you got a suggestion??
> > 
> > Yes. Fix your mapping for that field. It should be:
> > 
> > { type: "string", "index": "not\_analyzed"}
> > 
> > > 2012/7/20 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)  
> > > On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:  
> > > \> Dear David,  
> > > \>  
> > > \> thank you for answering me. It doesn't work .  
> > > \> I tried this also  
> > > \> sellami@ubuntu:~$ curl -XPUT  
> > > \> '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> > > \> "type":"couchdb",  
> > > \> "couchdb":{  
> > > \> "user":"Sellami",  
> > > \> "password":"12345",  
> > > \> "host":"127.0.0.1",  
> > > \> "port":5984,  
> > > \> "db":"mycouchshop",  
> > > \> "ignore\_attachments":true,  
> > > \> "filter":null  
> > > \> }  
> > > \> }'
> > > 
> > > ```
> > > Your 'host' field is mapped as a number, which means that if
> > > you try to
> > > put 127.0.0.1 into it, it fails, because that is clearly not
> > > 
> > > ```
> > 
> > a
> > 
> > > ```
> > > number.
> > > 
> > > clint
> > > 
> > > ```
> > > 
> > > --  
> > > Cordialement,  
> > > Rami Sellami

---

<div class="post-metadata">

**Author:** ![rami\_sellami](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rami\_sellami](https://discuss.elastic.co/u/rami_sellami)\
**Post date:** [July 23, 2012, 9:24am UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/19 "2012-07-23T09:24:46Z")

</div>

Dear all,

Now it works (ouuuf). So I deleted the river index and I used this command  
:

```
curl -XPUT 'localhost:9200/_river/toto1/_meta' -d '{
   "type" : "couchdb",
   "couchdb" : {
       "host" : "localhost",
       "port" : 5984,
       "db" : "toto1",
       "filter" : null
   },
   *"index" : {
       "index" : "toto1",
       "type" : "toto1",
       "bulk_size" : "100",
       "bulk_timeout" : "10ms"
   }*

```

}'

So now it is fine.

Thank you very much Clint, David and Dan.

Best regards.  
Rami

2012/7/21 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)

> On Sat, 2012-07-21 at 00:15 +0200, David Pilato wrote:
> 
> > Hum. I see.
> > 
> > So Rami first send a river creation in \_river/my\_es\_idx with hostname  
> > starting with number.  
> > So ES tried to dynamically map it to Number, but fails.  
> > Then he tried to push a new river definition with "localhost" and it  
> > fails also as the mapping already exists.
> > 
> > Is it what you have in mind Clint ?
> 
> Correct
> 
> > If so, may I suggest to Rani to:
> > 
> > 1. Delete the \_river index (and all its associated mappings)
> > 2. Send a river creation document with "localhost" as "host"
> > 
> > Then if really needed, he could push an update for the river with  
> > "172.0.0.1". This host will be read as a String by ES, because mapping will  
> > already exist.
> > 
> > It should work, isn't it ?
> 
> Yes
> 
> Or, even better (but more work) - delete the current index, create a new  
> index with the proper mappings, then recreate the river. That way you  
> can avoid more datatype mismatches.
> 
> clint
> 
> > Cheers  
> > David.
> > 
> > > -----Message d'origine-----  
> > > De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > > [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Clinton Gormley  
> > > Envoyé : vendredi 20 juillet 2012 15:59  
> > > À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> > > Objet : Re: Problem in CouchDB integration
> > > 
> > > On Fri, 2012-07-20 at 15:40 +0200, rami sellami wrote:
> > > 
> > > > @ David, I tried localhost but didn't work. I think localhost is  
> > > > proper to the elasticsearch.  
> > > > @clint Have you got a suggestion??
> > > 
> > > Yes. Fix your mapping for that field. It should be:
> > > 
> > > { type: "string", "index": "not\_analyzed"}
> > > 
> > > > 2012/7/20 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)  
> > > > On Fri, 2012-07-20 at 15:23 +0200, rami sellami wrote:  
> > > > \> Dear David,  
> > > > \>  
> > > > \> thank you for answering me. It doesn't work .  
> > > > \> I tried this also  
> > > > \> sellami@ubuntu:~$ curl -XPUT  
> > > > \> '[http://localhost:9200/\_river/my\_es\_idx/\_meta](http://localhost:9200/_river/my_es_idx/_meta)' -d '{  
> > > > \> "type":"couchdb",  
> > > > \> "couchdb":{  
> > > > \> "user":"Sellami",  
> > > > \> "password":"12345",  
> > > > \> "host":"127.0.0.1",  
> > > > \> "port":5984,  
> > > > \> "db":"mycouchshop",  
> > > > \> "ignore\_attachments":true,  
> > > > \> "filter":null  
> > > > \> }  
> > > > \> }'
> > > > 
> > > > ```
> > > > Your 'host' field is mapped as a number, which means that if
> > > > you try to
> > > > put 127.0.0.1 into it, it fails, because that is clearly not
> > > > 
> > > > ```
> > > 
> > > a
> > > 
> > > > ```
> > > > number.
> > > > 
> > > > clint
> > > > 
> > > > ```
> > > > 
> > > > --  
> > > > Cordialement,  
> > > > Rami Sellami

--  
Cordialement,  
Rami Sellami

---

<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, 3:19am UTC](https://discuss.elastic.co/t/problem-in-couchdb-integration/8451/20 "2017-07-06T03:19:28Z")

</div>


