vernemq / docker-vernemq

VerneMQ Docker image - Starts the VerneMQ MQTT broker and listens on 1883 and 8080 (for websockets).
https://vernemq.com
Apache License 2.0
178 stars 230 forks source link

Logging of config generation issues not enabled on helm chart #394

Open maruno opened 6 days ago

maruno commented 6 days ago

I am struggling getting a working configuration for the VerneMQ helm chart, I am only getting this log after which the pod exits with an error:

mfb@Yggdrasill ~/k8s/vernemq $ kubectl logs -n vernemq vernemq-0 -f
Permissions ok: Our pod vernemq-0 belongs to StatefulSet vernemq with 1 replicas
Error generating config with cuttlefish
  run `vernemq config generate -l debug` for more information.

Is there a way I could influence the log level of the config generation (I guess it's translating environment variables to the vernemq.conf file in the container?). I guess there is some wrong config but it's being hidden now, I'm not sure why config errors are not logged by default? Seeing as this seems to be a fatal error?

How can I enable the debugging logging of the config generation to know what I'm doing wrong?

ioolkos commented 6 days ago

@maruno Do you add your own ENV variables? Can you double check the variable format, as described here? https://github.com/vernemq/docker-vernemq?tab=readme-ov-file#remarks


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq 👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

maruno commented 5 days ago

I thought I had eliminated those already, spotted that odditty before, but I seem to have forgotten the dots for my plugins configuration. ;) Managed to find it oby trial and error by commenting out parts of my configmap going from minimal till it stopped working.

Would vernemq config generate -l debug be able to tell me this though? It would be helpful for helm/docker users to just output that, as I couldn't just run a random command on a pod that exits immediately.

ioolkos commented 5 days ago

@maruno Hm, yes, it is a pain point, isn't it. vernemq config generate -l debug would have absolutely told you this. Also looking at the resulting vernemq.conf in the Docker image, where ENV variables are injected in a ###START### end ###END### block at the end of the file.

Maybe we could somehow somewhere add a call to vernemq chkconfig to check whether the config is ok before actually starting Verne.


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq 👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription