Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE0CCD348 for ; Wed, 12 Dec 2012 15:00:15 +0000 (UTC) Received: (qmail 22893 invoked by uid 500); 12 Dec 2012 15:00:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 22743 invoked by uid 500); 12 Dec 2012 15:00:14 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 22724 invoked by uid 99); 12 Dec 2012 15:00:13 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 15:00:13 +0000 Received: from localhost (HELO mail-vb0-f52.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 15:00:13 +0000 Received: by mail-vb0-f52.google.com with SMTP id ez10so814124vbb.11 for ; Wed, 12 Dec 2012 07:00:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.175.167 with SMTP id cb7mr564882vdc.58.1355324408666; Wed, 12 Dec 2012 07:00:08 -0800 (PST) Received: by 10.52.68.209 with HTTP; Wed, 12 Dec 2012 07:00:08 -0800 (PST) In-Reply-To: References: <50C887E0.10201@yagni.com> Date: Wed, 12 Dec 2012 15:00:08 +0000 Message-ID: Subject: Re: Running couchdb remotely (from an interactive shell) From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 If you're reporting a bug in our init.d script (namely, that it fails to daemonize couchdb correctly), then please open a JIRA ticket. You do not need to restart couchdb just to change configuration, though. Just use PUT's to :5984/_config/section/key -d 'value', and couchdb will change internally and write out the new file. I have some experience in managing remote couchdb nodes. B. On 12 December 2012 14: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. > > 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. > > 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. > > Right now we are just storing the modified script on svn and patching > the original from POB recipes, it works but I just want to make sure > this is not such a need that makes it reasonable to have it as a > feature request for future releases of couchdb. > > Thanks! > - Nestor > > On Wed, Dec 12, 2012 at 8:59 AM, Robert Newson wrote: >> CouchDB includes a script to launch it as a daemon, a standard init.d >> script. I'm confused why you'd ssh to a machine, run couchdb in the >> foreground, and log off. >> >> >> On 12 December 2012 13:34, Wayne Conrad wrote: >>> On 12/11/2012 11:53 AM, Nestor Urquiza wrote: >>>> As other users have asked in the past to this list couchdb will not >>>> run from a remote interactive shell but rather it will be killed when >>>> the ssh session terminates. The command nohup can help with that. Here >>>> is what I did (which works OK): >>> >>> Terminal multiplexors like screen and tmux are very good for "I want to >>> start a non-daemon, disconnect, and come back later to see what happened." >>> >>> Here's how it works with screen: >>> >>> log on >>> $ screen >>> $ (enter log running command) >>> type control-a d to detach the screen session >>> log off >>> >>> later... >>> >>> log into the remote system >>> $ screen -r >>> >>> and you'll be back in your long running program's term, including any output >>> the program printed while you were gone. >>> >>> Best Regards, >>> Wayne Conrad