On Fri, Aug 8, 2008 at 2:21 AM, Janesh S <[EMAIL PROTECTED]> wrote:
>
> Hi Bruce,
>
> Thanks!
>
> I tried enabling the JMX using each of the following options, but still was
> unable to stop the server using the "activemq-admin stop" command:
>
> ------------------------------------------------------------------------------------------------------------------------------------------
> 1. Added useJmx="true" (within <broker> element) in the conf/activemq.xml
> and started the server using the following command: ./activemq
> xbean:../conf/activemq.xml
>
> 2. Tried started the server as follows: "activemq
> broker:(tcp://localhost:61616, tcp://localhost:5000)?useJmx=true" as given
> in documentation, but this fails to start. I got this error "bash: syntax
> error near unexpected token `('"
>
> 3. Set this option in environment using export: "export
> SUNJMX="-Dcom.sun.management.jmxremote.port=1099
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote=true""
>
> and then started the activemq like this: ./activemq
>
> On stopping using "./activemq-admin stop" I got the following error:
>
> "./activemq-admin stop
> Error: Exception thrown by the agent : java.rmi.server.ExportException: Port
> already in use: 1099; nested exception is:
>        java.net.BindException: Address already in use"
>
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Can you please help? Thanks.

I had to modify the activemq-admin script to adjust the SUNJMX
variable a bit to get it to work properly. Below is the full variable
after my modification:

SUNJMX="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1616
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"

After adding the -Dcom.sun.management.jmxremote system property, the
activemq-admin script works as expected.

FWIW, the active-admin script's start function won't return. It just
runs ActiveMQ in place which is not what most people expect. So you
should probably use the activemq script or the wrapper executable to
startup ActiveMQ. Once it's started, you can use the activemq-admin
script to perform the other functions.

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Reply via email to