CouchDB不会在Azure Windows VM上安装服务 [英] CouchDB will not install as a service on Azure Windows VM

查看:343
本文介绍了CouchDB不会在Azure Windows VM上安装服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在我的Azure Windows VM(经典)上安装了CouchDB,而不用使用从 http://couchdb.apache.org/



今天我已经卸载了现有的CouchDB安装和服务,目的是安装它从头开始。不幸的是,每当我运行安装程序,它无法创建一个Windows服务。更多信息:




  • 我以管理员身份运行安装程序和命令工具

  • 我已经删除现在的服务使用SC命令和编辑注册表(尝试两种方法)

  • 我已经尝试使用安装程序安装CouchDB后运行以下命令创建该服务:




erlsrv.exe添加Apache CouchDB-workdir%COUCH%\bin-onfail
restart_always - args-sasl errlog_type error -s couch + A 4 + W w
-commentApache CouchDB 1.6.1


这似乎创建一个服务(您可以在Windows服务中看到),但任何尝试启动服务都会导致错误:


Windows无法在本地计算机上启动Apache CouchDB服务。



错误1067:进程意外终止。





  • 我已经尝试卸载Cou chDB应用程序,重新启动服务器,再次使用安装程序重新安装CouchDB。没有喜悦然后尝试运行命令创建服务。仍然没有喜悦。

  • 当我使用命令


    erlsrv列表


    < blockquote>



我可以看到过去尝试添加的服务。任何尝试删除它们都会导致错误消息:


erosrv:无法删除服务(没有足够的权限?)



错误:句柄无效


(我使用erlsrv提供的句柄列表命令)




  • 事件日志中没有事件,我可以找到解释为什么这是失败的



如何让CouchDB正确的安装?

解决方案

TL; DR:重新安装在没有空格的目录路径中,然后手动创建服务。



确定在Google Googling的某个时刻,我遇到了这个答案,这给了我一个线索,我应该安装在没有空格的路径在里面。所以我的解决方案是:




  • 通过Windows控制面板卸载CouchDB应用程序。

  • 运行在任何CouchDB的其余安装中都可以使用uninstall.exe,并删除这些目录。

  • 使用SC命令删除现有的服务。

  • 使用安装程序重新安装C:\CouchDB(注意:没有空格!)。选择安装为服务的选项(尽管这不起作用)。

  • 运行该命令手动创建服务。请注意,我没有使用%COUCH%变量,因为它在我的系统上似乎不存在:




erlsrv.exe添加CouchDB-workdirC:\CouchDB\bin-onfail restart_always -args-sasl errlog_type error -s couch + A 4 + W w-commentCouchDB 1.6.1


此命令最终设法正确创建正确启动的CouchDB的Windows服务。浏览 http:// localhost:5984 / _utils / 现在让我进入了Futon UI。放松吧!


I have previously installed CouchDB on my Azure Windows VM (Classic) without any problems using the installer setup-couchdb-1.6.1_R16B02.exe downloaded from http://couchdb.apache.org/

Today I have uninstalled the existing CouchDB installation and service with the intention of installing it again from scratch. Unfortunately, whenever I run the installer now it fails to create a windows service. More info:

  • I am running the installer and the command tool as Administrator
  • I have removed existing services using the SC command and by editing the registry (tried both methods)
  • I have tried creating the service after installing CouchDB using the installer by running the command:

erlsrv.exe add "Apache CouchDB" -workdir "%COUCH%\bin" -onfail restart_always -args "-sasl errlog_type error -s couch +A 4 +W w" -comment "Apache CouchDB 1.6.1"

This seems to create a service (which you can see in the Windows Services) but any attempt to start the service results in an error:

Windows could not start the Apache CouchDB service on Local Computer.

Error 1067: The process terminated unexpectedly.

  • I have tried uninstalling the CouchDB application, restarting the server, re-installing CouchDB using the installer again. No joy. Also then tried running the command to create the service. Still no joy.
  • When I use the command

    erlsrv list

I can see the services that I've tried to add in the past. Any attempt to remove them results in the error message:

erosrv: Unable to remove service (not enough privileges?)

Error: The handle is invalid

(I am using the handle as provided by the erlsrv list command)

  • there are no events in the events log that I can find that explain why this is failing

How can I get CouchDB to install as a service correctly?

解决方案

TL;DR: Re-install in a directory path with no spaces in it, then manually create the service.

OK so at some point in my Googling today I came across this answer which gave me the clue that I should install in a path without spaces in it. So my solution was to:

  • uninstall the CouchDB application via Windows Control Panel.
  • run the uninstall.exe in any remaining installations of CouchDB and delete those directories.
  • remove the existing services using the SC command.
  • reinstall using the installer into C:\CouchDB (note: no spaces!). Select the option to install as a service (even though this doesn't quite work).
  • run the command to manually create the service. Note that I'm not using the %COUCH% variable as it doesn't seem to exist on my system at this point:

erlsrv.exe add "CouchDB" -workdir "C:\CouchDB\bin" -onfail restart_always -args "-sasl errlog_type error -s couch +A 4 +W w" -comment "CouchDB 1.6.1"

This command finally managed to properly create a windows service for CouchDB that started correctly. Browsing to http://localhost:5984/_utils/ now brings me to the Futon UI. And relax!

这篇关于CouchDB不会在Azure Windows VM上安装服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆