RabbitMQ 和 ActiveMQ 运行 在同一台机器上

RabbitMQ and ActiveMQ running on the same machine

出于测试目的,我需要在同一台 Windows 机器上使用 ActiveMQ 和 RabbitMQ 运行ning。我都安装了,但我不能 运行 一起安装:我需要停止一项服务才能使用另一项服务 运行ning.

这是我在尝试启动具有 ActiveMQ 的 RabbitMQ 时遇到的错误 运行ning:

=INFO REPORT==== 17-Feb-2015::14:24:00 ===
Error description:
   {could_not_start,rabbit,
    {bad_return,
     {{rabbit,start,[normal,[]]},
      {'EXIT',
       {rabbit,failure_during_boot,
        {boot_step,networking,
         {case_clause,
          {error,
           {{shutdown,
             {failed_to_start_child,tcp_listener,
              {cannot_listen,{0,0,0,0,0,0,0,0},5672,eacces}}},
            {child,undefined,'rabbit_tcp_listener_sup_:::5672',
             {tcp_listener_sup,start_link,
              [{0,0,0,0,0,0,0,0},
               5672,
               [inet6,binary,
                {packet,raw},
                {reuseaddr,true},
                {backlog,128},
                {nodelay,true},
                {linger,{true,0}},
                {exit_on_close,false}],
               {rabbit_networking,tcp_listener_started,[amqp]},
               {rabbit_networking,tcp_listener_stopped,[amqp]},
               {rabbit_networking,start_client,[]},
               "TCP Listener"]},
             transient,infinity,supervisor,
             [tcp_listener_sup]}}}}}}}}}}

这是我尝试使用 RabbitMQ 启动 ActiveMQ 时出现的错误 运行ning:

jvm 1    |  INFO | Listening for connections at: tcp://BROKER:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600
jvm 1    |  INFO | Connector openwire started
jvm 1    | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:DEV-BROKER01-56290-1424197666199-0:1], java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 due to: 
                   java.net.BindException: Address already in use: JVM_Bind)
jvm 1    |  INFO | Apache ActiveMQ 5.11.0 (localhost, ID:DEV-BROKER01-56290-1424197666199-0:1) is shutting down

我猜 "Address already in use" 是关键。

有什么办法解决这个问题吗?谢谢

这是问题所在: java.net.BindException:地址已被使用:JVM_Bind)

两个代理都使用 5672 端口(amqp 默认端口)。

只需更改一个代理的端口,例如在 rabbitmq 中检查此 link: https://www.rabbitmq.com/configure.html

The configuration file rabbitmq.config allows the RabbitMQ core application, Erlang services and RabbitMQ plugins to be configured. It is a standard Erlang configuration file, documented on the Erlang Config Man Page.

An example configuration file follows:

[

     {rabbit, [{tcp_listeners, [5673]}]}   
]. 

This example will the port RabbitMQ listens on from 5672 to 5673.

This configuration file is not the same as rabbitmq-env.conf, which can be used to set environment variables on non-windows systems.