./activemq-admin commands give NameNotFoundException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

./activemq-admin commands give NameNotFoundException

PhilK
I am using ActiveMQ 5.5.1

On Windows, when I execute './activemq-admin -list' command, for example, then I get a list of local active brokers.

I am also running a ActiveMQ 5.5.1 broker on a Gentoo Linux machine.  When I execute the same command there I get the following error:

Java Runtime: IBM Corporation 1.6.0 /usr/local/gtech/ibm-java-i386-60/jre
  Heap sizes: current=4096k  free=3295k  max=524288k
    JVM args: -Xjcl:jclscar_24 -Dcom.ibm.oti.vm.bootstrap.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386 -Dsun.boot.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386 -Djava.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386:/usr/lib -Djava.home=/usr/local/gtech/ibm-java-i386-60/jre -Djava.ext.dirs=/usr/local/gtech/ibm-java-i386-60/jre/lib/ext -Duser.dir=/usr/local/apache-activemq-5.5.1/bin _j2se_j9=71168 -Djava.runtime.version=pxi3260sr6-20090925_01 (SR6) -Xdump -Djava.class.path=. -Dactivemq.classpath=/usr/local/apache-activemq-5.5.1/conf; -Dactivemq.home=/usr/local/apache-activemq-5.5.1 -Dactivemq.base=/usr/local/apache-activemq-5.5.1 -Djava.class.path=/usr/local/apache-activemq-5.5.1/bin/run.jar -Dsun.java.command=/usr/local/apache-activemq-5.5.1/bin/run.jar list -Dsun.java.launcher=SUN_STANDARD -Dsun.java.launcher.pid=8349 _port_library _org.apache.harmony.vmi.portlib
ACTIVEMQ_HOME: /usr/local/apache-activemq-5.5.1
ACTIVEMQ_BASE: /usr/local/apache-activemq-5.5.1
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 stub: javax.naming.NameNotFoundException: jmxrmi
java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.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.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)


Help?
Reply | Threaded
Open this post in threaded view
|

Re: ./activemq-admin commands give NameNotFoundException

Torsten Mielke-2
Hhm, given this error

> java.io.IOException: Failed to retrieve RMIServer stub:
> javax.naming.NameNotFoundException: jmxrmi


the tool seems unable to connect to the broker using JMX url given.
Can you double check the JMX port (typically 1099) is in use by the broker?

Is this the correct JMX url to connect to
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
?



Torsten Mielke
[hidden email]
[hidden email]


On Mar 29, 2012, at 12:41 AM, PhilK wrote:

> I am using ActiveMQ 5.5.1
>
> On Windows, when I execute './activemq-admin -list' command, for example,
> then I get a list of local active brokers.
>
> I am also running a ActiveMQ 5.5.1 broker on a Gentoo Linux machine.  When I
> execute the same command there I get the following error:
>
> Java Runtime: IBM Corporation 1.6.0 /usr/local/gtech/ibm-java-i386-60/jre
>  Heap sizes: current=4096k  free=3295k  max=524288k
>    JVM args: -Xjcl:jclscar_24
> -Dcom.ibm.oti.vm.bootstrap.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386
> -Dsun.boot.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386
> -Djava.library.path=/usr/local/gtech/ibm-java-i386-60/jre/lib/i386:/usr/lib
> -Djava.home=/usr/local/gtech/ibm-java-i386-60/jre
> -Djava.ext.dirs=/usr/local/gtech/ibm-java-i386-60/jre/lib/ext
> -Duser.dir=/usr/local/apache-activemq-5.5.1/bin _j2se_j9=71168
> -Djava.runtime.version=pxi3260sr6-20090925_01 (SR6) -Xdump
> -Djava.class.path=.
> -Dactivemq.classpath=/usr/local/apache-activemq-5.5.1/conf;
> -Dactivemq.home=/usr/local/apache-activemq-5.5.1
> -Dactivemq.base=/usr/local/apache-activemq-5.5.1
> -Djava.class.path=/usr/local/apache-activemq-5.5.1/bin/run.jar
> -Dsun.java.command=/usr/local/apache-activemq-5.5.1/bin/run.jar list
> -Dsun.java.launcher=SUN_STANDARD -Dsun.java.launcher.pid=8349 _port_library
> _org.apache.harmony.vmi.portlib
> ACTIVEMQ_HOME: /usr/local/apache-activemq-5.5.1
> ACTIVEMQ_BASE: /usr/local/apache-activemq-5.5.1
> 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 stub:
> javax.naming.NameNotFoundException: jmxrmi
> java.lang.RuntimeException: Failed to execute list task. Reason:
> java.io.IOException: Failed to retrieve RMIServer stub:
> javax.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.console.command.ShellCommand.runTask(ShellCommand.java:143)
>        at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>        at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>        at java.lang.reflect.Method.invoke(Method.java:600)
>        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
>        at org.apache.activemq.console.Main.main(Main.java:107)
>
>
> Help?
>





Reply | Threaded
Open this post in threaded view
|

Re: ./activemq-admin commands give NameNotFoundException

mickhayes
Can you show where the RMI registry is running? Typically on port 1099 for the first instance.
Michael Hayes B.Sc. (NUI), M.Sc. (DCU), SCSA SCNA
Reply | Threaded
Open this post in threaded view
|

Re: ./activemq-admin commands give NameNotFoundException

PhilK
Running:
  # netstat -apn | grep 1099

I get the following output:
  tcp        0      0 0.0.0.0:1099            0.0.0.0:*               LISTEN     5789/rmiregistry

And running:
  pgrep -fl java

I get:
  /usr/local/java/bin/java -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote -Dactivemq.classpath=/usr/local/apache-activemq-5.5.1/conf; -Dactivemq.home=/usr/local/apache-activemq-5.5.1 -Dactivemq.base=/usr/local/apache-activemq-5.5.1 -jar /usr/local/apache-activemq-5.5.1/bin/run.jar start


Reply | Threaded
Open this post in threaded view
|

Re: ./activemq-admin commands give NameNotFoundException

PhilK
In reply to this post by Torsten Mielke-2
From what I understand, the NameNotFoundException happens when you've successfully connected to the server and port, but 'jmxrmi' is not found there.  So, would this be an issue with my activeMQ or with rmiregistry?