在单独的服务器上运行RabbitMQ。

huangapple go评论78阅读模式
英文:

Run RabbitMQ in a separate server

问题

我有一个单独的服务器,在那里我已经安装了RabbitMQ。我已经在/etc/rabbitmq/rabbitmq-env.conf中将NODE_IP_ADDRESS设置为0.0.0.0,以便可以从外部访问。并且在防火墙中启用了端口5672 ufw allow 5672
但是,当我尝试发送一条消息时,我收到以下错误消息:

"无法连接到AMQP服务器。请验证提供的DSN。"

这是我用来连接的DSN字符串(Symfony应用程序):

MESSENGER_TRANSPORT_DSN=amqp://rabbitmq_user:rabbitmq_pswd@ip_of_the_server:5672/%2f

顺便说一句,Web界面工作正常。

有人知道可能是什么问题吗?
提前感谢。

英文:

I have a separate server where I've installed RabbitMQ. I have set NODE_IP_ADDRESS to be 0.0.0.0 in /etc/rabbitmq/rabbitmq-env.conf so it can be accessible from outside. And also enabled the port 5672 in the firewall ufw allow 5672.
But still, when I try to produce a message I get

Could not connect to the AMQP server. Please verify the provided DSN.

Here is the DNS string i'm using to connect ( Symfony app )

MESSENGER_TRANSPORT_DSN=amqp://rabbitmq_user:rabbitmq_pswd@ip_of_the_server:5672/%2f

btw, the web interface works just fine

Does anyone know what could be the problem?
Thanks in advance

答案1

得分: 1

我在显示真实异常消息后找到了解决方案,我发现用户不被允许登录到虚拟主机 /

英文:

I found the solution after displaying the real exception message, I figured out that the user was not allowed to login to the vhost /

huangapple
  • 本文由 发表于 2023年7月23日 16:32:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76747305.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定