linux 已经安装好docker环境。
rabbitMQ是一个消息队列软件
rabbitMQ的特性:消息持久化:从内存持久化消息到硬盘,再从硬盘加载到内存。
增加备注:
查看rabbitmq当前用户列表
[root@manager1 home]# docker exec -it rabbitmq /bin/bash #进入rabbitmq容器
root@3812306d62b0:/# rabbitmqctl list_users #查看当前用户列表
Listing users ...
usertags
admin[administrator]
root@3812306d62b0:/# rabbitmqctl change_password admin '12345678' #修改密码
Changing password for user "admin" ...
修改密码后,rabbitMQ 的web界面会弹出重新输入账号和密码
rabbitMQ官网:https://www.rabbitmq.com/#features
rabbitmq端口说明
5672 :这是rabbitMQ的端口号;
15672 :这是那个RabbitMQ的web页面的端口号;
问题1:
linux内存不足导致rabbitMQ容器自动退出
rabbitMQ日志如下
22-09-16 09:02:55.630089+00:00 [error] <0.370.0> {string,tokens,2,[{file,"string.erl"},{line,1934}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {rabbit_disk_monitor,parse_free_unix,1,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"rabbit_disk_monitor.erl"},{line,262}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {rabbit_disk_monitor,internal_update,1,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"rabbit_disk_monitor.erl"},{line,216}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {rabbit_disk_monitor,handle_info,2,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"rabbit_disk_monitor.erl"},{line,166}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {gen_server,try_dispatch,4,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"gen_server.erl"},{line,695}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {gen_server,handle_msg,6,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"gen_server.erl"},{line,771}]},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {proc_lib,init_p_do_apply,3,
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> [{file,"proc_lib.erl"},{line,226}]}]}
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> offender: [{pid,<0.30257.38>},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {id,rabbit_disk_monitor},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {mfargs,{rabbit_disk_monitor,start_link,[50000000]}},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {restart_type,{transient,1}},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {shutdown,300000},
2022-09-16 09:02:55.630089+00:00 [error] <0.370.0> {child_type,worker}]
2022-09-16 09:03:01.630751+00:00 [info] <0.23385.44> Enabling free disk space monitoring
2022-09-16 09:03:01.663287+00:00 [info] <0.23385.44> Disk free limit set to 50MB
eheap_alloc: Cannot allocate 1898305688 bytes of memory (of type "old_heap").
Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done
rabbitMQ的特性:消息持久化:从内存持久化消息到硬盘,再从硬盘加载到内存。所以查看一下内存,发现swap的内存空间也用完了。后面给服务器增加内存,重新运行rabbitmq容器。