RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS overriding SERVER_ADDITIONAL_ERL_ARGS

60 views
Skip to first unread message

Manpreet Singh

unread,
Feb 15, 2022, 4:40:17 AM2/15/22
to rabbitmq-users
Hi team,

    We have enabled RabbitMQ internode TLS with strategy 2 mentioned in the link https://www.rabbitmq.com/clustering-ssl.html . Everything seems to be working fine and we are able to run rabbitmq-diagnostics and rabbitmqctl commands inside the nodes.

But in our rabbitmq-env.conf,  when we set  RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS and SERVER_ADDITIONAL_ERL_ARGS(for internode TLS) both parameters, the rabbitmq-diagnostics stopped working.

But after removing RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS from  rabbitmq-env.conf it started working back again. It seems like RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS overrides the SERVER_ADDITIONAL_ERL_ARGS.

Below is the code of rabbitmq-env 

[ "x" = "x$RABBITMQ_SERVER_ERL_ARGS" ] && RABBITMQ_SERVER_ERL_ARGS=${SERVER_ERL_ARGS}
[ "x" = "x$RABBITMQ_SERVER_START_ARGS" ] && RABBITMQ_SERVER_START_ARGS=${SERVER_START_ARGS}
[ "x" = "x$RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS" ] && RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=${SERVER_ADDITIONAL_ERL_ARGS}
[ "x" = "x$RABBITMQ_SERVER_CODE_PATH" ] && RABBITMQ_SERVER_CODE_PATH=${SERVER_CODE_PATH}
[ "x" = "x$RABBITMQ_IGNORE_SIGINT" ] && RABBITMQ_IGNORE_SIGINT="true"
[ "xtrue" = "x$RABBITMQ_IGNORE_SIGINT" ] && RABBITMQ_IGNORE_SIGINT_FLAG="+B i"


Is there any way to set both the parameters or we always need to club them together in single parameter i.e SERVER_ADDITIONAL_ERL_ARGS  in case of internode TLS and RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS  in case of NON-TLS




Luke Bakken

unread,
Feb 15, 2022, 9:50:39 AM2/15/22
to rabbitmq-users
Hello,

When reporting a problem with RabbitMQ, it is vital that you provide this information:
  • RabbitMQ version
  • Erlang version
  • Full copies of configuration files so we know exactly what you are setting.
The intention is that RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS is set as an environment variable if necessary (as in a docker environment, system /etc/profile, that sort of thing), and that SERVER_ADDITIONAL_ERL_ARGS is used in rabbitmq-env.conf. If you set them both you'll see the behavior you describe. It is intentional.

In your case, only use SERVER_ADDITIONAL_ERL_ARGS in rabbitmq-env.conf

Also note that rabbitmq-env.conf is sourced as a script so you can use whatever POSIX sh syntax you'd like in it to set the correct environment variable value.

Thanks,
Luke

Manpreet Singh

unread,
Feb 22, 2022, 11:25:54 PM2/22/22
to rabbitmq-users
Thanks a lot for the information.
Reply all
Reply to author
Forward
0 new messages