首页 \ 问答 \ 错误:rabbitmq无法启动(Error : rabbitmq failed to start)

错误:rabbitmq无法启动(Error : rabbitmq failed to start)

我在启动rabbitmq服务器时遇到此错误。 我做了以下步骤,

1)在server1和server2上安装了rabbitmq服务器

2)它成功开始了

3)在服务器2上停止使用,

sudo服务rabbitmq-server停止

4)将/var/lib/rabbitmq/.erlang.cookie从server1复制到server2。

5)尝试在server2上启动rabbitmq但是使用错误

sudo服务rabbitmq-server启动

“rabbitmq未能开始”

6)我试图重置它但收到错误

sudo rabbitmqctl force_reset

Forcefully resetting node 'rabbit@IS-21892' ...
Error: unable to connect to node 'rabbit@IS-21892': nodedown
diagnostics:
- nodes and their ports on IS-21892: [{rabbit,54812},{rabbitmqctl11166,34944}]
- current node: 'rabbitmqctl11166@IS-21892'
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: C2ak7NeiCEFHGEZb8SL7+w==

根据文件

http://www.rabbitmq.com/troubleshooting.html

Cookie不匹配是由于不同的用户,rabbitmq和root。

什么是解决方案?

我也试过重新安装。


I am getting this error while starting rabbitmq server. I did following steps,

1) Installed rabbitmq sever on server1 and server2

2) It started successfully

3) Stopped it on server 2 using,

sudo service rabbitmq-server stop

4) copied /var/lib/rabbitmq/.erlang.cookie from server1 to server2.

5) Trying to start rabbitmq on server2 but getting error using

sudo service rabbitmq-server start

"rabbitmq failed to start"

6) I tried to reset it using but getting error

sudo rabbitmqctl force_reset

Forcefully resetting node 'rabbit@IS-21892' ...
Error: unable to connect to node 'rabbit@IS-21892': nodedown
diagnostics:
- nodes and their ports on IS-21892: [{rabbit,54812},{rabbitmqctl11166,34944}]
- current node: 'rabbitmqctl11166@IS-21892'
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: C2ak7NeiCEFHGEZb8SL7+w==

According to documentation

http://www.rabbitmq.com/troubleshooting.html

Cookie mismatch is due to different users, rabbitmq and root.

Whats the solution ?

I tried reinstalling as well.


原文:https://stackoverflow.com/questions/21907281
更新时间:2022-11-04 15:11

最满意答案

如果您将列表转换为ndarray ,您可以使用如下广播:

coords = np.zeros((5, 5, 30, 2, 4))
coords[..., 0] = np.array(mapLatitude).reshape(5, 1, 1, 1)
coords[..., 1] = np.array(mapLongitude).reshape(1, 5, 1, 1)
coords[..., 2] = np.array(mapAltitude).reshape(1, 1, 30, 1)
coords[..., 3] = np.array(mapTime).reshape(1, 1, 1, 2)

对于更一般的输入,这样的东西应该工作:

def makeCoordinateMatrix(*coords) :
    dims = len(coords)
    coords = [np.array(a) for a in coords]
    shapes = tuple([len(a) for a in coords])
    ret = np.zeros(shapes + (dims,))
    for j, a in enumerate(coords) :
        ret[..., j] = a.reshape((len(a),) + (1,) * (dims - j - 1))
    return ret

coordinateMatrix = makeCoordinateMatrix(mapLatitude, mapLongitude,
                                        mapAltitude, mapTime)

If you turn your lists into ndarray's you can use broadcasting as follows:

coords = np.zeros((5, 5, 30, 2, 4))
coords[..., 0] = np.array(mapLatitude).reshape(5, 1, 1, 1)
coords[..., 1] = np.array(mapLongitude).reshape(1, 5, 1, 1)
coords[..., 2] = np.array(mapAltitude).reshape(1, 1, 30, 1)
coords[..., 3] = np.array(mapTime).reshape(1, 1, 1, 2)

For more general inputs something like this should work:

def makeCoordinateMatrix(*coords) :
    dims = len(coords)
    coords = [np.array(a) for a in coords]
    shapes = tuple([len(a) for a in coords])
    ret = np.zeros(shapes + (dims,))
    for j, a in enumerate(coords) :
        ret[..., j] = a.reshape((len(a),) + (1,) * (dims - j - 1))
    return ret

coordinateMatrix = makeCoordinateMatrix(mapLatitude, mapLongitude,
                                        mapAltitude, mapTime)

相关问答

更多
  • 我现在能看到的最大问题是你迭代地构建了一些数据结构,即source , target和corr 。 您可以通过将对象预分配到正确的大小来极大地加速代码,并使用索引来放置值。 您可以通过矢量化操作来进一步改进代码。 例如,确定m哪些部分大于0.01可以很容易地完成,如下所示: m[m > 0.01] 并获取您的数据结构source , target和corr : matching_indices = which(m > 0.01, arr.ind = TRUE) source = matching_indi ...
  • 您可能要查找的是scipy.spatial.distance的代码,特别是cdist函数。 这可以有效地计算各种指标点之间的成对距离。 import numpy as np from scipy.spatial.distance import cdist A = np.random.random((1000, 2)) B = np.random.random((100, 2)) D = cdist(A, B, metric='euclidean') print(D.shape) # (1000, 100 ...
  • 您可以为任意维度的NumPy数组实现函数ravel_index() : def ravel_index(x, dims): i = 0 for dim, j in zip(dims, x): i *= dim i += j return i 此函数与函数numpy.unravel_index()的反函数。 对于您的应用程序,您可以将此函数称为ravel_index((x, y, z), m.shape) 。 You can implement a f ...
  • _default_image_transform的基本思想是正确的。 错误在函数的最后。 def _default_img_transform(self, painter): #size of widget winheight = float(self.height()) winwidth = float(self.width()) #size of pixmap scrwidth = float(self.pixmap.width()) sc ...
  • which()接受一个参数arr.ind=TRUE ,它将返回它所应用的逻辑矩阵中的所有TRUE元素的索引。 ## An example matrix set.seed(1) m <- matrix(sample(1:100, 10), ncol=2) m # [,1] [,2] # [1,] 27 86 # [2,] 37 97 # [3,] 57 62 # [4,] 89 58 # [5,] 20 6 ## An example applicatio ...
  • 计算C * A^(i-1-(j-1)) * B只有一组有限的结果,它只取决于i和j之间的差异。 不重复计算它,我的解决方案迭代这个差异和i,然后根据这两个变量计算j。 Phi=zeros(Np*q,Nc*m); CB = C * B; for diffij=0:Np-1 if diffij>0 F=C * A^diffij * B; else F=CB; end for i=max(1,diffij+1):min(Np,Nc+diffij) ...
  • 如果您将列表转换为ndarray ,您可以使用如下广播: coords = np.zeros((5, 5, 30, 2, 4)) coords[..., 0] = np.array(mapLatitude).reshape(5, 1, 1, 1) coords[..., 1] = np.array(mapLongitude).reshape(1, 5, 1, 1) coords[..., 2] = np.array(mapAltitude).reshape(1, 1, 30, 1) coords[..., ...
  • 编辑:我的原始答案使用了ax.scatter 。 这有一个问题:如果两个点是并排的, ax.scatter可能会在它们之间留出一点空间,具体取决于比例: 例如,用 data = np.array([(2,3),(3,3)]) 这是一个放大的细节: 所以这是一个解决此问题的替代解决方案: import matplotlib.pyplot as plt import numpy as np data = np.array([(2,3),(3,3),(45,4),(3,65)]) N = data.max() ...
  • python 2.x中的range创建一个列表。 while谓词中的表达式导致每次迭代创建/销毁列表; 因此,创建1,300,000个项目列表1,300,000次。 while idx in range(len(self.zoom_list)): # this is run every iteration ... idx += 1 通过for xrange使用for语句,它将更容易阅读,不会发生列表创建/销毁。 for idx in xrange(len(self.zoom_list)) ...
  • 反转矩阵将是一般解决方案,但据我所知,这实际上不是一个“一般”问题。 您正在尝试反转已知的转换序列,而不是撤消任意转换,每个转换都可以非常简单地反转。 如果您的对象到世界的转换是: glTranslatef(Ox, Oy, Oz); glRotatef(rotationX , 1.0, 0.0, 0.0); glRotatef(rotationY, 0.0, 1.0, 0.0); glRotatef(rotationZ, 0.0, 0.0, 1.0); 然后世界到对象的逆是: glRotatef(-rot ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)