rabbitMQ常用命令及常见错误

一、常用命令

rabbitmq-server -detached  启动RabbitMQ服务
rabbitmqctl stop 关闭RabbitMQ服务
rabbitmqctl start_app 启动RabbitMQ应用,而不是服务
rabbitmqctl stop_app  停止
rabbitmqctl status  查看状态
rabbitmqctl add_user mq 123456 新增账户
rabbitmqctl set_user_tags mq administrator 给账户设置角色
rabbitmq-plugins enable rabbitmq_management  启用管理插件
rabbitmqctl cluster_status 集群状态
rabbitmqctl forget_cluster_node rabbit@rabbit3 节点摘除 
rabbitmqctl reset application重置
rabbitmqctl set_cluster_name  rabbit@rabbit1 修改集群名称
rabbitmqctl join_cluster rabbit@rabbit1 --ram  以ram形式加入集群
rabbitmqctl change_cluster_node_type ram  更改为ram模式
rabbitmq-plugins enable rabbitmq_tracing 启用日志插件
rabbitmq-plugins disable rabbitmq_tracing 停用日志插件
rabbitmqctl trace_on -p [virtual host]  启用日志监控
rabbitmqctl trace_off -p [virtual host]  停用用日志监控

二、常见错误

1.若启动时报错ERROR: node with name “rabbit” already running on “localhost”,则

[root@orcldb sbin]# ps aux|grep erl
root      12262  0.0  0.0  44728   772 ?        S    17:10   0:00 /usr/lib64/erlang/erts-10.7.1/bin/epmd -daemon
root      12383  0.3  0.3 5466696 77204 ?       Sl   17:10   0:15 /usr/lib64/erlang/erts-10.7.1/bin/beam.smp -W w -A 128 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -K true -- -root /usr/lib64/erlang -progname erl -- -home /root -- -pa /usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/ebin  -noshell -noinput -s rabbit boot -sname rabbit@orcldb -boot start_sasl -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit lager_log_root "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/log/rabbitmq" -rabbit lager_default_file "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/log/rabbitmq/rabbit@orcldb.log" -rabbit lager_upgrade_file "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/log/rabbitmq/rabbit@orcldb_upgrade.log" -rabbit feature_flags_file "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/lib/rabbitmq/mnesia/rabbit@orcldb-feature_flags" -rabbit enabled_plugins_file "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/plugins" -rabbit plugins_expand_dir "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/lib/rabbitmq/mnesia/rabbit@orcldb-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/usr/local/xiaoll/rabbitMQ/rabbitmq_server-3.7.25/var/lib/rabbitmq/mnesia/rabbit@orcldb" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672 -noshell -noinput --
root      12514  0.0  0.0   4300   536 ?        Ss   17:10   0:00 erl_child_setup 1024
root      18668  0.0  0.0 112648   956 pts/0    S+   18:25   0:00 grep --color=auto erl
[root@orcldb sbin]# 
[root@orcldb sbin]# 
[root@orcldb sbin]# kill -9 12383

2.若出现以下错误

[root@node01 rabbitMQ]# rpm -ivh erlang-22.3.2-1.el7.x86_64.rpm 
警告:erlang-22.3.2-1.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 6026dfca: NOKEY
错误:依赖检测失败:
        libcrypto.so.10(OPENSSL_1.0.2)(64bit) 被 erlang-22.3.2-1.el7.x86_64 需要

则升级 openssl-libs-1.0.2k-19.el7.x86_64.rpm(下载地址:http://rpmfind.net/linux/centos/7.7.1908/os/x86_64/Packages/openssl-libs-1.0.2k-19.el7.x86_64.rpm),再安装Erlang

[root@node01 rabbitMQ]# rpm -ivh openssl-libs-1.0.2k-19.el7.x86_64.rpm --force       
警告:openssl-libs-1.0.2k-19.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:openssl-libs-1:1.0.2k-19.el7     ################################# [100%]

3.脑裂(因网络中断或其他原因导致连接断开,又重新连上时)

问题错误信息(管理界面首页)

Network partition detected

Mnesia reports that this RabbitMQ cluster has experienced a network partition. There is a risk of losing data. Please read RabbitMQ documentation about network partitions and the possible solutions.

1.修改配置文件

[root@node01 sbin]# vi ../etc/rabbitmq/rabbitmq.conf

2.增加以下配置

#暂停少数
cluster_partition_handling=pause_minority
展开阅读全文

Windows版YOLOv4目标检测实战:训练自己的数据集

04-26
©️2020 CSDN 皮肤主题: 数字20 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值