服务器终止握手:403(ACCESS-REFUSED),消息“ACCESS_REFUSED”

问题描述 投票:0回答:1
我已经有了一个使用rabbitmq和nodejs的项目,但是当启动我的worker时

node myWorker.js

我收到这个错误:

2023-11-27 15:40:24.359 [info] [env] RabbitMQ Instance: [undefined@undefined] 2023-11-27 15:40:24.360 [info] [env] Third Party's timeout: [3] sec 2023-11-27 15:40:24.362 [info] [env] --> <-- /DATA/rabbitmq/amqp/worker/consumer.js:21 throw error0; ^ Error: Handshake terminated by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile." at afterStartOk (/DATA/rabbitmq/node_modules/amqplib/lib/connection.js:223:12) at /DATA/rabbitmq/node_modules/amqplib/lib/connection.js:159:12 at Socket.recv (/DATA/rabbitmq/node_modules/amqplib/lib/connection.js:507:12) at Object.onceWrapper (events.js:420:28) at Socket.emit (events.js:314:20) at emitReadable_ (_stream_readable.js:557:12) at processTicksAndRejections (internal/process/task_queues.js:83:21)
为rabbit创建凭证的步骤
´´´rabbitmqctl set_user_tags myuser 管理员
rabbitmqctl set_permissions -p / myuser“.

”“.”“.*” ´´´ 如果我进入网页,我可以毫无问题地登录,但是当我启动工作程序时,就会出现错误。

请有人帮助我。

node.js rabbitmq http-status-code-403
1个回答
0
投票
为 root 用户创建变量“prod”解决了问题

© www.soinside.com 2019 - 2024. All rights reserved.