RabbitMQ未连接访问被拒绝

py49o6xq  于 2022-11-08  发布在  RabbitMQ
关注(0)|答案(1)|浏览(322)

我试图在Rabbit中创建一个队列,但是我正在处理连接问题。我的application.properties如下:

spring.rabbitmq.addresses=xxxxxxx.xxxx.dev.xxx:5672
spring.rabbitmq.username=people-consumer
spring.rabbitmq.password=*******
peopleevents.vhost=PEOPLE
peopleevents.queue=qu-people-cores-update
peopleevents.exchange=ex-people-updates
peopleevents.routingkey=ONLINE.UPDATE.PERSONF.PERSONF;

但是,当尝试连接失败时,会出现以下地址:

2022-06-27 14:06:43.542  INFO 13668 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-06-27 14:06:43.544  INFO 13668 --- [           main] o.s.a.r.c.CachingConnectionFactory       : Attempting to connect to: [SCGLCCRAMQD0005.SCGER.DEV.CORP:5672]
2022-06-27 14:06:43.958  INFO 13668 --- [           main] o.s.a.r.c.CachingConnectionFactory       : Created new connection: connectionFactory#63538bb4:0/SimpleConnection@8b13d91 [delegate=amqp://people-consumer@107.2.164.186:5672/PEOPLE, localPort= 59226]
2022-06-27 14:06:44.236 ERROR 13668 --- [.2.164.186:5672] o.s.a.r.c.CachingConnectionFactory       : Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=403, reply-text=ACCESS_REFUSED - access to queue 'qu-people-cores-update' in vhost 'PEOPLE' refused for user 'people-consumer', class-id=50, method-id=10)

你知道吗?

a64a0gku

a64a0gku1#

ACCESS_REFUSED

表示用户people-consumer无权访问vhost PEOPLE中的qu-people-cores-update
在管理UI上检查用户授权:http://localhost:15672/#/用户/用户-消费者
或使用rabbitmqctl工具

相关问题