ServiceMix - [Quickstart]6.我遇到的几个问题

这是我在阅读与试验过程中所遇到的几个问题。希望对你有所帮助。

1. 运行activemq:list指令时发生错误。

karaf@root> activemq:list
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stu
b: javax.naming.NameNotFoundException: jmxrmi
java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: java
x.naming.NameNotFoundException: jmxrmi
        at org.apache.activemq.console.command.ListCommand.runTask(ListCommand.java:53)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:316)
        at org.apache.activemq.karaf.commands.ActiveMQCommandSupport.doExecute(ActiveMQCommandSupport.java:46)
        at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
        at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
        at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:218)
        at java.lang.Thread.run(Thread.java:662)
Error executing command: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi

修改<SERVICEMIX_HOME>/etc/activemq-broker.xml文件中:
        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

将false改成true。

不需重启,ServiceMix是热启动。再次执行命令



2.不知道指令怎么使用,是什么含义怎么办?

使用help指令会得到非常详细的解释。

例如:

karaf@root> helq activemq:list
Command not found: helq
karaf@root> help activemq:list
Task Usage: Main list [list-options]
Description:  Lists all available broker in the specified JMX context.

List Options:
    --jmxurl <url>             Set the JMX URL to connect to.
    --pid <pid>                Set the pid to connect to (only on Sun JVM).
    --jmxuser <user>           Set the JMX user used for authenticating.
    --jmxpassword <password>   Set the JMX password used for authenticating.
    --jmxlocal                 Use the local JMX server instead of a remote one.
    --version                  Display the version information.
    -h,-?,--help               Display the stop broker help information.

3.如何查看前面例子中发送给activeMQ queue中消息?

使用指令

activemq:browse --amqurl tcp://localhost:61616 events




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值