ActiveMQ fails to start with host names containing underscores

troubleshooting

#1

Problem

You try to start ActiveMQ on your host, but it fails to start.

Diagnosis

Checkt the ActiveMQ log files and look for ERROR messages.

Cause

The underscore is an illegal character for hostnames and ActiveMQ will record an error message like this:

 ERROR | Failed to start Apache ActiveMQ ([localhost, ID:activemqesm-6b2b-172_23_23_42.eu-central-1.dev-30863-2522726520513-0:1], java.net.URISyntaxException: Illegal character in hostname at index 25: ws://activemqesm-6b2b-172_23_23_42.eu-central-1.dev:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600)

Resolution

Change the host name to so it does not contain illegal characters and restart ActiveMQ.