问题描述
我是 rabbitmq 的新手,并且是 erlang 的新手.我遇到了一个问题,我无法启动 rabbitmq,因为 .erlang.cookie 的主"位置已更改.我已经运行了命令
I'm new to rabbitmq and by association new to erlang. I'm running into a problem where I cannot start rabbitmq as the 'home' location for the .erlang.cookie has been changed. I've run the command
init:get_argument(home).
返回
{ok,[["H:\"]]}
这是一个问题,因为这是我并不总是可以访问的网络驱动器.我需要能够将主"目录更改为本地目录.
this is an issue, as this is a network drive I do not always have access to. I need to be able to change the 'home' directory to something local.
当我跑步时
rabbitmqctl status
它给了我以下错误:
{error_logger,{{2013,7,5},{14,47,10}},"Failed to create cookie file 'h:/.erlang.cookie': enoent",[]}
这再次让我相信 home 论点存在问题.我需要能够将此位置更改为本地位置.
which again leads me to believe that there is an issue with the home argument. I need to be able to change this location to something local.
版本:
Erlang R16B01 32 bit
RabbitMQ 3.1.3
Running on Win7
我已经卸载并重新安装了多次,希望能解决这个问题.我正在寻找一种方法来更改 erlang 中的家"位置,以便 rabbitmq 可以正常启动.
I have uninstalled and reinstalled multiple times hoping to resolve this. I am looking for a way to change the 'home' location in erlang so rabbitmq can properly start.
推荐答案
我想出的解决方案是不要打扰已安装的服务.我使用 rabbitmq-server.bat 启动服务,SET HOMEDRIVE=C: 在文件的开头.我打算从父服务运行它,以便我可以在服务器上安装它.
The solution I came up with was to not bother with the installed service. I used the rabbitmq-server.bat to start the service, SET HOMEDRIVE=C: at the start of the file. I'm planing to run this from a parent service so that I can install this on servers.
earlang 和 rabbitMQ 开发人员的最后说明;为自己的目的使用预先存在的环境变量是错误的.您应该创建自己的,或者最好将这些东西放在配置文件中.告诉人们与他们的系统管理员交谈以更改 HOMEDRIVE 和 APPDATA 变量至少可以说是傲慢的.
Final note to earlang and rabbitMQ developers; using pre-existing environment variables for you own purposes is just wrong. You should create your own, or better yet put this stuff in a configuration file. Telling people to talk to their system administrators to change the HOMEDRIVE and APPDATA variables is arrogant to say the least.
这篇关于更改 Erlang 中的默认“home"路径以解决 RabbitMQ 启动错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!