You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by "william.colen@gmail.com" <wi...@gmail.com> on 2011/08/23 22:00:43 UTC

Using JMX console with EC2

Hi,

I am having an issue that maybe is out of topic, sorry.
I launched a EC2 free tier and managed to setup UIMA As there.
Now I am trying to monitor it remotely using JMX and a JConsole, but I am
failing to connect. I configured the security group properly and can see
from netstat that it is waiting for a connection.
I also tried to monitor the ActiveMQ queues without luck.

Did someone managed to monitor a remote UIMA AS instance running at Amazon
EC2? Can you please point me how?

Thank you,
William

Re: Using JMX console with EC2

Posted by "william.colen@gmail.com" <wi...@gmail.com>.
On Wed, Aug 24, 2011 at 7:57 PM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 8/24/11 8:38 PM, Richard Eckart de Castilho wrote:
>
>> I recently had trouble connecting to a JMX server running on Linux (not
>> EC2 though). It worked after I specified a "java.rmi.server.hostname"
>>
>> The parameters I used on the server side in the end were:
>>
>> -Djava.rmi.server.hostname=**192.168.0.25 -Dcom.sun.management.**jmxremote=true
>> -Dcom.sun.management.**jmxremote.port=22222 -Dcom.sun.management.**jmxremote.ssl=false
>> -Dcom.sun.management.**jmxremote.authenticate=false
>>
>> Maybe that'll fix it for you too.
>>
>
> We once had a server which was moved from our local office network
> to a data center, during the move the network interface was re-configured
> and that caused later issues with JMX.
>
> Because somehow the following item was added to its hosts file:
> 127.0.0.2       SERVERX.xxx.net SERVERX
>
> JMX tried to look up the ip address for its host name, and that was
> then resolved to 127.0.0.2.
> After removing the line it worked.
>
> Setting java.rmi.server.hostname property can help to identify such
> problems, or just get it working.
>
> Jörn
>

Thank you Jörn and Richard. I will try your suggestions and come back with
the results.

Re: Using JMX console with EC2

Posted by Jörn Kottmann <ko...@gmail.com>.
On 8/24/11 8:38 PM, Richard Eckart de Castilho wrote:
> I recently had trouble connecting to a JMX server running on Linux (not EC2 though). It worked after I specified a "java.rmi.server.hostname"
>
> The parameters I used on the server side in the end were:
>
> -Djava.rmi.server.hostname=192.168.0.25 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=22222 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
>
> Maybe that'll fix it for you too.

We once had a server which was moved from our local office network
to a data center, during the move the network interface was re-configured
and that caused later issues with JMX.

Because somehow the following item was added to its hosts file:
127.0.0.2       SERVERX.xxx.net SERVERX

JMX tried to look up the ip address for its host name, and that was
then resolved to 127.0.0.2.
After removing the line it worked.

Setting java.rmi.server.hostname property can help to identify such
problems, or just get it working.

Jörn

Re: Using JMX console with EC2

Posted by Richard Eckart de Castilho <ec...@tk.informatik.tu-darmstadt.de>.
I recently had trouble connecting to a JMX server running on Linux (not EC2 though). It worked after I specified a "java.rmi.server.hostname"

The parameters I used on the server side in the end were:

-Djava.rmi.server.hostname=192.168.0.25 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=22222 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Maybe that'll fix it for you too.

-- Richard

Am 24.08.2011 um 16:49 schrieb Jörn Kottmann:

> On 8/23/11 10:48 PM, william.colen@gmail.com wrote:
>> Yes, I followed that instructions, but it didn't work. I tried searching
>> about this issue and looks like it is related to the second port you
>> mentioned and firewall. ActiveMQ has a configuration where one can set this
>> second port, but couldn't find something similar in UIMA. Anyway even after
>> configuring the rmiServerPort in ActiveMQ it worked, so maybe can be
>> something else.
> 
> I don't know what it else it could be, you can try to start jconsole locally
> on your server and redirect the display to your work station via ssh -X 
> user@server.
> Not sure if that work with EC2. This way you can test if you can connect 
> the local host
> without any firewall interfering.
> 
> Does anyone else has some advice to debug JMX issues?
> 
> Jörn

-- 
------------------------------------------------------------------- 
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab 
FB 20 Computer Science Department      
Technische Universität Darmstadt 
Hochschulstr. 10, D-64289 Darmstadt, Germany 
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckartde@tk.informatik.tu-darmstadt.de 
www.ukp.tu-darmstadt.de 
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
------------------------------------------------------------------- 





Re: Using JMX console with EC2

Posted by Jörn Kottmann <ko...@gmail.com>.
On 8/23/11 10:48 PM, william.colen@gmail.com wrote:
> Yes, I followed that instructions, but it didn't work. I tried searching
> about this issue and looks like it is related to the second port you
> mentioned and firewall. ActiveMQ has a configuration where one can set this
> second port, but couldn't find something similar in UIMA. Anyway even after
> configuring the rmiServerPort in ActiveMQ it worked, so maybe can be
> something else.

I don't know what it else it could be, you can try to start jconsole locally
on your server and redirect the display to your work station via ssh -X 
user@server.
Not sure if that work with EC2. This way you can test if you can connect 
the local host
without any firewall interfering.

Does anyone else has some advice to debug JMX issues?

Jörn

Re: Using JMX console with EC2

Posted by "william.colen@gmail.com" <wi...@gmail.com>.
On Tue, Aug 23, 2011 at 5:15 PM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 8/23/11 10:00 PM, william.colen@gmail.com wrote:
>
>> I am having an issue that maybe is out of topic, sorry.
>> I launched a EC2 free tier and managed to setup UIMA As there.
>> Now I am trying to monitor it remotely using JMX and a JConsole, but I am
>> failing to connect. I configured the security group properly and can see
>> from netstat that it is waiting for a connection.
>> I also tried to monitor the ActiveMQ queues without luck.
>>
>> Did someone managed to monitor a remote UIMA AS instance running at Amazon
>> EC2? Can you please point me how?
>>
>
> Nice to see you over at UIMA.
>
> I never tried it on EC2, but did you follow
>
> http://uima.apache.org/d/uima-**as-2.3.1/uima_async_scaleout.**
> html#ugr.async.mt.jmx_**sampling.configuring<http://uima.apache.org/d/uima-as-2.3.1/uima_async_scaleout.html#ugr.async.mt.jmx_sampling.configuring>
>
> these instructions?
>
> As far as I know is JMX opening a second connection shortly
> after the first connection is created, this can fail for example
> when the port is blocked, or JMX is listening on the wrong network
> interface
> (e.g. only on the loop back) for it.
>
> Which error message do you get?
>
> Jörn


Hi Jörn! Nice to see you here too. Thank you for your answer.

Yes, I followed that instructions, but it didn't work. I tried searching
about this issue and looks like it is related to the second port you
mentioned and firewall. ActiveMQ has a configuration where one can set this
second port, but couldn't find something similar in UIMA. Anyway even after
configuring the rmiServerPort in ActiveMQ it worked, so maybe can be
something else.

I can not see any error message. JConsole only says that the connection
failed.

Thank you
William

Re: Using JMX console with EC2

Posted by Jörn Kottmann <ko...@gmail.com>.
On 8/23/11 10:00 PM, william.colen@gmail.com wrote:
> I am having an issue that maybe is out of topic, sorry.
> I launched a EC2 free tier and managed to setup UIMA As there.
> Now I am trying to monitor it remotely using JMX and a JConsole, but I am
> failing to connect. I configured the security group properly and can see
> from netstat that it is waiting for a connection.
> I also tried to monitor the ActiveMQ queues without luck.
>
> Did someone managed to monitor a remote UIMA AS instance running at Amazon
> EC2? Can you please point me how?

Nice to see you over at UIMA.

I never tried it on EC2, but did you follow

http://uima.apache.org/d/uima-as-2.3.1/uima_async_scaleout.html#ugr.async.mt.jmx_sampling.configuring

these instructions?

As far as I know is JMX opening a second connection shortly
after the first connection is created, this can fail for example
when the port is blocked, or JMX is listening on the wrong network interface
(e.g. only on the loop back) for it.

Which error message do you get?

Jörn