当我这样做时,我遇到了以下问题
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 ()
答案 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。