在全新安装的 Redhat8 上,在新的 EC2 实例上,RabbitMQ 失败,failed_to_start_child

在全新安装的 Redhat8 上,在新的 EC2 实例上,RabbitMQ 失败,failed_to_start_child

更新:

如果我做:

yum upgrade

我懂了:

Skip Packages With Broken Dependencies When 

我该如何解决?

旧帖:

我在这里找到了该文件erl_crash.dump

/var/lib/rabbitmq/erl_crash.dump 

如果我这样做:

head -n 50 /var/lib/rabbitmq/erl_crash.dump

我得到:

=erl_crash_dump:0.5
Tue Mar  1 20:00:36 2022
Slogan: Kernel pid terminated (application_controller) ({application_start_failure,credentials_obfuscation,{{shutdown,{failed_to_start_child,credentials_obfuscaton_svc,{undef,[{crypto,macN,[hmac,sha256,<<185,
System version: Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]
Compiled: Fri Sep  6 18:47:55 2019
Taints: crypto
Atoms: 13923
Calling Thread: scheduler:1
=scheduler:1
Scheduler Sleep Info Flags: 
Scheduler Sleep Info Aux Work: THR_PRGR_LATER_OP
Current Port: 
Run Queue Max Length: 0
Run Queue High Length: 0
Run Queue Normal Length: 0
Run Queue Low Length: 0
Run Queue Port Length: 0
Run Queue Flags: OUT_OF_WORK | HALFTIME_OUT_OF_WORK | NONEMPTY | EXEC
Current Process: <0.0.0>
Current Process State: Running
Current Process Internal State: ACT_PRIO_NORMAL | USR_PRIO_NORMAL | PRQ_PRIO_NORMAL | ACTIVE | RUNNING
Current Process Program counter: 0x0000ffff5cd5d020 (init:printable_list/1 + 24)
Current Process CP: 0x0000ffff5cd5dcc8 (init:boot_loop/2 + 1944)
Current Process Limited Stack Trace:
0x0000ffff5a93b9f0:SReturn addr 0xACD16DC0 (<terminate process normally>)

我不确定该如何解读。这是failed_to_start_child错误吗?如果是,这是什么意思?我该如何修复它?

我有一个新的 EC2 实例,并全新安装了 Redhat8,所有内容都已安装yum或安装完毕dnf,但 RabbitMQ 不断出现错误,它尝试启动但立即失败。如果我这样做:

tail -n 500 /var/log/messages

然后我看到这条信息一遍又一遍地重复:

Mar  1 18:23:47 ip-172-31-56-22 rabbitmq-server[350248]: {"Kernel pid terminated",application_controller,"{application_start_failure,credentials_obfuscation,{{shutdown,{failed_to_start_child,credentials_obfuscaton_svc,{undef,[{crypto,macN,[hmac,sha256,<<80,84,120,32,178,183,28,70,220,34,20,13,145,69,180,207,145,18,30,76,255,205,110,198,166,173,68,94,39,2,201,5,116,139,211,47,32,125,29,33,161,98,58,78,127,162,252,146,192,110,153,88,149,58,190,136,74,66,191,238,168,79,190,2,120,197,45,101,48,216,168,33,102,142,44,160,25,38,229,27,132,117,91,23,171,84,244,84,230,129,67,131,57,152,36,238,207,222,137,164,79,90,128,114,75,111,48,205,252,239,253,68,193,32,61,190,149,117,145,224,144,191,59,109,247,145,102,240>>,[<<167,114,26,126,33,160,146,70,65,253,176,24,5,41,155,193>>,<<0,0,0,1>>],32],[]},{credentials_obfuscation_pbe,xor_sum,7,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,160}]},{credentials_obfuscation_pbe,blocks,10,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,152}]},{credentials_obfuscation_pbe,make_key,5,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,94}]},{credentials_obfuscation_pbe,encrypt,5,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,76}]},{credentials_obfuscation_svc,check,3,[{file,\"src/credentials_obfuscation_svc.erl\"},{line,163}]},{credentials_obfuscation_svc,init_state,0,[{file,\"src/credentials_obfuscation_svc.erl\"},{line,133}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]}]}}},{credentials_obfuscation_app,start,[normal,[]]}}}"}
Mar  1 18:23:47 ip-172-31-56-22 rabbitmq-server[350248]: Kernel pid terminated (application_controller) ({application_start_failure,credentials_obfuscation,{{shutdown,{failed_to_start_child,credentials_obfuscaton_svc,{undef,[{crypto,macN,[hmac,sha256,<<80,8
Mar  1 18:23:47 ip-172-31-56-22 rabbitmq-server[350248]: #015
Mar  1 18:23:47 ip-172-31-56-22 rabbitmq-server[350248]: Crash dump is being written to: erl_crash.dump...done
Mar  1 18:23:47 ip-172-31-56-22 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
Mar  1 18:23:47 ip-172-31-56-22 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
Mar  1 18:23:47 ip-172-31-56-22 systemd[1]: Failed to start RabbitMQ broker.

我正在努力思考问题出在哪里。我相信我已经打开了所有必要的端口。

Crash dump is being written to: erl_crash.dump...done

我读过这个:

https://stackoverflow.com/questions/63053451/distribution-failed-failed-to-start-child-rabbitmq-docker-compose-issue

我已经在安全组上开放了端口 4369,但这没有帮助。

如果我运行:

epmd -names

我得到:

epmd: up and running on port 4369 with data

因此这是可行的,但是 RabbitMQ 却不行。

如果我这样做:

rabbitmqctl start_app 

我得到:

Starting node rabbit@ip-172-31-56-22 ...
Error: unable to perform an operation on node 'rabbit@ip-172-31-56-22'. Please see diagnostics information and suggestions below.

Most common reasons for this are:

 * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
 * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
 * Target node is not running

In addition to the diagnostics info below:

 * See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@ip-172-31-56-22
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools

DIAGNOSTICS
===========

attempted to contact: ['rabbit@ip-172-31-56-22']

rabbit@ip-172-31-56-22:
  * connected to epmd (port 4369) on ip-172-31-56-22
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on ip-172-31-56-22
  * suggestion: start the node

Current node details:
 * node name: 'rabbitmqcli-871-rabbit@ip-12-131-56-22'
 * effective user's home directory: /var/lib/rabbitmq
 * Erlang cookie hash: Gug6Jfak+f3/k+ww6vhA==

我感觉有些东西安装失败了。每当我使用时,我都会看到有关 RabbitMQ 的信息,即使我的命令与 RabbitMQ 无关。例如,我这样做:

sudo yum install screen

部分输出如下:

rabbitmq_rabbitmq-server                                                                    5.2 kB/s | 1.8 kB     00:00    

rabbitmq_rabbitmq-server-source                                                                   3.4 kB/s | 951  B     00:00 

我每次使用时都会看到这两行yum install,每次使用时都会提到 RabbitMQ,这让我感到不安,yum install好像存在一些奇怪的缓存失败问题。

我还看到了这个:

 [/usr/lib/tmpfiles.d/rabbitmq-server.conf:1] Line references path below legacy directory /var/run/, updating /var/run/rabbitmq → /run/rabbitmq; please update the tmpfiles.d/ drop-in file accordingly.

答案1

答案2

显然有些安装出了问题。运行时我注意到了此消息yum install

“跳过依赖关系损坏的软件包”

我无法修复此问题。我不得不放弃该 EC2 实例,然后重新开始使用新的 EC2 实例。

相关内容