最近真是跟activemq杠上了,今天发现又不能启动成功,然后找到以下解决办法:
Illegal character in hostname error on hosts with underscores in their host names
---------------------------------------------------------------------------------
Key: AMQ-1188
URL: https://issues.apache.org/activemq/browse/AMQ-1188
Project: ActiveMQ
Issue Type: Bug
Affects Versions: 4.1.0
Environment: RHEL4 Update 4 ES x86_64
Sun JDK 1.4.2_08
Reporter: Yanik Grignon
Priority: Minor
On a machine where the hostname contains underscores (e.g. HS_RH64_A3_1) ActiveMQ fails to initialize with the stack trace below. This seems to be a problem with the TCP protocol handler since doing new URL("<a href="http://HS_RH64_A3_1.godzilla.local:61616"" added>http://HS_RH64_A3_1.godzilla.local:61616") works fine.
2007-03-05 08:30:20,076 [WrapperSimpleAppMain] ERROR (BrokerService.java:412) - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Transp
ort Connector could not be registered in JMX: Illegal character in hostname at index 8: tcp://HS_RH64_A3_1.godzilla.local:61616
java.io.IOException: Transport Connector could not be registered in JMX: Illegal character in hostname at index 8: tcp://HS_RH64_A3_1.godzilla.local:61616
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:25)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1079)
at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:1508)
at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1468)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:402)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:82)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.activemq.console.Main.runTaskClass(Main.java:159)
at org.apache.activemq.console.Main.main(Main.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:197)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Illegal character in hostname at index 8: tcp://HS_RH64_A3_1.godzilla.local:61616
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:43)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:94)
at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)
at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:109)
at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:270)
at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:122)
at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:100)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1072)
... 35 more
Caused by: java.net.URISyntaxException: Illegal character in hostname at index 8: tcp://HS_RH64_A3_1.godzilla.local:61616
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.parseHostname(URI.java:3355)
at java.net.URI$Parser.parseServer(URI.java:3204)
at java.net.URI$Parser.parseAuthority(URI.java:3123)
at java.net.URI$Parser.parseHierarchical(URI.java:3065)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.<init>(URI.java:663)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:91)
... 41 more
FWIW a workaround is probably to use the IP address in the config file (its only when using the localhost that we try and resolve it).
I've added a fix to trunk to work around this where if the URI is invalid we try to use the IP address in the URI instead. Let us know if that doesn't fix it and we can reopen this issue
分享到:
相关推荐
Apache ActiveMQ 是一款开源的消息中间件,它遵循开放标准,如 JMS(Java Message Service)规范,用于在分布式系统中高效地传输数据。本文档详细介绍了在Linux环境下安装和使用ActiveMQ的过程,以及一些基本的配置...
成功启动服务后,可以通过管理控制台地址访问ActiveMQ的管理界面。默认情况下,地址格式是***地址:8161。登录管理界面时,默认的用户名和密码是admin/admin,登录后可以进行进一步的管理操作。 由于ActiveMQ是一个...
Apache ActiveMQ 是一个开源的消息中间件,用于在分布式系统中高效传输消息。它遵循Java Message Service (JMS) 规范,提供可靠且灵活的消息传递功能。在本文中,我们将详细探讨如何在Linux环境中安装和配置ActiveMQ...
启动成功后,ActiveMQ会监听默认的TCP端口61616用于JMS通信,以及8161端口用于Web控制台。你可以通过浏览器访问`http://localhost:8161/admin/`来查看和管理ActiveMQ的状态。 最后,为了确保系统在每次启动时都能...
Apache ActiveMQ是一个开源的消息代理,遵循Java消息服务(JMS)规范,用于在不同的应用和平台之间进行可靠的消息传递。ActiveMQ能够支持多种传输协议,并能够处理大量消息的存储和转发。 从文件【部分内容】中,...
通过上述步骤,我们可以成功地在一台服务器上构建了一个基于 ZooKeeper 的 ActiveMQ 集群。这种配置能够显著提高系统的稳定性和可靠性,同时也能够支持高并发场景下的消息处理需求。此外,借助 ZooKeeper 的强大功能...
启动成功后,控制台会输出`Starting ActiveMQ Broker`的信息。 ##### 4. 验证安装 可以通过访问ActiveMQ的Web管理控制台来验证安装是否成功: - **URL**:`http://IP地址:8161/admin/index.jsp` - **用户名**:...
- **验证启动状态**:可以通过命令行工具或图形化工具验证Zookeeper是否启动成功。 #### 五、测试ActiveMQ集群 - **发送消息**:从任一客户端向ActiveMQ集群发送消息。 - **接收消息**:在集群中任一活动的ActiveMQ...
随着消息中间件在现代分布式系统中的广泛应用,Apache ActiveMQ作为一款成熟稳定的开源消息中间件,在企业级应用中占据了重要地位。本文将详细介绍如何在Linux系统上进行ActiveMQ的安装与部署,包括必要的前置条件...
启动ActiveMQ服务,检查控制台是否能正常访问,验证配置是否成功。如果需要注册为服务,确保服务权限设置为管理员。 为了实现负载均衡,我们可以利用ActiveMQ的Failover Transport特性。客户端连接字符串可以指定多...
在IT行业中,消息队列(Message Queue)是用于应用程序间异步通信的重要工具,而Apache ActiveMQ是一款开源、高性能、跨平台的消息中间件。本文将深入探讨如何将ActiveMQ与Spring框架集成,以便在实际项目中实现高效...
以后台方式启动ActiveMQ: ```bash /data/activemq5/bin/activemq start ``` ActiveMQ内置了Jetty web服务器,可以通过以下URL访问管理界面: ```http http://192.168.1.222:8161/admin ``` 确保防火墙设置允许此...
启动成功后,可以在浏览器中访问`http://localhost:8161/admin`,使用默认的管理员账号(如admin/admin)登录,查看和管理MQ实例。 总结,MQ中间件的安装配置涉及到数据库的准备工作、MQ程序的配置以及服务的启动与...
- 进入`data/tomcat/aus-server/bin`中启动`startup.sh`文件,检查启动日志确认项目启动成功。 5. **部署upms项目**:部署流程与“aus”项目类似,但需要注意在同一台服务器上部署多个`tomcat`实例时,必须确保每...
二是只有一个服务开启,这里以61617为例,当61616关闭时,系统会通过控制台看到61617接管了连接,而且在localhost的61616中看不到任何信息。当重新启动61616服务时,由于"randomize=false",观察到localhost的61616...
在本例中,你需要下载并安装ActiveMQ,然后启动它的服务作为消息代理,使得Flex客户端可以通过它与服务器进行JMS通信。 3. **Tomcat部署**: Tomcat是一个流行的Java Servlet容器,用于部署和运行Java Web应用程序...
媒体网络,山寨QQ,Java聊天程序 Java编写的山寨QQ,多人聊天+用户在线,程序分服务端和客户端,典型C/S结构, 当用户发送第一次请求的时候,验证用户登录,创建一个该qq号和服务器端保持通讯连接得线程,启动该通讯...