2012-03-05 396 views
-1

我从ubuntu存储库安装了activeMQ软件包,它已正确设置并在我的Ubuntu服务器虚拟机上运行。问题是我无法连接到管理控制台。 我注意到,在windows bin上,jetty.xml被导入到activemq.xml中,所以我也在ubunut-server上。但仍然没有。有人能指出还有什么要做吗?ActiveMQ Ubuntu服务器管理控制台

编辑 在suggetions之后,我应该发布配置,所以在这里。

<beans 
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"> 

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> 

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" 
     destroyApplicationContextOnStop="true"> 

    <destinationPolicy> 
    <policyMap> 
     <policyEntries> 
     <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb"> 
      <pendingSubscriberPolicy> 
      <vmCursor/> 
      </pendingSubscriberPolicy> 
     </policyEntry> 
     <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"> 
     </policyEntry> 
     </policyEntries> 
    </policyMap> 
    </destinationPolicy> 

    <destinations> 
    <queue physicalName="CMAgentStatus"/> 
    <queue physicalName="CMUpdateRequest"/> 
    <queue physicalName="CMSnapshotEvent"/> 
    </destinations> 

    <managementContext> 
    <managementContext createConnector="true"/> 
    </managementContext> 

    <persistenceAdapter> 
    <kahaDB directory="${activemq.base}/data/kahadb"/> 
    </persistenceAdapter> 

    <transportConnectors> 
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> 
    </transportConnectors> 

</broker> 

<!-- <import resource="jetty.xml"/> --> 
</beans> 

当我包括的jetty.xml的ActiveMQ的不加载。尽管在activemq.log上没有消息。

的的jetty.xml的样子:

<beans xmlns="http://www.springframework.org/schema/beans" 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.xsd"> 

<bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService"> 
    <property name="name" value="ActiveMQRealm"/> 
    <property name="config" value="${activemq.base}/conf/jetty-realm.properties"/> 
</bean> 

<bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint"> 
    <property name="name" value="BASIC"/> 
    <property name="roles" value="admin"/> 
    <property name="authenticate" value="false"/> 
</bean> 
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> 
    <property name="constraint" ref="securityConstraint"/> 
    <property name="pathSpec" value="/*"/> 
</bean> 
<bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler"> 
    <property name="loginService" ref="securityLoginService"/> 
    <property name="authenticator"> 
    <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator"/> 
    </property> 
    <property name="constraintMappings"> 
    <list> 
     <ref bean="securityConstraintMapping"/> 
    </list> 
    </property> 
    <property name="handler"> 
    <bean id="sec" class="org.eclipse.jetty.server.handler.HandlerCollection"> 
     <property name="handlers"> 
     <list> 
      <bean class="org.eclipse.jetty.webapp.WebAppContext"> 
      <property name="contextPath" value="/admin"/> 
      <property name="resourceBase" value="${activemq.home}/webapps/admin"/> 
      <property name="logUrlOnStart" value="true"/> 
      </bean> 
      <bean class="org.eclipse.jetty.webapp.WebAppContext"> 

      <property name="contextPath" value="/camel"/> 
      <property name="resourceBase" value="${activemq.home}/webapps/camel"/> 
      <property name="logUrlOnStart" value="true"/> 
      </bean> 
      <bean class="org.eclipse.jetty.webapp.WebAppContext"> 
      <property name="contextPath" value="/demo"/> 
      <property name="resourceBase" value="${activemq.home}/webapps/demo"/> 
      <property name="logUrlOnStart" value="true"/> 
      </bean> 
      <bean class="org.eclipse.jetty.webapp.WebAppContext"> 
      <property name="contextPath" value="/fileserver"/> 
      <property name="resourceBase" value="${activemq.home}/webapps/fileserver"/> 
      <property name="logUrlOnStart" value="true"/> 
      <property name="parentLoaderPriority" value="true"/> 
      </bean> 
      <bean class="org.eclipse.jetty.server.handler.ResourceHandler"> 
      <property name="directoriesListed" value="false"/> 
      <property name="welcomeFiles"> 
       <list> 
       <value>index.html</value> 
       </list> 
      </property> 
      <property name="resourceBase" value="${activemq.home}/webapps/"/> 
      </bean> 
      <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"> 
      <property name="serveIcon" value="false"/> 
      </bean> 
     </list> 
     </property> 
    </bean> 
    </property> 
</bean> 

<bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"> 
</bean> 

<bean id="Server" class="org.eclipse.jetty.server.Server" init-method="start" 
     destroy-method="stop"> 

    <property name="connectors"> 
    <list> 
     <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector"> 
     <property name="port" value="8161"/> 
     </bean> 
    </list> 
    </property> 

    <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> 

</beans> 

我希望这有助于。

+0

你应该发布你的配置以及你得到的任何相关的错误,这里没有足够的信息来猜测。 – 2012-03-06 11:51:57

回答

1

您应该确保已配置的端口可用且可以使用任何安全策略。如果Jetty无法绑定到8161,那么您将遇到问题。

+0

我想我错过了linux tar二进制文件中的webapps文件夹。我试着将它添加到'/ usr/share/activemq'文件夹并重新启动activemq。日志很干净,但activemq不加载。 – inglor 2012-03-06 21:56:37

相关问题