2014-03-26 10:35:45,760 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:wx_amp01-59836-1395801345508-0:1], java.net.URISyntaxException: Illegal character in hostname at index 7: ws
://wx_amp01:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600) | org.apache.activemq.broker.BrokerService | main
2014-03-26 10:35:45,762 | INFO | Apache ActiveMQ 5.9.0 (localhost, ID:wx_amp01-59836-1395801345508-0:1) is shutting down | org.apache.activemq.broker.BrokerService | main
2014-03-26 10:35:47,682 | INFO | Connector openwire stopped | org.apache.activemq.broker.TransportConnector | main
2014-03-26 10:35:47,700 | INFO | Connector amqp stopped | org.apache.activemq.broker.TransportConnector | main
2014-03-26 10:35:47,720 | INFO | Connector stomp stopped | org.apache.activemq.broker.TransportConnector | main
2014-03-26 10:35:47,723 | INFO | Connector mqtt stopped | org.apache.activemq.broker.TransportConnector | main
2014-03-26 10:35:47,724 | INFO | Connector ws stopped | org.apache.activemq.broker.TransportConnector | main
2014-03-26 10:35:47,729 | INFO | PListStore:[/home/mq/apache-activemq-5.9.0/data/localhost/tmp_storage] stopped | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
2014-03-26 10:35:47,730 | INFO | Stopping async queue tasks | org.apache.activemq.store.kahadb.KahaDBStore | main
2014-03-26 10:35:47,731 | INFO | Stopping async topic tasks | org.apache.activemq.store.kahadb.KahaDBStore | main
2014-03-26 10:35:47,732 | INFO | Stopped KahaDB | org.apache.activemq.store.kahadb.KahaDBStore | main
2014-03-26 10:35:47,975 | INFO | Apache ActiveMQ 5.9.0 (localhost, ID:wx_amp01-59836-1395801345508-0:1) uptime 3.032 seconds | org.apache.activemq.broker.BrokerService | main
2014-03-26 10:35:47,977 | INFO | Apache ActiveMQ 5.9.0 (localhost, ID:wx_amp01-59836-1395801345508-0:1) is shutdown | org.apache.activemq.broker.BrokerService | main
2014-03-26 10:35:47,978 | INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@2bb5340c: startup date [Wed Mar 26 10:35:43 CST 2014]; root of context hierarchy | org.apache.activem
q.xbean.XBeanBrokerFactory$1 | main
2014-03-26 10:35:47,982 | WARN | Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@2bb5340
c: startup date [Wed Mar 26 10:35:43 CST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)
at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:782)
at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:574)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
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:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
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.runTask(StartCommand.java:87)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
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:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
上述异常是因为hostname不合法,解决办法:
编辑文件: /etc/sysconfig/network
修改: HOSTNAME=new-hostname.domainname
修改:/etc/hosts 添加:IP hostname行
重启linux机器:reboot