Skip to content

Instantly share code, notes, and snippets.

@carlhoerberg

carlhoerberg/README.md

Forked from lukebakken/README.md
Last active Feb 19, 2018
Embed
What would you like to do?
Restart RabbitMQ TLS acceptors with new settings

Restarting RabbitMQ TLS Listeners with new TLS options

Edit your /etc/rabbitmq/rabbitmq.config and then reload the settings from there with:

sudo rabbitmqctl eval '{ok, [C]} = file:consult("/etc/rabbitmq/rabbitmq.config"), {rabbit, R} = proplists:lookup(rabbit, C), {ssl_options, O} = proplists:lookup(ssl_options, R), application:set_env(rabbit, ssl_options, O).'

Restart the TLS Listener on port 5671

sudo rabbitmqctl eval 'rabbit_networking:stop_tcp_listener({{0,0,0,0},5671}), rabbit_networking:start_ssl_listener(5671, rabbit_networking:ensure_ssl(), 1).'

Compatible with RabbitMQ < 3.6:

sudo rabbitmqctl eval 'rabbit_networking:stop_tcp_listener({{0,0,0,0},5671}), catch rabbit_networking:start_ssl_listener(5671, rabbit_networking:ensure_ssl()), catch rabbit_networking:start_ssl_listener(5671, rabbit_networking:ensure_ssl(), 1).'

Restart all protocol plugins

sudo rabbitmq-plugins disable rabbitmq_{mqtt,stomp} && sudo rabbitmq-plugins enable rabbitmq_{mqtt,stomp}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.