场景
扬州现场实体服务机器安装Erlang和RabbitMQ之后,调用指令启动RabbitMQ失败:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin>rabbitmq-server.bat start
现场环境
操作系统版本
注意
公司内部测试环境,虚拟机搭建的后台环境也是采用这种操作系统版本,并且成功安装RabbitMQ
解决方案
在服务器上安装虚拟机,虚拟机里面重新安装操作系统,然后安装MQ
错误分析
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin>"!ERLANG_HOME!\bin\erl.exe" -pa "!RABBITMQ_EBIN_ROOT!" -boot !CLEAN_BOOT_FILE! -noinput -hidden -s rabbit_prelaunch !RABBITMQ_NAME_TYPE! rabbitmqprelaunch!RANDOM!!TIME:~9!@localhost -conf_advanced "!RABBITMQ_ADVANCED_CONFIG_FILE!" -rabbit enabled_plugins_file "!RABBITMQ_ENABLED_PLUGINS_FILE!" -rabbit plugins_dir "!RABBITMQ_PLUGINS_DIR!" -extra "!RABBITMQ_NODENAME!"
{"init terminating in do_boot",{undef,[{rabbit_prelaunch,start,[],[]},{init,start_em,1,[{file,"init.erl"},{line,1123}]},{init,do_boot,3,[{file,"init.erl"},{line,831}]}]}}
init terminating in do_boot ({undef,[{rabbit_prelaunch,start,[],[]},{init,start_em,1,[{_},{_}]},{init,do_boot,3,[{_},{_}]}]})
Crash dump is being written to: C:\Users\ADMINI~1\AppData\Roaming\RabbitMQ\log\erl_crash.dump...done
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin>if ERRORLEVEL 2 (rem dist port mentioned in config, do not attempt to set it ) else if ERRORLEVEL 1 (exit /B 1 ) else (set RABBITMQ_DIST_ARG=-kernel inet_dist_listen_min !RABBITMQ_DIST_PORT! -kernel inet_dist_listen_max !RABBITMQ_DIST_PORT! )
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.14\sbin>
尝试方案
1)根据ERLANG_HOME not set correctly添加ERLANG_HOME环境变量,无效
2)网上的相关崩溃信息都会提示错误信息,例如:
{"init terminating in do_boot",{error,{cannot_log_to_file,"/var/log/rabbitmq/rabbit@besttone2.log",{error,eacces}}}}
init terminating in do_boot ()
当前没有任何有效输出
3)erl版本不对,公司环境是正常的