===============================================

2017/10/24_第1次修改                       ccb_warlock

===============================================

背景:开发人员部署rabbitmq(v3.6.10)时采用的是安装rpm包的方式,但是测试人员提供的部署手册中采取的是编译安装的启动方式。

当时提供的手册,部署rabbitmq的方式如下:

rpm -Uvh http://download.Fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
yum install erlang -y
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm
yum install -y rabbitmq-server-3.6.10-1.el7.noarch.rpm
#启动
/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.10/sbin/rabbitmq-server -detached

rpm包通用的服务启动命令:systemctl start rabbitmq-server

rabbitmq编译启动命令:/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.10/sbin/rabbitmq-server  -detached

由于园区停电的原因,发现了验证环境的rabbitmq当时配的不是开机启动。

本来想的是/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.10/sbin/rabbitmqctl stop先关闭目前的服务,然后在用systemctl start rabbitmq-server这样来启动,再通过systemctl enable rabbitmq-server来配置开机启动。

结果systemctl start rabbitmq-server启动报错。

查看rabbitmq服务状态

systemctl status rabbitmq-server -l

rabbitmq-server.service - RabbitMQ broker
  Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since 一 2017-10-23 23:46:05 CST; 10s ago
 Process: 26394 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
 Process: 26094 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 26094 (code=exited, status=1/FAILURE)
    Status: "Exited."

10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: * epmd reports: node 'rabbit' not running at all
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: no other nodes on localhost
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: * suggestion: start the node
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: current node details:
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - node name: 'rabbitmq-cli-90@localhost'
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - home dir: .
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - cookie hash: 5nJnhEE/zsuKM6LVTCYNGg==
10月 23 23:46:05 localhost.localdomain systemd[1]: Failed to start RabbitMQ broker.
10月 23 23:46:05 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
10月 23 23:46:05 localhost.localdomain systemd[1]: rabbitmq-server.service failed.

接着查看系统日志

journalctl -xe

10月 23 23:46:00 localhost.localdomain rabbitmq-server[26094]: {rabbit_boot_steps,'-run_boot_steps/1-lc$^0/1-0-',1,
10月 23 23:46:00 localhost.localdomain rabbitmq-server[26094]: [{file,"src/rabbit_boot_steps.erl"},{line,26}]}]}}
10月 23 23:46:00 localhost.localdomain rabbitmq-server[26094]: Log files (may contain more information):
10月 23 23:46:00 localhost.localdomain rabbitmq-server[26094]: /var/log/rabbitmq/rabbit@localhost.log
10月 23 23:46:00 localhost.localdomain rabbitmq-server[26094]: /var/log/rabbitmq/rabbit@localhost-sasl.log
10月 23 23:46:01 localhost.localdomain rabbitmq-server[26094]: {"init terminating in do_boot",{could_not_start,rabbit,{{badmatch,{error,{{{badmatch,{error,{"/var/lib/rabbitmq/mnesia/rabbit@localhost/msg_store_transient/0.rdq",eacces}}},[{rabbit_msg_store,init,1,[{file,"src/rabbit_msg_store.erl"},{line,726}]},{gen_server2,init_it,6,[{file,"src/gen_server2.erl"},{line,554}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},{child,undefined,msg_store_transient,{rabbit_msg_store,start_link,[msg_store_transient,"/var/lib/rabbitmq/mnesia/rabbit@localhost",,undefined,{#Fun<rabbit_variable_queue.0.118228399>,ok}]},transient,30000,worker,[rabbit_msg_store]}}}},[{rabbit_variable_queue,start_msg_store,2,[{file,"src/rabbit_variable_queue.erl"},{line,482}]},{rabbit_variable_queue,start,1,[{file,"src/rabbit_variable_queue.erl"},{line,467}]},{rabbit_priority_queue,start,1,[{file,"src/rabbit_priority_queue.erl"},{line,92}]},{rabbit_amqqueue,recover,0,[{file,"src/rabbit_amqqueue.erl"},{line,238}]},{rabbit,recover,0,[{file,"src/rabbit.erl"},{line,799}]},{rabbit_boot_steps,'-run_step/2-lc$^1/1-1-',1,[{file,"src/rabbit_boot_steps.erl"},{line,49}]},{rabbit_boot_steps,run_step,2,[{file,"src/rabbit_boot_steps.erl"},{line,49}]},{rabbit_boot_steps,'-run_boot_steps/1-lc$^0/1-0-',1,[{file,"src/rabbit_boot_steps.erl"},{line,49}]},{rabbit_boot_steps,run_step,2,[{file,"src/rabbit_boot_steps.erl"},{line,49}]},{rabbit_boot_steps,'-run_boot_steps/1-lc$^0/1-0-',1,[{file,"src/rabbit_boot_steps.erl"},{line,26}]}]}}}

10月 23 23:46:03 localhost.localdomain rabbitmq-server[26094]: Crash dump was written to: erl_crash.dump
10月 23 23:46:03 localhost.localdomain rabbitmq-server[26094]: init terminating in do_boot ()
10月 23 23:46:03 localhost.localdomain systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: Stopping and halting node rabbit@localhost
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: Error: unable to connect to node rabbit@localhost: nodedown
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: DIAGNOSTICS
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: ===========
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: attempted to contact: [rabbit@localhost]
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: rabbit@localhost:
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: * connected to epmd (port 4369) on localhost
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: * epmd reports: node 'rabbit' not running at all
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: no other nodes on localhost
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: * suggestion: start the node
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: current node details:
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - node name: 'rabbitmq-cli-90@localhost'
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - home dir: .
10月 23 23:46:05 localhost.localdomain rabbitmqctl[26394]: - cookie hash: 5nJnhEE/zsuKM6LVTCYNGg==
10月 23 23:46:05 localhost.localdomain systemd[1]: Failed to start RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rabbitmq-server.service has failed.
--
-- The result is failed.
10月 23 23:46:05 localhost.localdomain systemd[1]: Unit rabbitmq-server.service entered failed state.
10月 23 23:46:05 localhost.localdomain systemd[1]: rabbitmq-server.service failed.
10月 23 23:46:05 localhost.localdomain polkitd[777]: Unregistered Authentication Agent for unix-process:26088:2339220 (system bus name :1.72, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale zh_CN.UTF-8) (disconnected from bus)
lines 1200-1233/1233 (END)

解决方案:

/var/lib/rabbitmq/mnesia 目录下存在rabbit@localhost.pid、rabbit@localhost、rabbit@localhost-plugins-expand,删除这3项后,再使用systemctl start rabbitmq-server启动,发现不报错了。

rabbitmq 启动报错的更多相关文章

  1. rabbitmq 启动报错 Failed to get nic info

    这个报错 基本搜索不到什么有效信息 解决办法: hostnamectl set-hostname xxx.local # 先把rabbitmq进程杀掉$ ps -ef | grep rabbitmq ...

  2. Rabbitmq启动报错

    板卡掉电以后发现rabbitmq服务被停了,重启之: root@firefly:/var/lib/rabbitmq/mnesia# cd /usr/lib/rabbitmq/lib/rabbitmq_ ...

  3. tomcat启动报错,找不到相应的 queue,从而引发内存泄漏

    tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEU ...

  4. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  5. 【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

    现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() ...

  6. Oracle启动报错ORA-03113解决

    环境:RHEL6.4 + Oracle 11.2.0.4 步骤摘要:1.启动报错ORA-031132.查看alert日志查找原因3.根据实际情况采取合理的措施,这里我们先增加闪回区大小,把库启动起来4 ...

  7. Oracle启动报错ORA-27102解决

    环境:RHEL5.5 + Oracle 10.2.0.4 此错误一般是因为数据库的初始化参数文件的内存设置不当导致.本例是因为操作系统参数设置问题导致. 当前现象:Oracle启动报错ORA-2710 ...

  8. ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

    ssh项目启动报错: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection t ...

  9. SVN 服务启动报错 0x8007042a

    服务器环境:Windows Server 2008 R2 企业版,Visual SVNServer 2.6.5 不能签出代码,发现svn服务关闭,手动启动报错: 事件查看器: Error: no li ...

随机推荐

  1. 简单了解enum

    enum的性质: 1.枚举类型的实例都是常量 2.要使用enum,需要创建一个该类型的引用,并将其赋值给某个实例 3.常用的方法:  *     toString():某个enum实例的名字  *   ...

  2. 【微服务】之五:轻松搞定SpringCloud微服务-调用远程组件Feign

    上一篇文章讲到了负载均衡在Spring Cloud体系中的体现,其实Spring Cloud是提供了多种客户端调用的组件,各个微服务都是以HTTP接口的形式暴露自身服务的,因此在调用远程服务时就必须使 ...

  3. HDU4508--完全背包

    湫湫系列故事--减肥记I Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Tot ...

  4. AspNet Core Api Restful +Swagger 实现微服务之旅 (三)

    (1)  访问Rest ful接口时 Token验证  返回数据格式封装 (一)访问时Token验证  返回数据格式封装 1.1访问Api接口 方法 实现         1.1.1 创建访问Rest ...

  5. js onmouseover与onmouseout用法

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  6. less新手入门(二) Mixin 混合、带参数的Mixin

    四.mixin  混合 "mix - in"属性来自现有的样式!! 你可以在类选择器和id选择器中使用mixin, .a,#b{ color: rebeccapurple; } . ...

  7. java.util.ConcurrentModificationException 异常问题详解

    环境:JDK 1.8.0_111 在Java开发过程中,使用iterator遍历集合的同时对集合进行修改就会出现java.util.ConcurrentModificationException异常, ...

  8. 微软Azure云计算服务主导全球

    10月20日,微软首席运行官(CEO)纳德拉(Satya Nadella)在美国旧金山对外宣布:将在澳大利亚建设数据中心.同一时候与大型IT企业美国戴尔和分散式处理系统服务商美国Cloudera等展开 ...

  9. 揭秘传智播客班级毕业薪资超7k的内幕系列 之三 ----国企慕名而来,将未毕业学员“抢走”,传智播客又一次定义“被就业”

    前面文章提及Java六期学员张同学提前就业某国企,入职薪资6.3k,各种福利齐全.作为班级首位就业同学,他的就业也成为了班级其它同学就业的风向标.但事实上张同学的就业属于"被就业" ...

  10. iOS开发证书都显示“此证书的签发者无效”,更新WWDR Certificate证书后还是显示无效

    1.首先iOS开发证书显示"此证书的签发者无效".是因为WWDR Certificate证书过期导致的,须要更新WWDR Certificate证书! 1)下载最新WWDR Cer ...