RabbitMQ 未在 Ubuntu 18.04 上以消息 "init terminating in do_boot, noproc" 开头
RabbitMQ not starting with message "init terminating in do_boot, noproc" on Ubuntu 18.04
我似乎无法再为我的 Ubuntu 18.04 启动或安装我的 RabbitMQ 服务器了。我尝试删除并重新安装它,但由于配置失败,它无法完成安装。当我尝试 运行 sudo apt-get install --fix-broken
时。这是它失败的结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up rabbitmq-server (3.6.10-1) ...
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-08-22 09:16:51 EEST; 5ms ago
Process: 20997 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=70)
Process: 20996 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=0/SUCCESS)
Main PID: 20996 (code=exited, status=0/SUCCESS)
elo 22 09:16:48 ubuntu-dev systemd[1]: Starting RabbitMQ Messaging Server...
elo 22 09:16:49 ubuntu-dev rabbitmq[20997]: Waiting for 'rabbit@ubuntu-dev'
elo 22 09:16:49 ubuntu-dev rabbitmq[20997]: pid is 21001
elo 22 09:16:51 ubuntu-dev rabbitmq[20997]: Error: process_not_running
elo 22 09:16:51 ubuntu-dev systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=70
elo 22 09:16:51 ubuntu-dev systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
elo 22 09:16:51 ubuntu-dev systemd[1]: Failed to start RabbitMQ Messaging Server.
dpkg: error processing package rabbitmq-server (--configure):
installed rabbitmq-server package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后在检查日志文件时,他们也没有提供更多信息。这是 startup_err 日志文件内容:
init terminating in do_boot (noproc)
Crash dump is being written to: erl_crash.dump...done'
这里是 startup_log 文件内容:
BOOT FAILED
===========
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/rabbit.log
/var/log/rabbitmq/rabbit-sasl.log
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,842}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,281}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
=INFO REPORT==== 22-Aug-2018::09:16:49.691453 ===
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/rabbit.log
/var/log/rabbitmq/rabbit-sasl.log
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,842}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,281}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
{"init terminating in do_boot",noproc}
它声称用于记录的其他日志文件是空的。例如日志文件 rabbit@ubuntu-dev.log
和 rabbit@ubuntu-dev-sasl.log
.
我还找到了 post,这说明要在 /etc/hostname 文件中检查您的主机名,但我检查过它是正确的。
kazhu@ubuntu-dev:/var/log/rabbitmq$ cat /etc/hostname
ubuntu-dev
我还查看了 RabbitMQ 故障排除指南,他们说要检查日志文件夹权限,他们是对的:
kazhu@ubuntu-dev:/var/log/rabbitmq$ ll
total 48
drwxr-xr-x 2 rabbitmq rabbitmq 4096 kesä 14 06:16 ./
drwxrwxr-x 16 root syslog 4096 elo 22 00:09 ../
-rw-r--r-- 1 rabbitmq rabbitmq 0 kesä 14 06:16 'rabbit@ubuntu-dev.log'
-rw-r--r-- 1 rabbitmq rabbitmq 5247 kesä 14 06:16 'rabbit@ubuntu-dev.log.1'
-rw-r--r-- 1 rabbitmq rabbitmq 954 touko 28 08:36 'rabbit@ubuntu-dev.log.2.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 768 touko 21 07:11 'rabbit@ubuntu-dev.log.3.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 708 touko 16 00:12 'rabbit@ubuntu-dev.log.4.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 955 touko 7 07:26 'rabbit@ubuntu-dev.log.5.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 4264 huhti 22 00:07 'rabbit@ubuntu-dev.log.6.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 0 huhti 17 15:58 'rabbit@ubuntu-dev-sasl.log'
-rw-r--r-- 1 rabbitmq rabbitmq 95 elo 22 09:16 startup_err
-rw-r--r-- 1 rabbitmq rabbitmq 1212 elo 22 09:16 startup_log
指南还指出 perl chrash 转储文件包含问题的详细信息并且需要 Erlang 专业知识,而我没有。所以决定upload把文件放到我的Dropbox给你看。
有人可以帮我解决这个问题吗?我自己尝试了一段时间但放弃了,因为无法弄清楚问题似乎是什么:/
在同事的帮助下我解决了这个问题。我已经分别从外部 apt 源安装了最新的 erlang 和 rabbitmq。现在,当我删除并清除与 rabbitmq 和 erlang 相关的所有内容时,也删除了添加的 apt 源。然后我只是 运行 sudo apt install rabbitmq-server
并且由于依赖关系它也想安装 erlang 包。它安装了,之后一切正常。
如果其他人遇到与我相同的问题,我想分享这个解决方案。
2020 年 12 月 9 日更新:
有人问我如何删除 RabbitMQ 和 Erlang。我不完全记得,但我想我是在遵循这个指南:https://www.rabbitmq.com/install-debian.html.
重点是从添加的存储库及其配置中删除已安装的 RabbitMQ 和 Erlang 包
sudo apt purge rabbitmq-server erlang
您可能需要使用
搜索其余的 erlang 包
apt list | grep erlang
然后您需要删除添加的 apt 存储库。通常在 Ubuntu 中添加的存储库位于 /etc/apt/sources.list.d/
文件夹下。寻找像 rabbitmq 和 erlang 这样的文件名。确保您没有删除任何其他文件!
在此之后 运行 sudo apt update
和 apt 应该删除已删除的 apt 存储库。然后 运行ning sudo apt install rabbitmq-server
应该可以解决问题并将 Erlang 包安装为依赖项。当然,以这种方式安装你得到的版本比使用添加的存储库要旧得多。
我似乎无法再为我的 Ubuntu 18.04 启动或安装我的 RabbitMQ 服务器了。我尝试删除并重新安装它,但由于配置失败,它无法完成安装。当我尝试 运行 sudo apt-get install --fix-broken
时。这是它失败的结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up rabbitmq-server (3.6.10-1) ...
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-08-22 09:16:51 EEST; 5ms ago
Process: 20997 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=70)
Process: 20996 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=0/SUCCESS)
Main PID: 20996 (code=exited, status=0/SUCCESS)
elo 22 09:16:48 ubuntu-dev systemd[1]: Starting RabbitMQ Messaging Server...
elo 22 09:16:49 ubuntu-dev rabbitmq[20997]: Waiting for 'rabbit@ubuntu-dev'
elo 22 09:16:49 ubuntu-dev rabbitmq[20997]: pid is 21001
elo 22 09:16:51 ubuntu-dev rabbitmq[20997]: Error: process_not_running
elo 22 09:16:51 ubuntu-dev systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=70
elo 22 09:16:51 ubuntu-dev systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
elo 22 09:16:51 ubuntu-dev systemd[1]: Failed to start RabbitMQ Messaging Server.
dpkg: error processing package rabbitmq-server (--configure):
installed rabbitmq-server package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后在检查日志文件时,他们也没有提供更多信息。这是 startup_err 日志文件内容:
init terminating in do_boot (noproc)
Crash dump is being written to: erl_crash.dump...done'
这里是 startup_log 文件内容:
BOOT FAILED
===========
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/rabbit.log
/var/log/rabbitmq/rabbit-sasl.log
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,842}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,281}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
=INFO REPORT==== 22-Aug-2018::09:16:49.691453 ===
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/rabbit.log
/var/log/rabbitmq/rabbit-sasl.log
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,842}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,281}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
{"init terminating in do_boot",noproc}
它声称用于记录的其他日志文件是空的。例如日志文件 rabbit@ubuntu-dev.log
和 rabbit@ubuntu-dev-sasl.log
.
我还找到了
kazhu@ubuntu-dev:/var/log/rabbitmq$ cat /etc/hostname
ubuntu-dev
我还查看了 RabbitMQ 故障排除指南,他们说要检查日志文件夹权限,他们是对的:
kazhu@ubuntu-dev:/var/log/rabbitmq$ ll
total 48
drwxr-xr-x 2 rabbitmq rabbitmq 4096 kesä 14 06:16 ./
drwxrwxr-x 16 root syslog 4096 elo 22 00:09 ../
-rw-r--r-- 1 rabbitmq rabbitmq 0 kesä 14 06:16 'rabbit@ubuntu-dev.log'
-rw-r--r-- 1 rabbitmq rabbitmq 5247 kesä 14 06:16 'rabbit@ubuntu-dev.log.1'
-rw-r--r-- 1 rabbitmq rabbitmq 954 touko 28 08:36 'rabbit@ubuntu-dev.log.2.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 768 touko 21 07:11 'rabbit@ubuntu-dev.log.3.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 708 touko 16 00:12 'rabbit@ubuntu-dev.log.4.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 955 touko 7 07:26 'rabbit@ubuntu-dev.log.5.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 4264 huhti 22 00:07 'rabbit@ubuntu-dev.log.6.gz'
-rw-r--r-- 1 rabbitmq rabbitmq 0 huhti 17 15:58 'rabbit@ubuntu-dev-sasl.log'
-rw-r--r-- 1 rabbitmq rabbitmq 95 elo 22 09:16 startup_err
-rw-r--r-- 1 rabbitmq rabbitmq 1212 elo 22 09:16 startup_log
指南还指出 perl chrash 转储文件包含问题的详细信息并且需要 Erlang 专业知识,而我没有。所以决定upload把文件放到我的Dropbox给你看。
有人可以帮我解决这个问题吗?我自己尝试了一段时间但放弃了,因为无法弄清楚问题似乎是什么:/
在同事的帮助下我解决了这个问题。我已经分别从外部 apt 源安装了最新的 erlang 和 rabbitmq。现在,当我删除并清除与 rabbitmq 和 erlang 相关的所有内容时,也删除了添加的 apt 源。然后我只是 运行 sudo apt install rabbitmq-server
并且由于依赖关系它也想安装 erlang 包。它安装了,之后一切正常。
如果其他人遇到与我相同的问题,我想分享这个解决方案。
2020 年 12 月 9 日更新:
有人问我如何删除 RabbitMQ 和 Erlang。我不完全记得,但我想我是在遵循这个指南:https://www.rabbitmq.com/install-debian.html.
重点是从添加的存储库及其配置中删除已安装的 RabbitMQ 和 Erlang 包
sudo apt purge rabbitmq-server erlang
您可能需要使用
搜索其余的 erlang 包apt list | grep erlang
然后您需要删除添加的 apt 存储库。通常在 Ubuntu 中添加的存储库位于 /etc/apt/sources.list.d/
文件夹下。寻找像 rabbitmq 和 erlang 这样的文件名。确保您没有删除任何其他文件!
在此之后 运行 sudo apt update
和 apt 应该删除已删除的 apt 存储库。然后 运行ning sudo apt install rabbitmq-server
应该可以解决问题并将 Erlang 包安装为依赖项。当然,以这种方式安装你得到的版本比使用添加的存储库要旧得多。