Not able to connect to RabbitMQ using Php

0

Hi,

I'm trying to connect the RabbitMQ using php, and getting error. PhpAmqpLib\Exception\AMQPDataReadException: Error receiving data in /Users/surya/projects/rabbitmq/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:184

However, I'm able to connect to any other local instance/ docker instance using the same code. I'm following the guidelines present on the RabbitMQ Official Tutorials.
https://www.rabbitmq.com/tutorials/tutorial-one-php.html

What I can?

  1. Telnet to the 5671 and 15671 Port. - Success.
  2. Open the Management console using the UI and successful login.

Please let me know, incase any other information is required from my side.

Thanks,
Surya

已提问 3 年前1299 查看次数
2 回答
0

Hi,

I have tried to use (Pika) Python Library to connect RabbitMQ, it's not connecting using the Python as well.
Error:
pika.exceptions.IncompatibleProtocolError: StreamLostError: ("Stream connection lost: ConnectionResetError(54, 'Connection reset by peer')",)

I have checked the security group and allowed all the port for inbound and outbound.

Please let me know, how can I troubleshoot further.

Thanks,
Surya

已回答 3 年前
0

Hi,

I have tried to figure out by myself. It's not connecting using the
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))

It's working using below method.

#Python using Pika
url_parameters = pika.URLParameters('amqps://user:password@aws-hostname:5671/')
connection = pika.BlockingConnection(url_parameters)

Thanks,
Surya

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则