evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

RabbitMQ - ECONNRESET

Open jrvidotti opened this issue 8 months ago • 3 comments

Welcome!

  • [x] Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Quando ativo o RabbitMQ no Evolution, estou recendo um erro unhandledRejection. Estou testando por que não está conectando, mas acredito que o Evolution deveria ser mais claro no erro (informar que a conexão com erro é o RabbitMQ).

      ## 🐇 Configuração do RabbitMQ
      - RABBITMQ_ENABLED=true
      - RABBITMQ_URI=amqp://admin:senha@rabbitmq:5672/rabbitmq
      - RABBITMQ_EXCHANGE_NAME=evolution
      - RABBITMQ_GLOBAL_ENABLED=true

What did you expect?

  • Que conecte no RabbitMQ normalmente
  • Que mostre erros mostrando exatamente o que ocorre

What did you observe instead of what you expected?

[Evolution API]    v2.2.3  198   -  Sat May 17 2025 10:20:33     ERROR   [unhandledRejection]  [object]   
{
  origin: Promise {
    <rejected> Error: read ECONNRESET
        at TCP.onStreamRead (node:internal/stream_base_commons:218:20) {
      errno: -104,
      code: 'ECONNRESET',
      syscall: 'read'
    }
  },
  stderr: 2
} 

Screenshots/Videos

No response

Which version of the API are you using?

2.2.3

What is your environment?

Linux

Other environment specifications

No response

If applicable, paste the log output

No response

Additional Notes

No response

jrvidotti avatar May 17 '25 13:05 jrvidotti

Apurei aqui e a versão 4.1.0 do RabbitMQ coloca algumas necessidades de parametros no cliente, ao que parece.

https://github.com/rabbitmq/rabbitmq-server/discussions/13616

Meus logs no RabbitMQ estavam assim:

2025-05-18 10:51:43.205678+00:00 [info] <0.4746.0> accepting AMQP connection 10.0.1.46:36232 -> 10.0.1.12:5672
2025-05-18T10:51:46.223117+00:00 error: FORMATTER CRASH: {"closing AMQP connection ~tp (~ts):~nfailed to negotiate connection parameters: ~ts",[<0.4746.0>,<<"10.0.1.46:36232 -> 10.0.1.12:5672">>,"3s","negotiated frame_max = 4096 is lower than the minimum allowed value (8192)"]}

Workaround: voltei para a versão 4.0 do RabbitMQ e está rodando.

jrvidotti avatar May 18 '25 11:05 jrvidotti

Tive esse mesmo problema e voltei para versão 4.0 e resolveu,,,

Deyvi-dev avatar May 19 '25 02:05 Deyvi-dev

do you use docker compose to start evo and rabbitmq?

muava12 avatar May 28 '25 05:05 muava12