couchdb.service:失败,结果为';开始极限命中';

couchdb.service:失败,结果为';开始极限命中';,couchdb,Couchdb,安装couchdb后,我可以获得欢迎信息 $ curl localhost:5984 {"couchdb":"Welcome","version":"2.1.2","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}} 但是我无法通过systemctl $ systemctl status couchdb.service ● couchdb.service Loaded: n

安装couchdb后,我可以获得欢迎信息

$ curl localhost:5984       
{"couchdb":"Welcome","version":"2.1.2","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
但是我无法通过
systemctl

$ systemctl status  couchdb.service
● couchdb.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: start-limit-hit) since 一 2018-12-03 14:52:14 CST; 6min ago
 Main PID: 30946 (code=killed, signal=USR2)

12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Unit entered failed state.
12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Failed with result 'signal'.
12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Service hold-off time over, scheduling restart.
12月 03 14:52:14 gpuhuawei systemd[1]: Stopped Apache CouchDB.
12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Start request repeated too quickly.
12月 03 14:52:14 gpuhuawei systemd[1]: Failed to start Apache CouchDB.
12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Unit entered failed state.
12月 03 14:52:14 gpuhuawei systemd[1]: couchdb.service: Failed with result 'start-limit-hit'.
12月 03 14:53:53 gpuhuawei systemd[1]: Stopped Apache CouchDB.
12月 03 14:53:53 gpuhuawei systemd[1]: Stopped Apache CouchDB.
当我通过命令行运行couchdb时,我得到

$ couchdb 
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/etc/couchdb/default.ini","/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{error,eacces}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,56}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,273}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
[1]    2288 user-defined signal 2  couchdb
我的工作环境

$ uname -a
Linux gpuhuawei 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

这有点晚了,但“开始限制命中”的信息是一种误导。我在使用MySQL的Moodle安装中看到了非常类似的情况,它实际上是说您(或服务启动过程)尝试重新启动数据库的次数太多,或者在尝试启动失败后太快。基本上,这个开始限制命中消息是说“停止尝试做同样的事情,期待不同的结果”


实际问题将在系统日志中进一步讨论。毫无帮助的是,服务状态并没有返回足够的错误消息行来实际查看错误。尝试一次服务启动,并查看实际的系统日志,您将看到一系列的启动尝试,每个尝试上方的一行有望告诉您实际的问题。在我这里的例子中,您可以看到问题在于缺少包含数据库的装载点-谢谢,Azure。对于服务启动的一次尝试,它尝试快速连续启动5次,每次都失败,因为数据目录未装入,而在第六次尝试时,由于达到启动限制而失败

升级CouchDB之前,请始终备份数据/和etc/目录

We recommend that you overwrite your etc/default.ini file with the version provided by the new release. New defaults sometimes contain mandatory changes to enable default functionality. Always places your customization in etc/local.ini or any etc/local.d/*.ini file.
(有人跟踪我,结果成功了)


似乎您在读取/写入couchdb文件夹时遇到了一些问题。您是否以正确的用户权限运行couchdb?@Juanjordriguez,谢谢您的评论。我尝试了
sudo systemctl start couchdb
,但问题是相同的。服务是使用SO用户启动couchdb,我想是couchdb。SO用户couchdb应该可以访问couchdb所需的文件系统资源。