How to manually generate erlang cookies

4,003 views
Skip to first unread message

sky xia

unread,
Aug 27, 2020, 2:16:07 AM8/27/20
to rabbitmq-users
The cookie in mq is automatically generated during startup. But I want to manually generate a cookie in advance and write it into the file. How to do it  and what is the specific algorithm for generating cookies ?

Luke Bakken

unread,
Aug 27, 2020, 8:56:00 AM8/27/20
to rabbitmq-users
Hello,

The cookie can be any string of ASCII characters and there is no special algorithm for generating it. If it is present in $HOME/.erlang.cookie before the Erlang VM starts the first time, the file will be used. For RabbitMQ on unix, the location is /var/lib/rabbitmq/.erlang.cookie

Thanks,
Luke

sky

unread,
Aug 27, 2020, 9:02:47 AM8/27/20
to Luke Bakken, rabbitmq-users
Is there a length requirement for the string?

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/WAMuT4SR8oM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/61acadb4-f581-428f-8dc1-8f470a0e83b2n%40googlegroups.com.

Michael Klishin

unread,
Aug 27, 2020, 11:11:25 AM8/27/20
to rabbitmq-users
255 characters is the upper size limit IIRC. The values are expected to be alphanumeric.
Reply all
Reply to author
Forward
0 new messages