laravel-queue-rabbitmq
laravel-queue-rabbitmq copied to clipboard
Issues connecting to rabbitmq
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=/
I 'solved' it by removing this lib and actually just implementing the code directly with php-amqplib
@vyuldashev I got the same error and still not fixing
@joaogl if you are using docker env, you need to enter the app container as root, and then it will work.
This issue is being closed due to its age. If you still are encountering the issue, please re-open so we can assist.