You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Chirag Pujara <ch...@gmail.com> on 2013/07/11 18:24:03 UTC

Activemq clustring and JMX port chnage

Hello,

I want to run 2 activemq instance from same machine.

I used follwoing commands.

bin/activemq create instance1
bin/activemq setup ~/.activemqrc-instance-instance1


bin/activemq create instance2
bin/activemq setup ~/.activemqrc-instance-instance2

and I modified

instace2/bin/instance2 file with following lines:

ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8200 "
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.ssl=false"
#ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote"
#
export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START


and

instace1/bin/instance1 withI also tried

ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8100 "
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.ssl=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote"

export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START

I also tried

export
ACTIVEMQ_SUNJMX_CONTROL="-Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://
127.0.0.1:8100/jmxrmi"

in instance1 file.

but debug statement says "INFO | JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"

what am I missing.

thanks,
Chirag

Re: Activemq clustring and JMX port chnage

Posted by Chirag Pujara <ch...@gmail.com>.
Hello Paul,

I removed -Dcom.sun.management.jmxremote . but still same exception.

Here is output of stop command. may be I am missing something.

root@RHEL6u2-001-2:/opt/gwx/apache-activemq-5.8.0
17:13:57 # instance1/bin/instance1 stop
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq
/root/.activemqrc)

INFO: Invoke the following command to create a configuration file
/opt/gwx/apache-activemq-5.8.0/bin/activemq setup [ /etc/default/activemq |
/root/.activemqrc ]

INFO: Using java '/usr/bin/java'
INFO: Waiting at least 30 seconds for regular process termination of pid
'17698' :
Java Runtime: Sun Microsystems Inc. 1.6.0_22
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
  Heap sizes: current=1004928k  free=999683k  max=1004928k
    JVM args: -Xms1G -Xmx1G
-Djava.util.logging.config.file=logging.properties
-Dactivemq.classpath=/opt/gwx/apache-activemq-5.8.0/instance1/conf;
-Dactivemq.home=/opt/gwx/apache-activemq-5.8.0
-Dactivemq.base=/opt/gwx/apache-activemq-5.8.0/instance1
-Dactivemq.conf=/opt/gwx/apache-activemq-5.8.0/instance1/conf
-Dactivemq.data=/opt/gwx/apache-activemq-5.8.0/instance1/data
Extensions classpath:

[/opt/gwx/apache-activemq-5.8.0/instance1/lib,/opt/gwx/apache-activemq-5.8.0/lib,/opt/gwx/apache-activemq-5.8.0/instance1/lib/camel,/opt/gwx/apache-activemq-5.8.0/instance1/lib/optional,/opt/gwx/apache-activemq-5.8.0/instance1/lib/web,/opt/gwx/apache-activemq-5.8.0/instance1/lib/extra,/opt/gwx/apache-activemq-5.8.0/lib/camel,/opt/gwx/apache-activemq-5.8.0/lib/optional,/opt/gwx/apache-activemq-5.8.0/lib/web,/opt/gwx/apache-activemq-5.8.0/lib/extra]
ACTIVEMQ_HOME: /opt/gwx/apache-activemq-5.8.0
ACTIVEMQ_BASE: /opt/gwx/apache-activemq-5.8.0/instance1
ACTIVEMQ_CONF: /opt/gwx/apache-activemq-5.8.0/instance1/conf
ACTIVEMQ_DATA: /opt/gwx/apache-activemq-5.8.0/instance1/data
Connecting to pid: 17698
INFO: failed to resolve jmxUrl for pid:17698, using default JMX url
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
        java.net.ConnectException: Connection refused]
java.lang.RuntimeException: Failed to execute stop task. Reason:
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
        java.net.ConnectException: Connection refused]

Thanks,
Chirag



On Thu, Jul 11, 2013 at 3:46 PM, Paul Gale <pa...@gmail.com> wrote:

> Try removing:   -Dcom.sun.management.jmxremote
>
> In the 'ActiveMQ in Action' book it states (emphasis mine):  "Don’t
> let the name of this property fool you, as it enables the JMX agent
> for local access ONLY."
>
> Remote access can only be granted once
> "com.sun.management.jmxremote.port" is assigned a value. With both
> defines present I'm not sure what the resultant behavior would be as
> they seem to be 'fighting' each other.
>
> Also, simplify things by experimenting with JMX authentication turned
> off. Set com.sun.management.jmxremote.authenticate=false and remove
> the other JMX related auth defines. Worth a try.
>
> Thanks,
> Paul
>
> On Thu, Jul 11, 2013 at 2:41 PM, chiragpujara <ch...@gmail.com>
> wrote:
> > Thanks for reply. I had to set createConnector=true bcs I was getting
> > exception when I stop activemq.
> >
> > Exception:
> >
> > Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> > ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
> > java.io.IOException: Failed to retrieve RMIServer stub:
> > javax.naming.ServiceUnavailableException [Root exception is
> > java.rmi.ConnectException: Connection refused to host: localhost; nested
> > exception is:
> >         java.net.ConnectException: Connection refused]
> > java.lang.RuntimeException: Failed to execute stop task. Reason:
> > java.io.IOException: Failed to retrieve RMIServer stub:
> > javax.naming.ServiceUnavailableException [Root exception is
> > java.rmi.ConnectException: Connection refused to host: localhost; nested
> > exception is:
> >         java.net.ConnectException: Connection refused]
> >         at
> >
> org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
> >         at
> >
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> >         at
> >
> org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
> >         at
> >
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
> >         at
> >
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> >         at
> >
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >         at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:616)
> >         at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
> >         at org.apache.activemq.console.Main.main(Main.java:115)
> > ERROR: java.lang.Exception: java.io.IOException: Failed to retrieve
> > RMIServer stub: javax.naming.ServiceUnavailableException [Root exception
> is
> > java.rmi.ConnectException: Connection refused to host: localhost; nested
> > exception is:
> >         java.net.ConnectException: Connection refused]
> >
> > How can I stop ativemq without this exception. It waits for 30 seconds
> and
> > kills process.
> >
> > How do I fix it.
> >
> >
> >
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669150.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Activemq clustring and JMX port chnage

Posted by Paul Gale <pa...@gmail.com>.
Try removing:   -Dcom.sun.management.jmxremote

In the 'ActiveMQ in Action' book it states (emphasis mine):  "Don’t
let the name of this property fool you, as it enables the JMX agent
for local access ONLY."

Remote access can only be granted once
"com.sun.management.jmxremote.port" is assigned a value. With both
defines present I'm not sure what the resultant behavior would be as
they seem to be 'fighting' each other.

Also, simplify things by experimenting with JMX authentication turned
off. Set com.sun.management.jmxremote.authenticate=false and remove
the other JMX related auth defines. Worth a try.

Thanks,
Paul

On Thu, Jul 11, 2013 at 2:41 PM, chiragpujara <ch...@gmail.com> wrote:
> Thanks for reply. I had to set createConnector=true bcs I was getting
> exception when I stop activemq.
>
> Exception:
>
> Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
> java.io.IOException: Failed to retrieve RMIServer stub:
> javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost; nested
> exception is:
>         java.net.ConnectException: Connection refused]
> java.lang.RuntimeException: Failed to execute stop task. Reason:
> java.io.IOException: Failed to retrieve RMIServer stub:
> javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost; nested
> exception is:
>         java.net.ConnectException: Connection refused]
>         at
> org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
>         at org.apache.activemq.console.Main.main(Main.java:115)
> ERROR: java.lang.Exception: java.io.IOException: Failed to retrieve
> RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost; nested
> exception is:
>         java.net.ConnectException: Connection refused]
>
> How can I stop ativemq without this exception. It waits for 30 seconds and
> kills process.
>
> How do I fix it.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669150.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq clustring and JMX port chnage

Posted by chiragpujara <ch...@gmail.com>.
Thanks for reply. I had to set createConnector=true bcs I was getting
exception when I stop activemq.

Exception:

Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute stop task. Reason:
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
        java.net.ConnectException: Connection refused]
java.lang.RuntimeException: Failed to execute stop task. Reason:
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
        java.net.ConnectException: Connection refused]
        at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
        at org.apache.activemq.console.Main.main(Main.java:115)
ERROR: java.lang.Exception: java.io.IOException: Failed to retrieve
RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
        java.net.ConnectException: Connection refused]

How can I stop ativemq without this exception. It waits for 30 seconds and
kills process. 

How do I fix it.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669150.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq clustring and JMX port chnage

Posted by Paul Gale <pa...@gmail.com>.
Yeah, the "createConnector" attribute should be 'false' to prevent
ActiveMQ from creating its own connector and instead use the one
created by the JVM.

It would also help if you set each broker's 'brokerName' attribute to
something unique (defaults to 'localhost' otherwise) to differentiate
them in jconsole, perhaps?

Thanks,
Paul


On Thu, Jul 11, 2013 at 12:30 PM, Christian Posta
<ch...@gmail.com> wrote:
> Guess you're asking about local monitoring vs remote monitoring. The log
> statements shows the local connection uri. Do you have
> "createConnector=true" in your activemq config?
>
>
> On Thu, Jul 11, 2013 at 12:24 PM, Chirag Pujara <ch...@gmail.com>wrote:
>
>> Hello,
>>
>> I want to run 2 activemq instance from same machine.
>>
>> I used follwoing commands.
>>
>> bin/activemq create instance1
>> bin/activemq setup ~/.activemqrc-instance-instance1
>>
>>
>> bin/activemq create instance2
>> bin/activemq setup ~/.activemqrc-instance-instance2
>>
>> and I modified
>>
>> instace2/bin/instance2 file with following lines:
>>
>> ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8200 "
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>>
>> -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>>
>> -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>> -Dcom.sun.management.jmxremote.ssl=false"
>> #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>> -Dcom.sun.management.jmxremote"
>> #
>> export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
>>
>>
>> and
>>
>> instace1/bin/instance1 withI also tried
>>
>> ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8100 "
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>>
>> -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>>
>> -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>> -Dcom.sun.management.jmxremote.ssl=false"
>> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>> -Dcom.sun.management.jmxremote"
>>
>> export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
>>
>> I also tried
>>
>> export
>> ACTIVEMQ_SUNJMX_CONTROL="-Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://
>> 127.0.0.1:8100/jmxrmi"
>>
>> in instance1 file.
>>
>> but debug statement says "INFO | JMX consoles can connect to
>> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"
>>
>> what am I missing.
>>
>> thanks,
>> Chirag
>>
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta

Re: Activemq clustring and JMX port chnage

Posted by Christian Posta <ch...@gmail.com>.
Guess you're asking about local monitoring vs remote monitoring. The log
statements shows the local connection uri. Do you have
"createConnector=true" in your activemq config?


On Thu, Jul 11, 2013 at 12:24 PM, Chirag Pujara <ch...@gmail.com>wrote:

> Hello,
>
> I want to run 2 activemq instance from same machine.
>
> I used follwoing commands.
>
> bin/activemq create instance1
> bin/activemq setup ~/.activemqrc-instance-instance1
>
>
> bin/activemq create instance2
> bin/activemq setup ~/.activemqrc-instance-instance2
>
> and I modified
>
> instace2/bin/instance2 file with following lines:
>
> ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8200 "
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>
> -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>
> -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.ssl=false"
> #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote"
> #
> export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
>
>
> and
>
> instace1/bin/instance1 withI also tried
>
> ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8100 "
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>
> -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
>
> -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.ssl=false"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote"
>
> export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
>
> I also tried
>
> export
> ACTIVEMQ_SUNJMX_CONTROL="-Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://
> 127.0.0.1:8100/jmxrmi"
>
> in instance1 file.
>
> but debug statement says "INFO | JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"
>
> what am I missing.
>
> thanks,
> Chirag
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Activemq clustring and JMX port chnage

Posted by Chirag Pujara <ch...@gmail.com>.
Pramod,

Did you make any config change for RMI port? If not you need to.

I found this link: http://kyrill007.livejournal.com/3517.html

you can refer my config in my original post.

Also you need to make sure createConnector=false in your activemq.xml.

hope this helps.


On Thu, Jul 11, 2013 at 4:31 PM, pkorwar <pk...@yahoo.com> wrote:

> We are 2 different people from different companies.
> I am trying to setup master/slave mode using oracle jdbc, and Chirag helped
> me
> identify the config issues. However, I am still seeing the exception
>
> 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
>
> So, I thought Chirag had fixed it since he is not facing it anymore.
> Hope confusion is gone.
>
> If this question is answered, it will help many more who face this since
> the
> documentation on activemq
> is not great but the news group is!
>
> Thanks
> Pramod
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669160.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Activemq clustring and JMX port chnage

Posted by pkorwar <pk...@yahoo.com>.
We are 2 different people from different companies.
I am trying to setup master/slave mode using oracle jdbc, and Chirag helped
me
identify the config issues. However, I am still seeing the exception 

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

So, I thought Chirag had fixed it since he is not facing it anymore.
Hope confusion is gone. 

If this question is answered, it will help many more who face this since the
documentation on activemq
is not great but the news group is!

Thanks
Pramod



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669160.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq clustring and JMX port chnage

Posted by Paul Gale <pa...@gmail.com>.
I'm confused. It appears that there are two of you asking for nearly
identical advice on the same email thread.
Are you guys working together on the same problem or are these
completely unrelated?
I cannot tell whose problems I'm answering or how your respective
situations differ.

Thanks,
Paul

On Thu, Jul 11, 2013 at 5:06 PM, pkorwar <pk...@yahoo.com> wrote:
> I did that. Thanks for that.
> But I get the exception
>
>
> 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
>
> I looked for the port 1099 in activemq.xml file but it is not there. So,
> what do I need to change?
>
> Or should I do all the jmx entries you have given for changing in inst2
> file?
>
> Thanks
> Pramod
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669157.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq clustring and JMX port chnage

Posted by pkorwar <pk...@yahoo.com>.
I did that. Thanks for that. 
But I get the exception 


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

I looked for the port 1099 in activemq.xml file but it is not there. So,
what do I need to change?

Or should I do all the jmx entries you have given for changing in inst2
file?

Thanks
Pramod



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669157.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Activemq clustring and JMX port chnage

Posted by Chirag Pujara <ch...@gmail.com>.
You need to change instance2/conf/activemq.xml file and change port number
for amqp and openwire.

 <transportConnector name="openwire" uri="tcp://
0.0.0.0:61626?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600
"/>
 <transportConnector name="amqp" uri="amqp://
0.0.0.0:5673?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600
"/>

hope this helps.




On Thu, Jul 11, 2013 at 3:27 PM, pkorwar <pk...@yahoo.com> wrote:

> Chirag,
> On my linux VM, only one activemq instance starts up when I did similar
> things that you mentioned.
> The other process does not start and there is no error in data directory
> and
> there is a .pid file created
> in data directory.
>
> Did you have that problem? I am using oracle jdbc for persistence.
> What could I be doing different?
>
> Thanks
> Pramod
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669153.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Activemq clustring and JMX port chnage

Posted by pkorwar <pk...@yahoo.com>.
Chirag,
On my linux VM, only one activemq instance starts up when I did similar
things that you mentioned.
The other process does not start and there is no error in data directory and
there is a .pid file created
in data directory.

Did you have that problem? I am using oracle jdbc for persistence. 
What could I be doing different?

Thanks
Pramod



--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-clustring-and-JMX-port-chnage-tp4669144p4669153.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.