activemq在linux上运行失败

  在linux上安装运行后,

cd [activemq_install_dir]/bin
./activemq start

之后

[ec2-user@ip-172-31-44-210 bin]$ sudo ./activemq start
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /root/.activemqrc)


INFO: Invoke the following command to create a configuration file
./activemq setup [ /etc/default/activemq | /root/.activemqrc ]


INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/home/ec2-user/apache-activemq-5.10.0/data/activemq-ip-172-31-44-210.pid' (pid '8591')




activemq不能使用

采用

cd [activemq_install_dir]/bin
./activemq console

运行后发现

activemq不能使用,
ERROR | Failed to start Apache ActiveMQ ([localhost, ID:ip-172-31-44-210-44960-1480258703387-0:1], java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use (Bind failed))

发现1883端口被占用


通过

netstat -tlnp

查找掉占用pid号

kill pid号


重新启动activemq可以使用


apollo运行失败原因也是如此


由于之前运行了
mosquitto

占用了1883



你可能感兴趣的:(MQTT,activemq,activemq,linux,mqtt)