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“.”“.”“.*” ´´´ 如果我进入网页,我可以毫无问题地登录,但是当我启动工作程序时,就会出现错误。
请有人帮助我。