Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB on Ubuntu 12.0.4 LTS: Stop and restart

Tags:

couchdb

I am in the process of evaluating CouchDB for a specific requirement and I am new to CouchDB.

I have installed Couch DB using the package installation and it has started at the time of installation and listening to port 5984.

Now i want to stop and restart. I have tried various options but none of them worked.

Option 1

sudo service couchdb stop (this does not stop at all)

sudo netstat -lpn shows that a process listening to 5984

Option 2

sudo -i -u couchdb /etc/init.d/couchdb start

This is prompting for the password (ofcourse) which i do not know.

I understand that a new user called couchdb is created at the time of installation. What is the default password of this user?

like image 356
Manikandan Kannan Avatar asked Jan 09 '13 09:01

Manikandan Kannan


People also ask

How to restart CouchDB on Ubuntu?

Restart. To restart a running CouchDB instance, execute the following command: sudo restart couchdb.

Which of the following command is used to start Apache CouchDB?

Start CouchDB with ./bin/couchdb from within that directory.


2 Answers

First, you simply need to reboot Ubuntu. If CouchDB is running after an install, it is, so far as I can tell, impossible to kill it. Once you reboot, you can use
sudo service couchdb stop
and then
sudo service couchdb start.

Second, there is no password when CouchDB is first installed, so I believe the fact that it prompts you is a bug. You can go to

http://localhost:5984/_utils 

and then click on the "Fix this" link in the bottom right corner of the screen, where it says "Admin party", to set the first password.

See CouchDB: The Definitive Guide for more info.

like image 197
dnuttle Avatar answered Sep 19 '22 06:09

dnuttle


I was having this same problem, and found this in the CouchDB docs: To restart the server you must do a POST to the special URL <server>/_restart while authenticated as an admin user.

Example with curl:

curl -X POST http://localhost:5984/_restart -H"Content-Type: application/json"

NOTE: This method is no longer supported in CouchDB 2.0+

like image 38
Bdoserror Avatar answered Sep 20 '22 06:09

Bdoserror