Nathan Long
Nathan Long

Reputation: 126092

RabbitMQ crashing on boot

RabbitMQ has recently started crashing for me. I suspect I updated something by accident. On MacOS 10.15.7, brew list rabbitmq finds various files in /usr/local/homebrew/Cellar/rabbitmq/3.8.14.

When I try to run rabbitmq-server or any rabbitmqctl command, such as rabbitmqctl version, it crashes with:

{"init terminating in do_boot",{load_failed,[supervisor,logger_backend,logger_simple_h,logger_config,gen_event,logger_server,kernel,file_io_server,file_server,filename,file,erl_parse,erl_lint,application_controller,error_logger,lists,application,application_master,code,error_handler,logger,logger_filters,heart,gen_server,gen,ets,proc_lib,erl_eval,code_server]}}

Uninstalling and reinstalling has not helped.

The error is similar to the one described here, where this was suggested:

Some modules cannot be loaded. You very likely run a version of Erlang that's older than the oldest one supported by RabbitMQ

But according to the docs, RabbitMQ 3.8.14 requires Erlang 22.3 to 23.x, and erl --version prints Erlang/OTP 23.

See the erl_crash.dump.

Any clues about what's wrong?

Upvotes: 0

Views: 2052

Answers (2)

João Paulo Motta
João Paulo Motta

Reputation: 3902

I was having the same issue on a Mac M1. I had erlang installed via asdf.

Rabbitmq was working without any problems, but after a brew update, something happened and we started getting the same error.

what worked for me was:

Uninstalling rabbitmq and brew's erlang

brew uninstall rabbitmq
brew uninstall erlang

Reinstalling them:

brew install rabbitmq

and finally, the most important thing was to bypass erlang commands to the system version (brew).:

asdf global erlang system

After doing this restarting rabbitmq made everything go back to normal.:

brew services restart rabbitmq

Upvotes: 6

Nathan Long
Nathan Long

Reputation: 126092

Uninstalling RabbitMQ and all Erlang versions, then doing brew install rabbitmq, finally fixed this.

I got this answer in the Google Group:

Something is off about the Erlang installation. A number of standard library modules cannot be loaded (but the version is indeed 23 according to the crash dump file). Consider uninstalling RabbitMQ and all Erlang versions (Homebrew-installed RabbitMQ also may pick up a version that's not Homebrew-provided, in theory). Since Homebrew uses a binary build that you can easily run with any Erlang in PATH, you can try without Homebrew [1]. kerl [2] is a trivial way to build any Erlang release on macOS in case you need to do it, e.g. for comparison.

  1. https://www.rabbitmq.com/install-generic-unix.html
  2. https://github.com/kerl/kerl

Upvotes: 0

Related Questions