[ https://issues.apache.org/activemq/browse/AMQ-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-2122. ----------------------------- Assignee: Gary Tully Fix Version/s: 5.4.0 (was: 5.4.1) Resolution: Fixed see resolution of https://issues.apache.org/activemq/browse/AMQ-2776 which is similar. The local host name resolution is now conditional on useLocalHost which now defaults to false which should avoid your issue. > Active MQ Transport connector does not appear to honor use LocalHost option > --------------------------------------------------------------------------- > > Key: AMQ-2122 > URL: https://issues.apache.org/activemq/browse/AMQ-2122 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.2.0 > Environment: RHEL linux Ver 5 > Reporter: Andrew > Assignee: Gary Tully > Fix For: 5.4.0 > > > Config and stack trace attached > using below config activemq broker fails to start as it is unable to resolve IP to domain name. > using transport connector syntax from here > http://activemq.apache.org/tcp-transport-reference.html > > >  xmlns="http://www.springframework.org/schema/beans" >  xmlns:amq="http://activemq.apache.org/schema/core" >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd >  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> >     >     >         >            file:///${activemq.base}/conf/credentials.properties >         >     >     >         >         >             >                 >                     >                     >                       >                     >                 >             >         >         >         >             >         >         >         >             >         >             >         >         >             >         >         >         >         >         >         >             >         >         >         >             >                 >                     >                 >                 >                     >                 >                 >                     >                 >             >         >         >         >             >         >         >     >     >     >         >        org.foo.bar >         >         >             >             >         >     >     >     >     >         >           >             >             >             >           >         >     >     >     >     >     >         >             >         >         >             >             >             >         >     >     >     >     >     >     >     >     >     >     > > > 2009-01-27 16:42:43,439 [erSimpleAppMain] INFO  DefaultCamelContext            - JMX enabled. Using InstrumentationLifecycleStrategy. > 2009-01-27 16:42:43,558 [erSimpleAppMain] ERROR BrokerService                  - Failed to resolve localhost > 2009-01-27 16:42:44,592 [erSimpleAppMain] INFO  BrokerService                  - Using Persistence Adapter: AMQPersistenceAdapter(/opt/activemq/data) > 2009-01-27 16:42:44,709 [erSimpleAppMain] INFO  AMQPersistenceAdapter          - AMQStore starting using directory: /opt/activemq/data > 2009-01-27 16:42:44,988 [erSimpleAppMain] INFO  KahaStore                      - Kaha Store using data directory /opt/activemq/data/kr-store/state > 2009-01-27 16:42:45,473 [erSimpleAppMain] INFO  AMQPersistenceAdapter          - Active data files: [] > 2009-01-27 16:42:45,726 [erSimpleAppMain] INFO  BrokerService                  - ActiveMQ 5.2.0 JMS Message Broker (localhost) is starting > 2009-01-27 16:42:45,726 [erSimpleAppMain] INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/ > 2009-01-27 16:42:45,820 [erSimpleAppMain] INFO  KahaStore                      - Kaha Store using data directory /opt/activemq/data/kr-store/data > 2009-01-27 16:42:46,126 [erSimpleAppMain] ERROR BrokerService                  - Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://192.168.98.101:61616?useLocalHost=true due to: java.net.UnknownHostException: test_host.test_domain: test_host.test_domain > java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://192.168.98.101:61616?useLocalHost=true due to: java.net.UnknownHostException: test_host.test_domain: test_host.test_domain >        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27) >        at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1434) >        at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:1893) >        at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1844) >        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:480) >        at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:52) >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368) >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334) >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) >        at java.security.AccessController.doPrivileged(Native Method) >        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) >        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) >        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) >        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) >        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) >        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) >        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) >        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) >        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64) >        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52) >        at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96) >        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52) >        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71) >        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) >        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115) >        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74) >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) >        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129) >        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) >        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79) >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >        at java.lang.reflect.Method.invoke(Unknown Source) >        at org.apache.activemq.console.Main.runTaskClass(Main.java:225) >        at org.apache.activemq.console.Main.main(Main.java:106) >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >        at java.lang.reflect.Method.invoke(Unknown Source) >        at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) >        at java.lang.Thread.run(Unknown Source) > Caused by: java.io.IOException: Failed to bind to server socket: tcp://192.168.98.101:61616?useLocalHost=true due to: java.net.UnknownHostException: test_host.test_domain: test_host.test_domain >        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33) >        at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:141) >        at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:60) >        at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:131) >        at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:293) >        at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:135) >        at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:98) >        at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1428) >        ... 42 more > Caused by: java.net.UnknownHostException: test_host.test_domain: test_host.test_domain >        at java.net.InetAddress.getLocalHost(Unknown Source) >        at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:133) >        ... 48 more > 2009-01-27 16:42:46,129 [erSimpleAppMain] INFO  BrokerService                  - ActiveMQ Message Broker (localhost, null) is shutting down > 2009-01-27 16:42:46,129 [erSimpleAppMain] INFO  TransportConnector             - Connector openwire Stopped > 2009-01-27 16:42:46,204 [erSimpleAppMain] INFO  BrokerService                  - ActiveMQ JMS Message Broker (localhost, null) stopped -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.