我正在将ActiveMQ 5.11.1升级到5.14.1。启动ActiveMQ时,它会显示它在控制台中启动,如下所示。
activemq console
Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@2b0de40c: startup date [Fri Nov 18 07:43:43 IST 2016]; root of context hierarchy
INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/home/rajesh/workspace/portalTrunk/testArea/jms_store]
INFO | KahaDB is version 6
INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:43026/jmxrmi
INFO | Recovering from the journal @1:2525
INFO | Recovery replayed 5 operations from the journal in 0.012 seconds.
INFO | PListStore:[/home/rajesh/workspace/portalTrunk/testArea/activemq/data/172.17.40.17/tmp_storage] started
INFO | Apache ActiveMQ 5.14.1 (172.17.40.17, ID:172.17.40.17-46207-1479435224633-0:1) is starting
INFO | Listening for connections at: tcp://172.17.40.17:43011
INFO | Connector openwire started
INFO | Listening for connections at: stomp://172.17.40.17:43012
INFO | Connector stomp started
INFO | Listening for connections at: ssl://172.17.40.17:43071
INFO | Connector ssl started
INFO | Establishing network connection from vm://172.17.40.17?create=false&async=false to ssl://localhost:43071
INFO | Connector vm://172.17.40.17 started
INFO | Network Connector DiscoveryNetworkConnector:host1 and host2:BrokerService[172.17.40.17] started
INFO | Apache ActiveMQ 5.14.1 (172.17.40.17, ID:172.17.40.17-46207-1479435224633-0:1) started
INFO | For help or more information please see: http://activemq.apache.org
INFO | 172.17.40.17 Shutting down host1 and host2
WARN | Transport Connection to: tcp://127.0.0.1:44630 failed: java.io.EOFException
INFO | 172.17.40.17 bridge to Unknown stopped
INFO | Connector vm://172.17.40.17 stopped
INFO | ActiveMQ WebConsole available at http://localhost:43021/
INFO | ActiveMQ Jolokia REST API available at http://localhost:43021/api/jolokia/
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | jolokia-agent: Using policy access restrictor classpath:/jolokia-access.xml
但是当打开网址http://localhost:43021时,我无法访问网站。
我不知道我在哪里弄错了。当我回滚到版本5.11.1时,一切都很好。
在我犯错误的地方可以帮助我。
这里我的Jetty.xml发生了变化
<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
<!-- the default port number for the web console -->
<property name="host" value="localhost"/>
<property name="port" value="${JMS_ADMIN_PORT}"/>
</bean>
<bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server" init-method="start"
destroy-method="stop">
<property name="handler">
<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<property name="handlers">
<list>
<ref bean="contexts" />
<ref bean="securityHandler" />
</list>
</property>
</bean>
</property>
</bean>
<bean id="invokeConnectors" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="Server" />
<property name="targetMethod" value="setConnectors" />
<property name="arguments">
<list>
<bean id="Connector" class="org.eclipse.jetty.server.ServerConnector">
<constructor-arg ref="Server" />
<!-- see the jettyPort bean -->
<property name="host" value="localhost" />
<property name="port" value="${JMS_ADMIN_PORT}" />
</bean>
<!--
Enable this connector if you wish to use https with web console
-->
<bean id="SecureConnector" class="org.eclipse.jetty.server.ServerConnector">
<constructor-arg ref="Server" />
<constructor-arg>
<bean id="handlers" class="org.eclipse.jetty.util.ssl.SslContextFactory">
<property name="keyStorePath" value="file:${JMS_KEY_STORE}" />
<property name="keyStorePassword" value="${JMS_KEY_STORE_PASSWORD}" />
</bean>
</constructor-arg>
<property name="port" value="${JMS_ADMIN_PORT}" />
</bean>
</list>
</property>
</bean>
<bean id="configureJetty" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod" value="org.apache.activemq.web.config.JspConfigurer.configureJetty" />
<property name="arguments">
<list>
<ref bean="Server" />
<ref bean="secHandlerCollection" />
</list>
</property>
</bean>
<bean id="invokeStart" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"
depends-on="configureJetty, invokeConnectors">
<property name="targetObject" ref="Server" />
<property name="targetMethod" value="start" />
</bean>