Couch DB

arnabnaha wrote on Sunday, June 10, 2012:

hi…
Can anybody explain how to setup couchDB properly…what should be the username and how to set up username in couchDB? whenever I try, I get a connection failed message. The password problem is also present.

zhhealthcare wrote on Sunday, June 10, 2012:

Hi,

Can you try to access localhost:5984  and let me know the response you are getting.

Eldho
ZHHealthcare

arnabnaha wrote on Sunday, June 10, 2012:

hi
I am getting this:

{“couchdb”:“Welcome”,“version”:“1.1.1”}

zhhealthcare wrote on Sunday, June 10, 2012:

if it is not asking for any user name and password when you tried as above , you just leave the user name and password as blank in the globals and try.

Eldho
ZHHealthcare

macula wrote on Wednesday, February 06, 2013:

Hello
I installed couchdb to test things out.  I am able to access couchdb and create a database called openemr.
However, none of the documents that I save in seem to be saving to the database.  I can save a document manually through the browser as well as through command line.
No help from the couchdb log either. 
Any thoughts on where else I can look would be appreciated.
thanks

zhhealthcare wrote on Wednesday, February 06, 2013:

Hi

Have you set the document storage method to couchdb (Globals->documents–>document storage Method). This is the only step need to configure for couchdb.

Regards
Eldho
ZHHealthcare

macula wrote on Wednesday, February 06, 2013:

Hi Eldho
yes I set that option in globals. I used the ip address for Hostname since my bind address in couchdb was 0.0.0.0
no username and password has be set for now.
Also, I ran the test suite in couichdb and got all “success” response.  So I know there are no browser issues.

macula wrote on Wednesday, February 06, 2013:

Hello
fyi
one the first upload attempt, the following gets created in couchdb

Key

Value

“_design/FilteringViews”
ID: _design/FilteringViews

subsequent attmepts do not upload documents

zhhealthcare wrote on Wednesday, February 06, 2013:

Hi
Is both the programs on the same server or different servers?

Eldho
ZHHealthcare

macula wrote on Wednesday, February 06, 2013:

both on the same server.
The following is the first and only entry in couch

{
   “_id”: “_design/FilteringViews”,
   “_rev”: “3-9c1587eadb35c69e01a88ea62b40c5c5”,
   “views”: {
       “FilterPid”: {
           “map”: “function(doc) { if(doc.pid){emit(doc._id, doc);} }”
       },
       “FilterEncounter”: {
           “map”: “function(doc) { if(doc.encounter){emit(doc._id, doc);} }”
       },
       “FilterPidEncounter”: {
           “map”: “function(doc) { if(doc.pid && doc.encounter){emit(doc._id, doc);} }”
       }
   }
}
=-------------------------------

zhhealthcare wrote on Wednesday, February 06, 2013:

Hi

From that it is sure that OEMR   connected to  CouchDb and created the initial view. Have you tried to enable the CouchDB log

Regards
Eldho

zhhealthcare wrote on Wednesday, February 06, 2013:

Hi,

If you are putting the “localhost”  as the server, try to replace it with “127.0.0.1” or the actual IP address of the machine.

Regards
Eldho

macula wrote on Wednesday, February 06, 2013:

Hi
I have the ip address in there now. I have also tried the 127.0.0.1 and localhost. with the same issue.
I have looked at the couchdb log. Here is the last restart and attempt at upload .
My application is connecting to couchdb but just cant seem to write to it. I checked and verified couchdb is running as user couchdb.

   Apache CouchDB has started on http://127.0.0.1:5984/
   Apache CouchDB has started on http://0.0.0.0:5984/
   192.168.1.162 - - ‘GET’ / 200
   192.168.1.162 - - ‘GET’ /_all_dbs?_=1360132627500 200
   192.168.1.162 - - ‘GET’ /?_=1360132627511 200
   192.168.1.162 - - ‘GET’ /openemr/?_=1360132627885 200
   192.168.1.162 - - ‘GET’ /test_suite_rep_docs_db_b/?_=1360132627886 200
   192.168.1.162 - - ‘GET’ /test_suite_db/?_=1360132627887 200
   192.168.1.162 - - ‘GET’ /test_suite_db%2Fwith_slashes/?_=1360132627888 200
   192.168.1.162 - - ‘GET’ /test_suite_filtered_rep_db_a/?_=1360132627888 200
   192.168.1.162 - - ‘GET’ /test_suite_rep_docs_db_a/?_=1360132627889 200
   192.168.1.162 - - ‘GET’ /test_suite_filtered_rep_db_b/?_=1360132627890 200
   192.168.1.162 - - ‘GET’ /_users/?_=1360132627891 200
   192.168.1.162 - - ‘GET’ /test_suite_reports/?_=1360132627892 200
   192.168.1.162 - - ‘GET’ /_config/query_servers/?_=1360132675522 200
   192.168.1.162 - - ‘GET’ /openemr/_all_docs?startkey=%22_design%2F%22&endkey=%22_design0%22&include_docs=true&_=1360132675520 200
   192.168.1.162 - - ‘GET’ /openemr/_all_docs?limit=11&_=1360132675522 200
   192.168.1.162 - - ‘GET’ /?_=1360132675533 200
   192.168.1.162 - - ‘GET’ /_config/native_query_servers/?_=1360132675794 200
   192.168.1.162 - - ‘GET’ /openemr/_all_docs?startkey=%22_design%2F%22&endkey=%22_design0%22&include_docs=true&_=1360132678180 200
   192.168.1.162 - - ‘GET’ /openemr/_all_docs?limit=11&_=1360132678182 200
   192.168.1.162 - - ‘GET’ /_config/query_servers/?_=1360132678182 200
   192.168.1.162 - - ‘GET’ /?_=1360132678194 200
   192.168.1.162 - - ‘GET’ /_config/native_query_servers/?_=1360132678479 200

zhhealthcare wrote on Wednesday, February 06, 2013:

Hi,

in the couchDB configuration section there is is an enable “couchDB log”, which will write the logs to sites/dcouments/couchdb. What is the logs appearing there??

Regards
Eldho

macula wrote on Wednesday, February 06, 2013:

Interesting that no such couchDB log is found in /sites/default/document/   or anywhere else in the application folder even after I enable the logging option in globals.
now I am really confused.
I thought maybe if I added couchdb user to openemr user group I may see that log but  no luck