软件环境
- CentOS 7.2 x64 腾讯云主机
- activeMQ 5.15.4
报错日志
ERROR | Failed to start Apache ActiveMQ (localhost, ID:VM_42_114_centos-35678-1532881640544-0:1)
java.net.URISyntaxException: Illegal character in hostname at index 7: ws://VM_42_114_centos:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600
at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_181]
at java.net.URI$Parser.parseHostname(URI.java:3387)[:1.8.0_181]
at java.net.URI$Parser.parseServer(URI.java:3236)[:1.8.0_181]
at java.net.URI$Parser.parseAuthority(URI.java:3155)[:1.8.0_181]
at java.net.URI$Parser.parseHierarchical(URI.java:3097)[:1.8.0_181]
at java.net.URI$Parser.parse(URI.java:3053)[:1.8.0_181]
at java.net.URI.<init>(URI.java:673)[:1.8.0_181]
解决方法
-
hostname
检查主机名中是否包含下划线
- 修改hostname去掉下划线,在/etc/hosts中添加解析记录
- 重启服务器
参考文章