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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠