Spring-boot集成RabbitMQ踩过的坑
2024-08-27 13:56:59
1.java.net.SocketException: socket closed
官方文档已经说明,新建user和guest的账户是没有远程登录的权限的 需要对登录所用账户授权
解决方法:
rabbitmqctl set_permissions -p /${user_name} user_admin '.*' '.*' '.*'
2.
An unexpected connection driver error occured 报错如下
[AMQP Connection 192.168.71.111:5672] WARN com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured (Exception message: Connection reset)
Exception in thread "main" com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:342)
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:62)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:99)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:900)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:817)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:954)
这是因为Rabbit里的queue 没有 注解@RabbitListener(queues = "namedQueue") queues的实例
解决方法:
添加监听的queues名称,保存 重启 。OK
最新文章
- MySQL ibdata1文件迁移
- 20145304 第五周Java学习报告
- MySQL(4):数据表创建
- iPhone开发 数据持久化总结(终结篇)—5种数据持久化方法对比
- POJ 3176:Cow Bowling
- 杭电OJ2005——第几天
- CS Round#50 D min-races
- 让你变懒的 Android Studio Live Templates
- Java并发框架——公平性
- 安装 VMware CentOS Xmanager Xshell
- Unity --- 设置选择的图片的格式
- gitlab 建立本地仓库
- SpringMVC学习笔记:拦截器和过滤器
- “无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法
- mysql中如何查看某个日期所在的周一是几号?某个日期所在的一周开始时间是几号?
- 分布式处理与大数据平台(RabbitMQ&;Celery&;Hadoop&;Spark&;Storm&;Elasticsearch)
- CSS3 渐变,rgba与hsla
- ORACLE 存储过程异常捕获并抛出
- thinkjs REST API的跨域设置
- Javascript与数据结构系列(一)——栈的实现
热门文章
- rest_famework 认证与权限组件
- Java 8 Nashorn JavaScript
- linux 之网络命令
- install virtual enviroment on windows
- linux 查看文件方法
- 1.express中间件的简介
- xftp无法用root账号登录问题
- 富文本编辑器 CKeditor 配置使用 (带附件)
- 第一次oo博客作业--表达式求导
- Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.