The reason Activemq service error and can not start summary

Foreword

Environment Description:
System Version: centos7.3
ActiveMQ version: apache-activemq-5.14.5

1, the host hostname illegal characters

Modify the host hostname when accidentally write illegal characters such as an underscore "_", leading to service failed to start.
Error contents:

2019-09-29 12:44:42,057 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:193_168_0_24-43901-1569732279834-0:1], java.net.URISyntaxException: Illegal character in hostname at index 8: ws://193_168_0_24:58083?maximumConnections=1000&wireFormat.maxFrameSize=104857600) | org.apache.activemq.broker.BrokerService | main

Solution:
Modify hostname on it.
Modify the hostname of the method:

1. A method of modifying a hostnamectl command, do not need to open a new window on the restart to take effect.
Syntax: hostnamectl set-hostname new hostname

2. Method two: modify the configuration file / etc / hostname save and exit
after the completion of modifications need to restart to take effect

3. Method three: temporarily modify the host name
hostname new hostname

hostname naming convention may refer to:
https://en.wikipedia.org/wiki/Hostname

2, profile IP is not configured correctly

Configuration file conf / activemq.xml IP configuration file is incorrect, activemq failed to start.
Error:

2019-09-29 13:24:27,798 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:193-168-0-24-37400-1569734665712-0:1], java.io.IOException: Transport Connector could not be registered in JMX: java.io.IOException: Failed to bind to server socket: nio://193.169.0.24:50002?maximumConnections=1000&wireFormat.maxFrameSize=104857600 due to: java.net.BindException: Cannot assign requested address) | org.apache.activemq.broker.BrokerService | main

Solve:
IP correctly modified enough.

However, online posts also mentioned about "Can not assign requested address" other causes and solutions of error:
1, / etc / hosts to resolve exceptions, can not resolve the local IP, the need to manually add localhost 127.0.0.1
2, / etc / hosts file permissions abnormal revised to 644

Guess you like

Origin blog.51cto.com/10950710/2442313