[root@zhangsan Desktop]# rabbitmq-plugins enable rabbitmq_management
{:query, :rabbit@zhangsan, {:badrpc, :timeout}}
原因:Linux主机名不是默认的localhost 所以导致无法启动插件
原因:hostname没有追加到/etc/hosts文件中,所以通过默认localhost hostname访问服务发生timeout。
建议将追加到/etc/hosts
解决方案:
方案一:(推荐)
参考:https://blog.csdn.net/G971005287W/article/details/109811697
linux 主机名需要改为默认的 localhost
使用命令 vim /etc/hostname 修改hostname文件
例如将 zhangsan.localdomain 修改为 localhost.localdomain
保存 然后重启
reboot
方案二:(没尝试过)
修改hosts
127.0.0.1 localhost zhangsan.localdomain localhost4 localhost4.localdomain4
在mq目录下 etc/rabbitmq目录下创建文件enabled_plugins,内容如下:
[rabbitmq_management].
- 然后用如下命令启动rabbitmq_management插件
umask 0022; rabbitmq-plugins enable rabbitmq_management
三、问题Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'CRM-weixin-msg' in vhost '/': received 'false' but current is 'true', class-id=50, method-id=10)
正常访问该地址:https://xxx.xxx.com/mq/ 时能正常跳转,
但是 rabbitmq management 的 API url 出现了 %2f 字符,这些字符会在经过 nginx 被转换为/
解决方案:
修改 nginx 配置文件
location ^~ /mq/ {
proxy_pass http://127.0.0.1:15672/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
if ($request_uri ~* "/mq/(.*)"){
proxy_pass http://127.0.0.1:15672/$1;
break;
五、添加用户
六、添加权限
publisher-confirms: true
#如果对异步消息需要回调必须设置为true 因为新版本的写法是这个:
publisher-confirm-type: correlated
八、启动报错
rabbitmq-server
{"Kernel pid terminated",application_controller,"{application_start_failure,credentials_obfuscation,{{shutdown,{failed_to_start_child,credentials_obfuscaton_svc,{undef,[{crypto,hmac,[sha512,<<148,100,10,205,43,13,57,212,159,248,66,16,223,30,106,236,93,200,199,186,215,209,178,218,24,108,247,206,195,176,26,73,159,176,143,36,163,108,227,196,240,126,228,188,48,16,175,60,240,190,78,11,38,3,5,109,25,69,149,217,214,83,229,185,3,53,186,38,147,65,255,219,6,23,184,110,45,237,83,240,78,227,202,132,135,5,3,96,132,41,214,222,130,235,188,132,196,191,61,51,233,95,76,43,111,68,113,84,145,1,101,13,82,174,205,125,206,79,8,244,178,168,86,139,55,153,15,105>>,[<<177,166,225,125,199,66,253,47,247,119,51,111,147,203,205,7>>,<<0,0,0,1>>],64],[]},{credentials_obfuscation_pbe,xor_sum,7,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,276}]},{credentials_obfuscation_pbe,blocks,10,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,268}]},{credentials_obfuscation_pbe,make_key,5,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,125}]},{credentials_obfuscation_pbe,encrypt,5,[{file,\"src/credentials_obfuscation_pbe.erl\"},{line,107}]},{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,423}]}]}}},{credentials_obfuscation_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,credentials_obfuscation,{{shutdown,{failed_to_start_child,credentials_obfuscaton_svc,{undef,[{crypto,hmac,[sha512,<<148,100,1
Crash dump is being written to: erl_crash.dump...done
删除旧版的 erlang 及 rabbitmq 再重新配置安装新版的
maven中的仓库分为两种,snapshot快照仓库和release发布仓库。snapshot快照仓库用于保存开发过程中的不稳定版本,release正式仓库则是用来保存稳定的发行版本。定义一个组件/模块为快照版本,只需要在pom文件中在该模块的版本号后加上-SNAPSHOT即可(注意这里必须是大写),如下:
<groupId>com.jd.m</groupId>
问题概述:借助MyEclipse直接建立了一个Servlet类,每次访问这个Servlet都能访问。可自己建立一个Servlet为什么总提示:HTTP Status 405 - HTTP method GET is not supported by this URL。的确是继承了HttpServlet,而且是重写了它的doGet()、doPost()方法(注意这两种方法一定要写)
public...
application.yml中添加
这个启动HiddenHttpMethodFilter过滤器,以支持浏览器可以发送DELETE PUT 请求。而我没用浏览器发送请求,而是用postman,所以无用也正常。第三
安装环境:虚拟机: VM16+CentOS7Erlang:erlang-23.0.2-1.el7.x86_64RabbitMQ:rabbitmq-server-3.8.4-1.el7.noarch安装步骤1:安装依赖RabbitMQ的安装需要首先安装Erlang,需要依赖socat和logrotate。RabbitMQ与Erlang的兼容关系详见:RabbitMQ Erlang Version Requirements — RabbitMQlogrotate操作系统中已经存在,无需进行安装1.1:安装依赖s
cd到目录/etc/rabbitmq/conf.d/,然后执行以下命令:
echo management_agent.disable_metrics_collector = false > management_agent.disable_metrics_collector.con
CentOS7安装RabbitMQ与登录1. 下载2. 安装2.1 安装erlang语言环境2.2 安装rabbitmq3. 配置可视化-登录rabbitMQ管理页面3.1. 首先添加可视化插件:3.2. 安装成功后登录3.3 登录失败问题处理
本文参考 :
https://www.cnblogs.com/yunwangjun-python-520/p/11296093.html#_label0_...
RabbitMq报错:channel error; protocol method: #method<channel.close>(reply-code=405, reply-text=RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'hello' in vhost '/'. It could be originally declared on another connection or the exclusive prope
RabbitMQ遇到 Management API returned status code 500 记录解决
1、问题描述:
这几天公司的RabbitMq总是频繁的出现问题,测试人员说mq连接不上了,总是出现Management API returned status code 500的错误,说明mq服务挂了,领导一直在邮件中**@我**,说mq耽误项目测试进度了,头都大了,各种找解决办...