出现的问题如下:
channel error; protocol method: #method(reply-code=404, reply-text=NOT_FOUND - no
channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no
1.下载依赖文件,确认安装的rabbit版本:
1》1 查看启动日志:
- docker logs -f 容器id
-
-
- 内容节选如下:
- 2023-10-23 15:23:58.117849+08:00 [info] <0.230.0> Starting RabbitMQ 3.12.6 on Erlang 25.3.2.7 [jit]
- 2023-10-23 15:23:58.117849+08:00 [info] <0.230.0> Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
- 2023-10-23 15:23:58.117849+08:00 [info] <0.230.0> Licensed under the MPL 2.0. Website: https://rabbitmq.com
-
- ## ## RabbitMQ 3.12.6
- ## ##
- ########## Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
- ###### ##
- ########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
-
- Erlang: 25.3.2.7 [jit]
- TLS Library: OpenSSL - OpenSSL 3.1.3 19 Sep 2023
- Release series support status: supported
-
- Doc guides: https://rabbitmq.com/documentation.html
- Support: https://rabbitmq.com/contact.html
- Tutorials: https://rabbitmq.com/getstarted.html
- Monitoring: https://rabbitmq.com/monitoring.html
-
- Logs:
-
- Config file(s): /etc/rabbitmq/conf.d/10-defaults.conf
确认安装版本为 3.12.6 下载plugins 地址:Community Plugins — RabbitMQ
找到如下的标签:需要跳转到github进行 文件下载:
在release -》 tag 中找到对应的版本进行下载:
安装依赖:进入到下载下来的文件位置:
[root@192 rabbitmq]# ll
总用量 48
drwxr-xr-x. 4 polkitd root 78 10月 23 16:05 data
drwxr-xr-x. 2 root root 6 10月 18 14:08 log
-rw-r--r--. 1 root root 48214 10月 23 12:24 rabbitmq_delayed_message_exchange-3.12.0.ez
3.12.0.ez 文件如下:
夸克网盘分享:「rabbitmq_delayed_message_exchange-3.12.0.ez」https://pan.quark.cn/s/d6c926cf6352
复制到容器中:
docker cp rabbitmq_delayed_message_exchange-3.12.0.ez d0d797af9715:/opt/rabbitmq/plugins/rabbitmq_delayed_message_exchange-3.12.0.ez
d0d797af9715:容器id
/opt/rabbitmq/plugins/rabbitmq_delayed_message_exchange-3.12.0.ez 复制到路径
rabbitmq添加依赖:
sbin 目录下执行rabbitmq-plugins enable rabbitmq_delayed_message_exchange
重启rabbitmq
eg:
-
- [root@192 rabbitmq]# docker ps
- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- 6cb0aa64afb3 mysql:8.0.32 "docker-entrypoint.s…" 3 days ago Up 8 hours 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp mysql-8.0.32
- d0d797af9715 rabbitmq:management "docker-entrypoint.s…" 5 days ago Up 2 hours 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp, :::15672->15672/tcp rabbitmq-management
- 114f10cb3615 redis:6.2.12 "docker-entrypoint.s…" 5 days ago Up 8 hours 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis-server
- [root@192 rabbitmq]# docker restart d0d797af9715
- d0d797af9715
然后登录管理界面:在exchange 界面 点击 有没有出现最下面的delayed message
docker 安装可以参考下面的内容:docker-安装rabbitmq链接