【问题标题】:Starting the ActiveMQ broker, results in an error启动 ActiveMQ 代理,导致错误
【发布时间】:2020-11-23 18:02:31
【问题描述】:

我正在尝试按照

处的说明在 Windows 机器上启动 activemq 代理

http://activemq.apache.org/getting-started.html#GettingStarted-StartingActiveMQ

下载 Windows 二进制文件后,我切换到安装目录并按照说明使用 bin/activemq 启动代理。启动失败,扫描文字墙后,我发现了以下错误。

ERROR | Failed to start Apache ActiveMQ ([localhost, ID:[Computer ID]:1], java.io.IOException:    Transport Connector could not be registered i
n JMX: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1
000&wireFormat.maxFrameSize=104857600 due to: java.net.BindException: Address al
ready in use: JVM_Bind)

已经在使用的地址让我相信另一个 amqp 代理,例如 RabbitMQ 或 Qpid(两者都已安装),可能已经分配了连接,所以我重新启动了我的计算机,但没有成功消除错误。

谁能给我一些关于如何让 ActiveMQ 正常运行的想法。

【问题讨论】:

    标签: activemq


    【解决方案1】:

    将activemq_home/conf/activemq.xml中的amqp端口改成5673之类的,然后重启activemq <transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="amqp" uri="**amqp://0.0.0.0:5673**?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> </transportConnectors>

    【讨论】:

    • 作为魅力。
    【解决方案2】:

    我会尝试在命令提示符下运行netstat -anb,看看你是否可以使用端口 5672 找到一些东西。

    【讨论】:

      【解决方案3】:

      我会尝试从命令提示符运行 netstat -nlp 看看你是否可以使用端口 5672 找到一些东西。然后使用进程 ID 来终止这个进程(kill -9)

      【讨论】:

        【解决方案4】:

        以下是一些必须查看的基本和重要配置区域。如果您发现问题,请尝试更改activemq.xml 下提到的端口:-

        <transportConnector name="openwire" uri="tcp://0.0.0.0:6616?maximumConnection
        <transportConnector name="amqp" uri="amqp://0.0.0.0:5673?maximumConnections=1
        <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnection
        <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1
        <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000
        <transportConnector name="openwire" uri="tcp://0.0.0.0:6616?maximumConnection
        <transportConnector name="amqp" uri="amqp://0.0.0.0:5673?maximumConnections=1
        <transportConnector name="stomp" uri="stomp://0.0`enter code here`.0.0:61613?maximumConnection
        <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1
        <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000
        

        注意错误信息。它会具体告诉哪个端口有绑定问题。

        【讨论】:

          【解决方案5】:

          我确认端口更改有效。 在我的例子中,端口 1883 到 18830,mqqt 部分:

          name="mqtt" uri="mqtt://0.0.0.0:1883
          

          我只是像这样在端口端添加了零:

          name="mqtt" uri="mqtt://0.0.0.0:18830
          

          【讨论】:

            【解决方案6】:

            要尝试的几件事。

            1. 检查端口是否被防火墙阻止。
            2. 将 AMQP 传输连接器端口更改为其他值,例如 5763 等

            您的系统上有一些东西阻止访问该端口、正在运行的服务、防火墙等。

            【讨论】:

              猜你喜欢
              • 2015-04-27
              • 2018-02-16
              • 2011-05-24
              • 2014-09-17
              • 2015-02-16
              • 2012-08-15
              • 2012-01-09
              • 1970-01-01
              • 1970-01-01
              相关资源
              最近更新 更多