ActiveMQ5.15.6windows启动报错

 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

activeMQ是tcp://开头为什么会是amqp?amqp是rabbitMQ用的协议,我电脑安装了.exe版本的rabbitMQ,也就是说只要电脑启动,abbitMQ就会启动,说明abbitMQ监听5672端口;那么问题来了activeMQ怎么也会监听amqp协议的端口?

找到activeMQ的解压目录:安装目录\conf\activemq.xml,可以看到:

 
            
            
            
			 
            
            
            
        

说了activeMQ是支持五种协议连接分别是:tcp://、ampq://、stomp://、mqtt://、ws:// ,而常用的就是tcp://,其他具体怎么连接还有待学习;而ampq://刚好监听的是5672端口,所以和rabbitMQ的默认端口冲突了,改下就ok了。

或者找到rabbitMQ的安装目录,找到:安装目录\etc\rabbitmq.config.example    该文件有以下配置是erlang语言编写:


   %%
   %% Networking
   %% ====================
   %%
   %% Related doc guide: https://www.rabbitmq.com/networking.html.

   %% By default, RabbitMQ will listen on all interfaces, using
   %% the standard (reserved) AMQP port.
   %%
   %% {tcp_listeners, [5672]},

   %% To listen on a specific interface, provide a tuple of {IpAddress, Port}.
   %% For example, to listen only on localhost for both IPv4 and IPv6:
   %%
   %% {tcp_listeners, [{"127.0.0.1", 5672},
   %%                  {"::1",       5672}]},

   %% TLS listeners are configured in the same fashion as TCP listeners,
   %% including the option to control the choice of interface.
   %%
   %% {ssl_listeners, [5671]},

   %% Number of Erlang processes that will accept connections for the TCP
   %% and TLS listeners.
   %%
   %% {num_tcp_acceptors, 10},
   %% {num_ssl_acceptors, 1},

具体什么玩意看不懂,但是有5672.。。。

 

你可能感兴趣的:(MQ)