gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 06:33:00 24 4
gpt4 key购买 nike

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

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

=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 时出现的错误:

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

我猜“地址已在使用”是关键。

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

最佳答案

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

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

只需更改一个代理的端口,例如在 rabbitmq 中检查此链接: 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.

关于RabbitMQ 和 ActiveMQ 运行在同一台机器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28565527/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com