ubuntu 22.04 系统,运行RabbitMQ启动命令"service rabbitmq-server start"时出错,提示如下:
- root@mq00b34:~# service rabbitmq-server start
- Job for rabbitmq-server.service failed because the control process exited with error code.
- See "systemctl status rabbitmq-server.service" and "journalctl -xeu rabbitmq-server.service" for details.
- root@mq00b34:~# ^C
复制代码
根据提示,执行了 journalctl -xe ,定位到详细的报错日志信息;
通过这个执行到命令行后,会打印出非常多的问题信息,让我们继续往下定位到ERROR处:- Feb 08 13:51:47 mq00b34 rabbitmq-server[1329294]: Configuring logger redirection
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.526 [error] Error parsing configuration:
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.538 [error] File operation error: eacces. Target: /etc/rabbitmq/rabbitmq.conf. Function: get_file. Process: rabbit_prelau>
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.543 [error] - Could not open file (/etc/rabbitmq/rabbitmq.conf) for Reason undefined
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.544 [error] Are these files using the Cuttlefish format?
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.546 [error]
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.546 [error] BOOT FAILED
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: BOOT FAILED
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.546 [error] ===========
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: ===========
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.546 [error] Error during startup: {error,failed_to_parse_configuration_file}
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: Error during startup: {error,failed_to_parse_configuration_file}
- Feb 08 13:51:48 mq00b34 rabbitmq-server[1329294]: 13:51:48.546 [error]
- Feb 08 13:51:49 mq00b34 rabbitmq-server[1329294]: 13:51:49.548 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase()>
- Feb 08 13:51:49 mq00b34 rabbitmq-server[1329294]: 13:51:49.548 [error] CRASH REPORT Process <0.152.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelau>
- Feb 08 13:51:51 mq00b34 rabbitmq-server[1329294]: {"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,p>
- Feb 08 13:51:51 mq00b34 rabbitmq-server[1329294]: Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,pr>
- Feb 08 13:51:51 mq00b34 rabbitmq-server[1329294]:
- Feb 08 13:51:51 mq00b34 rabbitmq-server[1329294]: Crash dump is being written to: erl_crash.dump...done
- Feb 08 13:51:51 mq00b34 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
复制代码 通过以上错误信息,检查 /etc/rabbitmq/rabbitmq.conf 配置文件有没有错误,发现abbitmq.conf文件权限为640,把权限改为644,再次启动服务,一切正常。
|
|