You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Christian Mueller <ch...@gmail.com> on 2010/10/20 23:26:34 UTC

[DISCUSS] changing the default JMX service uri

Hello list!

Today, I spend some hours to solve a problem we had to connect jconsole to
our ServiveMix instance which is running behind a firewall. In short, if you
not defide the RMI server port, a RANDOM port will be chosen for you. This
doesn't work if your server is behind a firewall. I found the solution here
[1].

I propose to change the property 'serviceUrl' in
$SERVICEMIX_HOME/etc/org.apache.karaf.management.cfg from
'service:jmx:rmi:///jndi/rmi://localhost:${rmiRegistryPort}/karaf-${karaf.name}'
to
'service:jmx:rmi://localhost:${rmiServerPort}/jndi/rmi://localhost:${rmiRegistryPort}/karaf-${karaf.name}'
and add the new property 'rmiServerPort' with a good default value - maybe
44444.

Because ServiceMix is (also) target for the enterprise, it should consider
this conditions.

What do you think?

[1]
http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdjou

Thank you,
Christian
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229446.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: [DISCUSS] changing the default JMX service uri

Posted by Christian Müller <ch...@gmail.com>.
Created the issue: https://issues.apache.org/jira/browse/KARAF-253
Will apply the patches for both versions later today...

Christian

Re: [DISCUSS] changing the default JMX service uri

Posted by Guillaume Nodet <gn...@gmail.com>.
That should be raised and fixed in Karaf please.

On Thu, Oct 21, 2010 at 03:14, Freeman Fang <fr...@gmail.com> wrote:

> Hi Christian,
>
> Sounds good to me.
>
> Could you please create a jira ticket and probably append a patch?
>
> Thanks
> Freeman
>
> On 2010-10-21, at 上午5:26, Christian Mueller wrote:
>
>
>> Hello list!
>>
>> Today, I spend some hours to solve a problem we had to connect jconsole to
>> our ServiveMix instance which is running behind a firewall. In short, if
>> you
>> not defide the RMI server port, a RANDOM port will be chosen for you. This
>> doesn't work if your server is behind a firewall. I found the solution
>> here
>> [1].
>>
>> I propose to change the property 'serviceUrl' in
>> $SERVICEMIX_HOME/etc/org.apache.karaf.management.cfg from
>> 'service:jmx:rmi:///jndi/rmi://localhost:${rmiRegistryPort}/karaf-${
>> karaf.name}'
>> to
>>
>> 'service:jmx:rmi://localhost:${rmiServerPort}/jndi/rmi://localhost:${rmiRegistryPort}/karaf-${
>> karaf.name}'
>> and add the new property 'rmiServerPort' with a good default value - maybe
>> 44444.
>>
>> Because ServiceMix is (also) target for the enterprise, it should consider
>> this conditions.
>>
>> What do you think?
>>
>> [1]
>>
>> http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdjou
>>
>> Thank you,
>> Christian
>> --
>> View this message in context:
>> http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229446.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
>
> --
> Freeman Fang
>
> ------------------------
> blog: http://freemanfang.blogspot.com
> twitter: http://twitter.com/freemanfang
> Open Source SOA: http://fusesource.com
> Apache Servicemix:http://servicemix.apache.org
> Apache Cxf: http://cxf.apache.org
> Apache Karaf: http://karaf.apache.org
> Apache Felix: http://felix.apache.org
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [DISCUSS] changing the default JMX service uri

Posted by Freeman Fang <fr...@gmail.com>.
Hi Christian,

Sounds good to me.

Could you please create a jira ticket and probably append a patch?

Thanks
Freeman
On 2010-10-21, at 上午5:26, Christian Mueller wrote:

>
> Hello list!
>
> Today, I spend some hours to solve a problem we had to connect  
> jconsole to
> our ServiveMix instance which is running behind a firewall. In  
> short, if you
> not defide the RMI server port, a RANDOM port will be chosen for  
> you. This
> doesn't work if your server is behind a firewall. I found the  
> solution here
> [1].
>
> I propose to change the property 'serviceUrl' in
> $SERVICEMIX_HOME/etc/org.apache.karaf.management.cfg from
> 'service:jmx:rmi:///jndi/rmi://localhost:${rmiRegistryPort}/karaf-$ 
> {karaf.name}'
> to
> 'service:jmx:rmi://localhost:${rmiServerPort}/jndi/rmi://localhost:$ 
> {rmiRegistryPort}/karaf-${karaf.name}'
> and add the new property 'rmiServerPort' with a good default value -  
> maybe
> 44444.
>
> Because ServiceMix is (also) target for the enterprise, it should  
> consider
> this conditions.
>
> What do you think?
>
> [1]
> http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdjou
>
> Thank you,
> Christian
> -- 
> View this message in context: http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229446.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Re: [DISCUSS] changing the default JMX service uri

Posted by Christian Müller <ch...@gmail.com>.
Hello Guillaume,

thanks for the hint. I attached the documentation patch to the issue.
Ioannis is working on it...

Cheers,
Christian

Re: [DISCUSS] changing the default JMX service uri

Posted by Christian Müller <ch...@gmail.com>.
Hello Ioannis!

I do not care. Chose another one, if you don't like it. :o)

Regards,
Christian

Re: [DISCUSS] changing the default JMX service uri

Posted by Ioannis Canellos <io...@gmail.com>.
Hi Christian, and thanks for the patch!

I am not very fond of port 4444 as rmi server port.
What do you think?

On Thu, Oct 21, 2010 at 10:12 AM, Guillaume Nodet <gn...@gmail.com> wrote:

> For karaf, the doc is now in subversion (it's still a bit work in
> progress):
>
>
> http://svn.apache.org/repos/asf/karaf/trunk/manual/src/main/webapp/users-guide/
> I don't think we have anything in it around JMX yet, so feel free to
> provide
> some.  The plan is to include the karaf manual into the servicemix
> documentation fwiw.
>
> On Thu, Oct 21, 2010 at 09:07, Christian Mueller <
> christian.mueller@gmail.com> wrote:
>
> >
> > Hello Łukasz!
> >
> > I attached the patches to the KARAF JIRA. I think they will apply the
> > patches.
> > There are some wiki or documentation pages (KARAF or SMX4) which I should
> > also update?
> >
> > Regards,
> > Christian
> >
> > --
> > View this message in context:
> >
> http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229947.html
> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
*Ioannis Canellos*
http://iocanel.blogspot.com

Integration Engineer @ Upstream S.A. <http://www.upstreamsystems.com>

Re: [DISCUSS] changing the default JMX service uri

Posted by Guillaume Nodet <gn...@gmail.com>.
For karaf, the doc is now in subversion (it's still a bit work in progress):

http://svn.apache.org/repos/asf/karaf/trunk/manual/src/main/webapp/users-guide/
I don't think we have anything in it around JMX yet, so feel free to provide
some.  The plan is to include the karaf manual into the servicemix
documentation fwiw.

On Thu, Oct 21, 2010 at 09:07, Christian Mueller <
christian.mueller@gmail.com> wrote:

>
> Hello Łukasz!
>
> I attached the patches to the KARAF JIRA. I think they will apply the
> patches.
> There are some wiki or documentation pages (KARAF or SMX4) which I should
> also update?
>
> Regards,
> Christian
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229947.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [DISCUSS] changing the default JMX service uri

Posted by Christian Mueller <ch...@gmail.com>.
Hello Łukasz!

I attached the patches to the KARAF JIRA. I think they will apply the
patches.
There are some wiki or documentation pages (KARAF or SMX4) which I should
also update?

Regards,
Christian

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-service-uri-tp3229446p3229947.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

RE: [DISCUSS] changing the default JMX service uri

Posted by Łukasz Dywicki <lu...@code-house.org>.
Hi Christian,
This is very good idea. Once I was looking way to avoid dynamic port
allocation and I lost this 'trick'.
If we won't put this into Karaf/SMX distribution we must have this described
in documentation (like
http://servicemix.apache.org/SMX4/remote-jmx-connection.html)

Regards,
Lukasz

-----Original Message-----
From: Christian Mueller [mailto:christian.mueller@gmail.com] 
Sent: Wednesday, October 20, 2010 11:27 PM
To: users@servicemix.apache.org
Subject: [DISCUSS] changing the default JMX service uri


Hello list!

Today, I spend some hours to solve a problem we had to connect jconsole to
our ServiveMix instance which is running behind a firewall. In short, if you
not defide the RMI server port, a RANDOM port will be chosen for you. This
doesn't work if your server is behind a firewall. I found the solution here
[1].

I propose to change the property 'serviceUrl' in
$SERVICEMIX_HOME/etc/org.apache.karaf.management.cfg from
'service:jmx:rmi:///jndi/rmi://localhost:${rmiRegistryPort}/karaf-${karaf.na
me}'
to
'service:jmx:rmi://localhost:${rmiServerPort}/jndi/rmi://localhost:${rmiRegi
stryPort}/karaf-${karaf.name}'
and add the new property 'rmiServerPort' with a good default value - maybe
44444.

Because ServiceMix is (also) target for the enterprise, it should consider
this conditions.

What do you think?

[1]
http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.h
tml#gdjou

Thank you,
Christian
-- 
View this message in context:
http://servicemix.396122.n5.nabble.com/DISCUSS-changing-the-default-JMX-serv
ice-uri-tp3229446p3229446.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.