Installing and running rabbitmq locally on mac when installed with homebrew

393 views
Skip to first unread message

Inti

unread,
Apr 9, 2021, 5:47:59 AM4/9/21
to rabbitmq-users
Hi,

I have installed rabbitmq using homebrew which has installed erlang 23.3.1. I have never installed rabbitmq before so didn't have any old files.

All rabbit commands give me errors which I don't understand 😬

❯ rabbitmq-server                                                                                                                                                                                     ─╯
Configuring logger redirection
11:37:04.154 [error]

11:37:04.162 [error] BOOT FAILED
BOOT FAILED
11:37:04.162 [error] ===========
===========
11:37:04.163 [error] Exception during startup:
Exception during startup:
11:37:04.163 [error]

11:37:04.163 [error]     supervisor:do_start_child_i/3 line 385
    supervisor:do_start_child_i/3 line 385
11:37:04.163 [error]     rabbit_prelaunch:run_prelaunch_first_phase/0 line 27
    rabbit_prelaunch:run_prelaunch_first_phase/0 line 27
11:37:04.163 [error]     rabbit_prelaunch:do_run/0 line 87
    rabbit_prelaunch:do_run/0 line 87
11:37:04.163 [error]     lists:foldl/3 line 1267
    lists:foldl/3 line 1267
11:37:04.163 [error]     rabbit_env:parse_conf_env_file_output1/2 line 1612
    rabbit_env:parse_conf_env_file_output1/2 line 1612
11:37:04.163 [error]     rabbit_env:parse_conf_env_file_output2/2 line 1633
    rabbit_env:parse_conf_env_file_output2/2 line 1633
11:37:04.164 [error]     rabbit_env:is_sh_set_x_output/1 line 1656
    rabbit_env:is_sh_set_x_output/1 line 1656
11:37:04.164 [error]     re:run([95,116,105,100,101,95,111,115,95,105,99,111,110,61,61817], "^\\++ ", [{capture,none}])
    re:run([95,116,105,100,101,95,111,115,95,105,99,111,110,61,61817], "^\\++ ", [{capture,none}])
11:37:04.164 [error] error:badarg
error:badarg
11:37:04.164 [error]

11:37:05.165 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason badarg in context start_error
11:37:05.166 [error] CRASH REPORT Process <0.152.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,badarg}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,badarg}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,badarg}},{rabbit_prelaunch_app,start,[normal,[]]}}})

Crash dump is being written to: erl_crash.dump...done


Or another

❯ rabbitmqctl status                                                                                                                                                                                  ─╯
** (ArgumentError) argument error
    (stdlib 3.14.1) :re.run([95, 116, 105, 100, 101, 95, 111, 115, 95, 105, 99, 111, 110, 61, 61817], '^\\++ ', [capture: :none])
    src/rabbit_env.erl:1656: :rabbit_env.is_sh_set_x_output/1
    src/rabbit_env.erl:1633: :rabbit_env.parse_conf_env_file_output2/2
    src/rabbit_env.erl:1612: :rabbit_env.parse_conf_env_file_output1/2
    (stdlib 3.14.1) lists.erl:1267: :lists.foldl/3
    src/rabbit_env.erl:79: :rabbit_env.get_context/0
    (rabbitmqctl 3.8.0-dev) lib/rabbitmq/cli/core/config.ex:98: RabbitMQ.CLI.Core.Config.get_system_option/2
    (rabbitmqctl 3.8.0-dev) lib/rabbitmq/cli/core/config.ex:23: RabbitMQ.CLI.Core.Config.get_option/2

Any pointers would be appreciated.
Thanks!

Vitalis Asiku

unread,
Jun 14, 2021, 9:43:09 AM6/14/21
to rabbitmq-users
Hello, did you resolve this? I'm facing this exact problem.

Regards

Philip Kuryloski

unread,
Jun 15, 2021, 4:15:43 AM6/15/21
to rabbitmq-users
Based on the stack trace this appears to be related to the RABBITMQ_CONF_ENV_FILE. You might want to find that file and examine its contents for something obviously incorrect. Based on a quick look at the homebrew formula, it may be at `/etc/rabbitmq/rabbitmq-env.conf`.

The homebrew formula may be incorrectly generating it. The RabbitMQ core team does not maintain the homebrew formula however, so you may want to raise an issue for https://github.com/Homebrew/homebrew-core/blob/master/Formula/rabbitmq.rb

Tom Jakubowski

unread,
Jul 6, 2021, 10:35:01 PM7/6/21
to rabbitmq-users
Hi,

I faced this exact issue. I noticed what looked like a charlist from my error message, and converted it to a string. It turned that the error was in parsing an environment variable I had set with a UTF-8-encoded emoji inside. I suspect if you run your charlist (from :re.run) through to_string, you might find it contains an emoji or another "unusual" Unicode character.

I unset the environment variable in my shell and could then run rabbitmq-server without seeing this error. 

Hope this helps,

Tom Jakubowski
Reply all
Reply to author
Forward
0 new messages