Couchdb 3.2.2 在安装后无法启动

Couchdb 3.2.2 does not start on boot after instaltion

我安装了couchdb 3.2.1。该服务在服务器启动时自动启动。自动升级到 3.2.2 后,一切都出错了,我删除了 3.2.1 并重新安装了 3.2.2。如果服务器启动,除了服务启动外,一切正常。我该怎么做才能解决这个问题?谢谢。

编辑: 根据 Honeywild 的建议,我确认该服务已启用。我重新启动服务器,couchdb 没有再次启动。在日志中出现了这个:

[error] 2022-04-26T12:49:53.718192Z couchdb@127.0.0.1 <0.3835.0> -------- OS Process died with status: 143
[error] 2022-04-26T12:49:53.719167Z couchdb@127.0.0.1 <0.3894.0> -------- OS Process died with status: 143
[error] 2022-04-26T12:49:53.838879Z couchdb@127.0.0.1 <0.3835.0> -------- gen_server <0.3835.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839013Z couchdb@127.0.0.1 <0.3835.0> -------- gen_server <0.3835.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839087Z couchdb@127.0.0.1 <0.3894.0> -------- gen_server <0.3894.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839171Z couchdb@127.0.0.1 <0.3894.0> -------- gen_server <0.3894.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.843963Z couchdb@127.0.0.1 <0.3835.0> -------- CRASH REPORT Process  (<0.3835.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3834.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 5062
[error] 2022-04-26T12:49:53.844450Z couchdb@127.0.0.1 <0.3835.0> -------- CRASH REPORT Process  (<0.3835.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3834.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 5062
[error] 2022-04-26T12:49:53.844742Z couchdb@127.0.0.1 <0.3894.0> -------- CRASH REPORT Process  (<0.3894.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3893.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 8319
[error] 2022-04-26T12:49:53.845669Z couchdb@127.0.0.1 <0.3894.0> -------- CRASH REPORT Process  (<0.3894.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3893.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 8319
[error] 2022-04-26T12:49:53.867452Z couchdb@127.0.0.1 <0.549.0> -------- gen_server <0.549.0> terminated with reason: killed
[error] 2022-04-26T12:49:53.867542Z couchdb@127.0.0.1 <0.549.0> -------- gen_server <0.549.0> terminated with reason: killed
[error] 2022-04-26T12:49:53.867706Z couchdb@127.0.0.1 <0.549.0> -------- CRASH REPORT Process  (<0.549.0>) with 0 neighbors exited with reason: killed at gen_server:decode_msg/9(line:475) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_multidb_changes,init,['Argument__1']}, ancestors: [<0.431.0>,couch_replicator_sup,<0.397.0>], message_queue_len: 0, links: [], dictionary: [], trap_exit: true, status: running, heap_size: 2586, stack_size: 28, reductions: 12699
[error] 2022-04-26T12:49:53.867823Z couchdb@127.0.0.1 <0.549.0> -------- CRASH REPORT Process  (<0.549.0>) with 0 neighbors exited with reason: killed at gen_server:decode_msg/9(line:475) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_multidb_changes,init,['Argument..

然后我简单地 运行 服务 couchdb 启动,它启动没有任何问题。 这种问题在以前的 couchdb 版本中没有发生,通常我简单地升级没有任何问题。我正在使用 Ubuntu 20.04.04 LTS。 还有更多想法吗?比你。

首先检查是否启用了systemctl服务,运行 systemctl is-enabled

sudo systemctl list-unit-files | grep enabled | grep couchdb

sudo systemctl list-unit-files --state=enabled | grep couchdb

如果控制台输出为空,运行:

sudo systemctl enable couchdb.service

然后再次检查:

sudo systemctl list-unit-files --state=enabled | grep couchdb

接下来,如果该服务已启用,那么你做对了,你遵循了一个很好的做法,即在日志中识别错误。

可能你试过:

sudo journalctl -u couchdb.service

然后你发现了你上面提到的错误。

进一步的研究步骤可以包括:

  1. 禁用systemd服务(临时):systemctl disable couchdb
  2. 重启
  3. 运行 手动应用程序而不是系统服务 /path/to/couchdb 并检查结果。
  4. 运行 手动使用 strace 应用程序 strace /path/to/couchdb 并检查结果。

还有一个想法:

你要确定服务是在网络启动后启动的

更多:

同意并一起进行诊断 session 以了解导致此错误的确切原因。

来自 couchdb 的更新解决了这个问题:现在 ubuntu 中的版本是 3.2.2-2。