incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <>
Subject Re: Running couchdb remotely (from an interactive shell)
Date Wed, 12 Dec 2012 17:23:51 GMT
Hi Dave,

Restarting though APIs would demand an extra overhead on the scripts,
certainly doable but there should be IMO an easier way for a sysadmin
to remotely restart. But even if that works you still have the problem
of hanging or dying instances, it simply can happen. Most of the
services (daemons) would include for a reason an option to restart
from the console. I would like to use that option but remotely.

Typically when you have a remote management and configuration tool you
launch something like:
ssh -t remoteserver sudo /etc/init.d/couchdb start

The above does not work. Try it. As the command disconnects couchdb dies.

That is why I am using nohup as I originally posted. It does work,
perhaps I just need to fill the JIRA ticket but I wanted a blessing
from the list first (in case there is a good alternative). I have
received so far some ideas and I do appreciate them all but I just
feel couchdb restart command should work the same in both cases:
1. Executing it locally in the target host (after login)
2. Executing it remotely in the target host (sending the command via ssh)

Makes sense?

- Nestor

On Wed, Dec 12, 2012 at 10:12 AM, Dave Cottlehuber <> wrote:
> On 12 December 2012 15:51, Nestor Urquiza <> wrote:
>> Hi Robert,
>> For maintenance purposes you might want to remotely restart couchdb.
>> For example you remotely install couchdb and after that you remotely
>> harden it (changing configuration files) which demands a restart.
> Applying changes via the _config API allows CouchDB to restart only
> the impacted subsystems. This is more likely to fit your needs.
>> We prefer to maintain the servers remotely rather than login into them
>> and manually execute commands. We script the commands for absolutely
>> everything, from building the whole server to patching it to changing
>> configuration etc.
> You can use the _restart API for this without even needing to log on.
>> With the same recipe we guarantee not relying on memory or going
>> manually through steps. The steps are in scripts.
>> BTW we use Plain Old Bash (POB) recipes with the help of Remoto-IT, a
>> simple and open source script based on expect and to remotely run
>> scripts in a server.
>> The init.d script as I said will die as it is attached to the console
>> session if you are running it from ssh. The nohup command can be used
>> like screen can be used as well (like mentioned in this thread).
>> I believe in these days where automation is key, couchdb should
>> support be run from a remote ssh interactive session. That is what my
>> change (using nohup) allows. I am wondering if it makes sense to
>> include the change even if it demands a configure or *.ini option.
> Hi Nestor,
> TBH I'm puzzled why launching CouchDB interactively  is somehow better
> compared to using upstart or whatever your preferred OS uses to
> implement daemons.
> If there's something the init scripts are not doing today I'd prefer
> that we address that directly, so all distros can benefit from it.
> What's missing?
> A+
> Dave

View raw message