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

feita há 3 anos1299 visualizações
2 Respostas
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

respondido há 3 anos
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

respondido há 3 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas