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

gefragt vor 3 Jahren1299 Aufrufe
2 Antworten
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

beantwortet vor 3 Jahren
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

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen