couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Torres <>
Subject Re: CouchDB as a windows service.
Date Thu, 04 Aug 2011 19:34:37 GMT
On Thu, Aug 4, 2011 at 6:39 PM, Keith Gable <>wrote:

> On Thu, Aug 4, 2011 at 10:31 AM, Walter Torres <>
> wrote:
> > When I installed "erlsrv.exe" as a SERVICE, windows created the
> > SERVICE REG KEYS. It appears in the  SERVICES control and it allows me
> > to attempt to start it.
> >
> Did *you* create the service, or did you copy and paste the code the
> installer uses? I think this may be the issue if the former.

sc.exe create CouchDBServer binPath=
"L:\etc\couchdb\erts-5.8.4\bin\erlsrv.exe" DisplayName= "CouchDB Server"

> erlsrv.exe is
> used to start/stop/install/remove Erlang services from what I can tell. You
> wouldn't want to add it yourself as a service to start; you'd want to use
> it
> in cmd.exe to add a service and then start whatever it put in there.
> Here's the config file for the installer (which I think is InnoSetup):
> You should have installed the service by running erlsrv.exe with these
> parameters (I filled in the variables from the ISS file, so change as
> needed):
> add "CouchDB" -workdir "X:\CouchDB\bin" -onfail restart_always -args "-sasl
> errlog_type error -s couch +A 4 +W w" -comment "CouchDB 1.x.x"
> Then you can either net start CouchDB, or the installer does erlsrv.exe
> start "CouchDB".

oh. Must read more. Must read more! ;)

> I checked out the source for the Windows fork and grepped it for both
> "hkey"
> and "hk", and nothing Windows-specific came out. I don't think that CouchDB
> is your problem here. I think it's that Erlang is refusing to start because
> it is not installed properly (and it may well depend on some sort of
> registry entries). There might be a standalone version of Erlang that you
> can extract to a folder and use, and then once that worked, you could use
> that to install CouchDB as a service and run it.

The GitHub that I pulled the installer from has a non-installer version;
meaning it is a simple 7z file. I am using that in my experiments.

I really don't know if this is a standalone Erlang.

> It sounds to me like you're trying to make a version of CouchDB that is
> batch file installable and survives a nuke and pave.

But that's a guess;

Almost. BAT file is one stepdown from INSTALLER. But yes one of the positive
aspects of this system is a "nuke and pave" solution. My solution is not so
much BAT based, but gZip the entire structure and place on network or CD for
safe keeping.

> you could be hooking up CouchDB to a missile defense system.

Oh! You had to say that! Now we have have to kill you! ;)

> In any event, help
> us help you - try to explain why you can't use the installer in silent mode
> and why you can't use registry entries.

My rational for this method:
  1) Linux like - as much as possible on a windows box
       * I am 96% there
  2) nuke and pave capability
       * 100% there
  3)  deep understanding of system, how it works, how to modify/config it,
upgrade it.
       * 100% there, with what I have. It took me 10 minutes to add SSL to
my Apache. Took another 5 for Vhosts. You can't say the same with Xxamp or
WAMP installers.

On a irrational level
  1) hatred of windows "rules"
  2) dread of windows failures - not if, but when
  3) despise REG KEYS
  4) deplore files in WINDOWS dir
  5) don't not knowing whee things are (control freak!)

I would like to place files in some rational/logical locations in my "linux"
tree, add a service, add ENV VAR (if needed) and just begin development.

> P.S. In Windows, when you remove a service, you'll have to reboot to fully
> be rid of its security descriptors and whatnot. Definitely don't try
> removing/adding the service without restarting or you may be compounding
> the
> problem by having incorrect SDs.

Yes, thank you. That I have been doing.

Anyway, the info you gave (THANK YOU very much BTW) will keep me busy for a
bit of time. No matter how much I  think I know, too many times I feel like
I know nothing at all.

Thank you.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message