重新安装rabbitmq导致权限问题

时间:2015-09-17 04:38:29

标签: erlang rabbitmq

当我这样做时,我遇到了以下问题

rabbitmq-server

我在mac os x上运行。 rabbitmq版本3.5.4。 我尝试卸载并重新安装rabbitmq而没有brew问题,但每次都会出现以下错误。指导表示赞赏。

感谢您的帮助!

BOOT FAILED
===========

Error description:
   {could_not_back_up_mnesia_dir,{"/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost",
                                  "/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost-upgrade-backup",
                                  eacces}}

Log files (may contain more information):
   /usr/local/var/log/rabbitmq/rabbit@localhost.log
   /usr/local/var/log/rabbitmq/rabbit@localhost-sasl.log

Stack trace:
   [{rabbit_upgrade,take_backup,0,
                    [{file,"src/rabbit_upgrade.erl"},{line,111}]},
    {rabbit_upgrade,ensure_backup_taken,0,
                    [{file,"src/rabbit_upgrade.erl"},{line,100}]},
    {rabbit_upgrade,maybe_upgrade_mnesia,0,
                    [{file,"src/rabbit_upgrade.erl"},{line,142}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,328}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,353}]},
    {init,start_it,1,[]},
    {init,start_em,1,[]}]

{"init terminating in do_boot",{could_not_back_up_mnesia_dir,{"/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost","/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost-upgrade-backup",eacces}}}
init terminating in do_boot ()

1 个答案:

答案 0 :(得分:2)

eacces是权限问题。

尝试使用sudo rabbitmq-server

执行它

修改

RabbitMQ不需要sudo权限。 RMQ写入的默认文件夹(在本例中)需要sudo权限。

但是你可以重载阅读文档的默认文件夹。

我通常会改写:

export RABBITMQ_PID_FILE=/Users/gabriele/programs/rabbitmq_server-3.5.4/data/rmq.pid
export RABBITMQ_BASE=/Users/gabriele/programs/rabbitmq_server-3.5.4
export RABBITMQ_LOG_BASE=/Users/gabriele/programs/rabbitmq_server-3.5.4/data/logs
export RABBITMQ_MNESIA_BASE=/Users/gabriele/programs/rabbitmq_server-3.5.4/data/db
export RABBITMQ_PLUGINS_DIR=/Users/gabriele/programs/rabbitmq_server-3.5.4/plugins
export RABBITMQ_PLUGINS_EXPAND_DIR=/Users/gabriele/programs/rabbitmq_server-3.5.4/plugins/expands
export RABBITMQ_ENABLED_PLUGINS_FILE=/Users/gabriele/programs/rabbitmq_server-3.5.4/enabled_plugin

我不需要使用sudo

有关详细信息,请阅读此https://www.rabbitmq.com/relocate.html