laravel-queue-rabbitmq icon indicating copy to clipboard operation
laravel-queue-rabbitmq copied to clipboard

Issues connecting to rabbitmq

Open joaogl opened this issue 4 years ago • 3 comments
trafficstars

Hello,

I'm deploying my app in prod and now I'm getting an interesting error that I cant' seem to understand how it is getting there...

[2021-02-10 09:27:04] production.ERROR: stream_socket_client(): unable to connect to tcp://rabbitmq:tcp://10.43.116.156:4369 (Connection timed out) {"userId":1,"exception":"[object] (PhpAmqpLib\\Exception\\AMQPIOException(code: 0): stream_socket_client(): unable to connect to tcp://rabbitmq:tcp://10.43.116.156:4369 (Connection timed out) at /var/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:109)

I've checked I'm not using port 4369, and the host name is correct.. Why is it using this port?

my .env RABBITMQ_HOST=rabbitmq RABBITMQ_PORT=5672 RABBITMQ_VHOST=/

joaogl avatar Feb 10 '21 09:02 joaogl

I 'solved' it by removing this lib and actually just implementing the code directly with php-amqplib

joaogl avatar Feb 13 '21 14:02 joaogl

@vyuldashev I got the same error and still not fixing

valehasadli avatar Jun 14 '21 10:06 valehasadli

@joaogl if you are using docker env, you need to enter the app container as root, and then it will work.

valehasadli avatar Jul 18 '21 09:07 valehasadli

This issue is being closed due to its age. If you still are encountering the issue, please re-open so we can assist.

khepin avatar Feb 04 '23 00:02 khepin