如何解决在Python中使用RabbitMQ时出现的“流连接丢失”错误?

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

How do I resolve the 'Stream connection lost' error when using RabbitMQ in Python?

问题

抱歉,以下是您要翻译的内容:

"hi guys i have problem with connection.channel() in python for rabbit-mq . when i run my code in send and receive connection close forcibly , this is the error

pika.exceptions.StreamLostError: Stream connection lost: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)

how can i fix this . please help me step by step . thanks

i see this problem in other questions and answers really does not help me , i install rabbitmq over and over i run rabbitmq server and enable management but connection always forcibly closed . i think its my os problem it's windows 10 . can fix this or should i use linux or docker ?"

英文:

hi guys i have problem with connection.channel() in python for rabbit-mq . when i run my code in send and receive connection close forcibly , this is the error

pika.exceptions.StreamLostError: Stream connection lost: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)

how can i fix this . please help me step by step . thanks

i see this problem in other questions and answers really does not help me , i install rabbitmq over and over i run rabbitmq server and enable management but connection always forcibly closed . i think its my os problem it's windows 10 . can fix this or should i use linux or docker ?

答案1

得分: 0

不得不承认,真的不知道如何,但我尝试了很多方法。我重新安装并停止了每个RabbitMQ节点。我在Windows上运行以下命令:

rabbitmqctl.bat stop

每次停止一个节点,我都反复执行,然后再启动服务器:

rabbitmq-server.bat start

这样可以正常工作。

在Windows上,如果不提供路径和管理员权限,您应该进入以下路径:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.11.17\spin

英文:

not gonna lie really don't know how but i try a lot of things . i reinstall and stop every rabbit-mq node . i am in windows and run this

rabbitmqctl.bat stop

and every time stop one node i do over and over and then start server again

rabbitmq-server.bat start

and that work

in windows if don't give path and administrator you should go on this path
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.11.17\spin

答案2

得分: 0

我在尝试在本地运行一个简单的RabbitMQ生产者时遇到了类似的问题。因为我的生产者函数在另一台机器上运行,我发现与版本相关的一些问题。一旦我将Erlang版本从Erlang 26调整为Erlang 25.3.2,它就完美地运行了。

英文:

I ran into the similar issue while attempting to run a simple RabbitMQ producer locally. Because my producer function is running on another machine, I discovered something relating to version. It worked perfectly once I adjusted the erlang version from Erlang 26 to Erlang 25.3.2.

huangapple
  • 本文由 发表于 2023年5月29日 15:36:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76355464.html
匿名

发表评论

匿名网友

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

确定