ActiveMQ Ubuntu服务器管理控制台

ActiveMQ Ubuntu服务器管理控制台,ubuntu,activemq,Ubuntu,Activemq,我从ubuntu存储库中安装了activeMQ软件包,它已正确设置并在我的ubuntu服务器VM上运行。问题是我无法连接到管理控制台。 我注意到,在windows bin上,jetty.xml被导入到activemq.xml上,因此我也在ubunut服务器上导入了jetty.xml。但还是什么都没有。有人能指出还需要做些什么吗 编辑 在建议之后,我应该发布配置,所以它就在这里。 当我包含jetty.xml时,activeMQ不会加载。但是activemq.log上没有消息 jetty.xm

我从ubuntu存储库中安装了activeMQ软件包,它已正确设置并在我的ubuntu服务器VM上运行。问题是我无法连接到管理控制台。 我注意到,在windows bin上,jetty.xml被导入到activemq.xml上,因此我也在ubunut服务器上导入了jetty.xml。但还是什么都没有。有人能指出还需要做些什么吗

编辑 在建议之后,我应该发布配置,所以它就在这里。


当我包含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>

index.html

我希望这会有所帮助。

您应该确保配置的端口可用,并且您拥有的任何安全策略都允许使用这些端口。如果Jetty无法绑定到8161,那么您将遇到问题

你应该发布你的配置以及你得到的任何相关错误,这里没有足够的信息进行猜测。我想我缺少linux tar二进制文件中的webapps文件夹。我尝试将其添加到
/usr/share/activemq
文件夹中,然后重新启动activemq。日志已清除,但未加载activemq。
<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>