couchdb.service:失败,结果为“ start-limit-hit”

时间:2018-12-03 07:06:19

标签: couchdb

在安装了Sofadb之后,我可以获得欢迎信息

$ 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

2 个答案:

答案 0 :(得分:0)

这有点晚,但是“ start-limit-hit”消息是一条红色鲱鱼。我已经看到使用MySQL安装Moodle的情况非常相似,实际上是在说您(或服务启动过程)在尝试启动失败后尝试太多次或太早地重新启动数据库。基本上,此开始-限制-命中信息是说“停止尝试做相同的事情并期待不同的结果”。

实际问题将在系统日志中进一步讨论。无助地,服务状态没有返回足够多的错误消息行以实际查看出什么问题。尝试启动服务,然后去查看实际的系统日志,您将看到一系列的启动尝试,并且每行上方都有一行希望可以告诉您实际的问题。在我的情况下,您可以看到问题是缺少包含数据库的安装点-谢谢,Azure。对于一次服务启动尝试,它尝试快速连续启动5次,每次都失败,因为未安装数据目录,而在第六次尝试失败,并显示start-limit-hit。 enter image description here

答案 1 :(得分:0)

在升级CouchDB之前总是备份data /和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.

(我一直遵循并奏效)

https://docs.couchdb.org/en/3.0.0/install/upgrading.html