bdubaut

bdubaut

Hi, I am facing a very odd behaviour trying to deploy an Elixir umbrella using conduit_amqp:

  • locally, everything runs fine, no issues there.
  • deploying my application (kubernetes pod wrapped in a statefulset), I am unable to connect to the RabbitMQ instance, with the following logs:
22:24:34.317 [info] [supervisor: {#PID<0.5632.0>, :amqp_connection_sup}, started: [pid: #PID<0.5633.0>, name: :connection_type_sup, mfargs: {:amqp_connection_type_sup, :start_link, []}, restart_type: :transient, shutdown: :infinity, child_type: :supervisor]]
22:24:34.318 [info] [supervisor: {#PID<0.5632.0>, :amqp_connection_sup}, started: [pid: #PID<0.5634.0>, name: :connection, mfargs: {:amqp_gen_connection, :start_link, [#PID<0.5633.0>, {:amqp_params_network, "guest", "guest", "/", 'localhost', 5672, 0, 0, 10, 60000, :none, [&:amqp_auth_mechanisms.plain/3, &:amqp_auth_mechanisms.amqplain/3], [], []}]}, restart_type: :intrinsic, shutdown: :brutal_kill, child_type: :worker]]
22:24:34.321 [error] Cannot connect to RabbitMQ broker
22:24:48.128 [info] [supervisor: {#PID<0.5635.0>, :amqp_connection_sup}, started: [pid: #PID<0.5636.0>, name: :connection_type_sup, mfargs: {:amqp_connection_type_sup, :start_link, []}, restart_type: :transient, shutdown: :infinity, child_type: :supervisor]]

I am using Elixir 1.9.1 releases, and for a reason that I do not understand, the runtime configuration is not applied. When running Application.get_env(:my_app, MyBrokerModule) inside my production node, the runtime configuration is correct, just like it’s defined in the releases.exs file. If I stop the application, and restart the app through the Application module functions, then the config applies and the broker connects to the RabbitMQ instance, creates the queues & exchanges as it should.

I am really puzzled by this behaviour and I don’t even know if this is the right place to post this. Is it an issue with Elixir 1.9? Is is an issue with the boot sequence of Conduit? I am lost and I would love some help figuring this out :folded_hands:!

0
Post #21
blatyo

blatyo OP

Conduit Core Team

Hey @bdubaut,

That does seem odd. There’s nothing about Elixir 1.9.1 that I’m aware of that would cause configuration to load after the supervision tree has started. To double check though, you could log what the options are in your application start function. That should tell you whether the config is present for conduit.

Are you sure rabbit is running when you do the deploy?

Also, I don’t know where that logging comes from. ConduitAMQP would say Connection failed via AMQP!. What versions are you using for conduit and conduit_amqp?

1
Post #22
bdubaut

bdubaut

@blatyo it’s my bad. The problem was coming from my configuration that was missing some stuff, and my broadway_rabbitmq configurations that were not connecting either, the log I shared comes from the broadway apps using the RabbitMQ as a producer. :man_facepalming:

Sorry about that. Thanks though!

1
Post #23
— All posts loaded —