You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Zach Cox <zc...@gmail.com> on 2011/09/15 20:05:04 UTC

Remote JMX

I changed jmx.properties to bind to the public IP address of the
server and have enableJmx="true" on every <processor> in
conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
it just says:

"Connection failed: Connection refused"

Also port 9999 is open on the firewall to my IP.

Is there anything else I need to do to get JMX working?

Thanks,
Zach

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Remote JMX

Posted by Zach Cox <zc...@gmail.com>.
I couldn't get SOCKS to work. The only way I've been able to get
jconsole to connect to james jmx remotely on ec2 is by opening the ec2
firewall ports 0-65535 to my local IP address. Not the most ideal
solution, but it works for now...



On Fri, Sep 16, 2011 at 8:08 AM, Norman Maurer
<no...@googlemail.com> wrote:
> JMX through firewalls is hard..
>
>
> I most times use a socks proxy:
>
> http://simplygenius.com/2010/08/jconsole-via-socks-ssh-tunnel.html
>
> Bye,
> Norman
>
>
> 2011/9/16 Zach Cox <zc...@gmail.com>:
>> Yes this is all on EC2.  I'm trying JMX on our staging mail server
>> now, I have jmx.address set to the public hostname of the instance and
>> jmx.port=9999.  Port 9999 is open on the security group of this
>> instance to the IP address I'm trying to connect from.
>>
>> On the instance:
>>
>> $ date | ncat -l 9999
>> bind: Address already in use
>>
>> And then from my local machine:
>>
>> $ telnet ec2-11-22-33-44.compute-1.amazonaws.com 9999
>> Trying 11.22.33.44...
>> Connected to ec2-11-22-33-44.compute-1.amazonaws.com.
>> Escape character is '^]'.
>>
>> If I try jconsole again using
>> ec2-11-22-33-44.compute-1.amazonaws.com:9999, it tries to connect for
>> awhile, but then shows an error dialog that says:
>>
>> "Connection Failed: Retry?
>> The connection to ec2-11-22-33-44.compupte-1.amazonaws.com:9999 did
>> not succeed. Would you like to try again?
>> Cancel, Connect"
>>
>>
>>
>>
>> On Thu, Sep 15, 2011 at 9:07 PM, Roy Smith <ro...@gmail.com> wrote:
>>> If you're on ec2, it might be worth checking that ec2 is allowing inbound
>>> connections on that port.
>>>
>>> Try running   "date | ncat -l 9999"   and then "telnet *host* 9999"
>>>
>>> best
>>> Roy
>>>
>>>
>>>
>>>
>>> On 15 September 2011 19:09, Norman Maurer <no...@googlemail.com>wrote:
>>>
>>>> Check if its really bound via:
>>>>
>>>> # netstat -tulpen | grep 9999
>>>>
>>>> Bye,
>>>> Norman
>>>>
>>>>
>>>> 2011/9/15 Zach Cox <zc...@gmail.com>:
>>>> > I changed jmx.properties to bind to the public IP address of the
>>>> > server and have enableJmx="true" on every <processor> in
>>>> > conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
>>>> > it just says:
>>>> >
>>>> > "Connection failed: Connection refused"
>>>> >
>>>> > Also port 9999 is open on the firewall to my IP.
>>>> >
>>>> > Is there anything else I need to do to get JMX working?
>>>> >
>>>> > Thanks,
>>>> > Zach
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> > For additional commands, e-mail: server-user-help@james.apache.org
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Remote JMX

Posted by Norman Maurer <no...@googlemail.com>.
JMX through firewalls is hard..


I most times use a socks proxy:

http://simplygenius.com/2010/08/jconsole-via-socks-ssh-tunnel.html

Bye,
Norman


2011/9/16 Zach Cox <zc...@gmail.com>:
> Yes this is all on EC2.  I'm trying JMX on our staging mail server
> now, I have jmx.address set to the public hostname of the instance and
> jmx.port=9999.  Port 9999 is open on the security group of this
> instance to the IP address I'm trying to connect from.
>
> On the instance:
>
> $ date | ncat -l 9999
> bind: Address already in use
>
> And then from my local machine:
>
> $ telnet ec2-11-22-33-44.compute-1.amazonaws.com 9999
> Trying 11.22.33.44...
> Connected to ec2-11-22-33-44.compute-1.amazonaws.com.
> Escape character is '^]'.
>
> If I try jconsole again using
> ec2-11-22-33-44.compute-1.amazonaws.com:9999, it tries to connect for
> awhile, but then shows an error dialog that says:
>
> "Connection Failed: Retry?
> The connection to ec2-11-22-33-44.compupte-1.amazonaws.com:9999 did
> not succeed. Would you like to try again?
> Cancel, Connect"
>
>
>
>
> On Thu, Sep 15, 2011 at 9:07 PM, Roy Smith <ro...@gmail.com> wrote:
>> If you're on ec2, it might be worth checking that ec2 is allowing inbound
>> connections on that port.
>>
>> Try running   "date | ncat -l 9999"   and then "telnet *host* 9999"
>>
>> best
>> Roy
>>
>>
>>
>>
>> On 15 September 2011 19:09, Norman Maurer <no...@googlemail.com>wrote:
>>
>>> Check if its really bound via:
>>>
>>> # netstat -tulpen | grep 9999
>>>
>>> Bye,
>>> Norman
>>>
>>>
>>> 2011/9/15 Zach Cox <zc...@gmail.com>:
>>> > I changed jmx.properties to bind to the public IP address of the
>>> > server and have enableJmx="true" on every <processor> in
>>> > conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
>>> > it just says:
>>> >
>>> > "Connection failed: Connection refused"
>>> >
>>> > Also port 9999 is open on the firewall to my IP.
>>> >
>>> > Is there anything else I need to do to get JMX working?
>>> >
>>> > Thanks,
>>> > Zach
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> > For additional commands, e-mail: server-user-help@james.apache.org
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Remote JMX

Posted by Zach Cox <zc...@gmail.com>.
Yes this is all on EC2.  I'm trying JMX on our staging mail server
now, I have jmx.address set to the public hostname of the instance and
jmx.port=9999.  Port 9999 is open on the security group of this
instance to the IP address I'm trying to connect from.

On the instance:

$ date | ncat -l 9999
bind: Address already in use

And then from my local machine:

$ telnet ec2-11-22-33-44.compute-1.amazonaws.com 9999
Trying 11.22.33.44...
Connected to ec2-11-22-33-44.compute-1.amazonaws.com.
Escape character is '^]'.

If I try jconsole again using
ec2-11-22-33-44.compute-1.amazonaws.com:9999, it tries to connect for
awhile, but then shows an error dialog that says:

"Connection Failed: Retry?
The connection to ec2-11-22-33-44.compupte-1.amazonaws.com:9999 did
not succeed. Would you like to try again?
Cancel, Connect"




On Thu, Sep 15, 2011 at 9:07 PM, Roy Smith <ro...@gmail.com> wrote:
> If you're on ec2, it might be worth checking that ec2 is allowing inbound
> connections on that port.
>
> Try running   "date | ncat -l 9999"   and then "telnet *host* 9999"
>
> best
> Roy
>
>
>
>
> On 15 September 2011 19:09, Norman Maurer <no...@googlemail.com>wrote:
>
>> Check if its really bound via:
>>
>> # netstat -tulpen | grep 9999
>>
>> Bye,
>> Norman
>>
>>
>> 2011/9/15 Zach Cox <zc...@gmail.com>:
>> > I changed jmx.properties to bind to the public IP address of the
>> > server and have enableJmx="true" on every <processor> in
>> > conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
>> > it just says:
>> >
>> > "Connection failed: Connection refused"
>> >
>> > Also port 9999 is open on the firewall to my IP.
>> >
>> > Is there anything else I need to do to get JMX working?
>> >
>> > Thanks,
>> > Zach
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> > For additional commands, e-mail: server-user-help@james.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Remote JMX

Posted by Roy Smith <ro...@gmail.com>.
If you're on ec2, it might be worth checking that ec2 is allowing inbound
connections on that port.

Try running   "date | ncat -l 9999"   and then "telnet *host* 9999"

best
Roy




On 15 September 2011 19:09, Norman Maurer <no...@googlemail.com>wrote:

> Check if its really bound via:
>
> # netstat -tulpen | grep 9999
>
> Bye,
> Norman
>
>
> 2011/9/15 Zach Cox <zc...@gmail.com>:
> > I changed jmx.properties to bind to the public IP address of the
> > server and have enableJmx="true" on every <processor> in
> > conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
> > it just says:
> >
> > "Connection failed: Connection refused"
> >
> > Also port 9999 is open on the firewall to my IP.
> >
> > Is there anything else I need to do to get JMX working?
> >
> > Thanks,
> > Zach
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Remote JMX

Posted by Zach Cox <zc...@gmail.com>.
Still no luck geting JMX to work.

If I set jmx.address to the public IP address or *, then James will
not even start up.

If I set jmx.address to the public host name of the server, then james
will start up and netstat shows it on port 9999, but jconsole gives
this error:

"Connection failed: Connection timed out"

Any other ideas on how to get JMX working?


On Thu, Sep 15, 2011 at 1:09 PM, Norman Maurer
<no...@googlemail.com> wrote:
> Check if its really bound via:
>
> # netstat -tulpen | grep 9999
>
> Bye,
> Norman
>
>
> 2011/9/15 Zach Cox <zc...@gmail.com>:
>> I changed jmx.properties to bind to the public IP address of the
>> server and have enableJmx="true" on every <processor> in
>> conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
>> it just says:
>>
>> "Connection failed: Connection refused"
>>
>> Also port 9999 is open on the firewall to my IP.
>>
>> Is there anything else I need to do to get JMX working?
>>
>> Thanks,
>> Zach
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Remote JMX

Posted by Norman Maurer <no...@googlemail.com>.
Check if its really bound via:

# netstat -tulpen | grep 9999

Bye,
Norman


2011/9/15 Zach Cox <zc...@gmail.com>:
> I changed jmx.properties to bind to the public IP address of the
> server and have enableJmx="true" on every <processor> in
> conf/mailetcontainer.xml, but I still cannot get jconsole to connect,
> it just says:
>
> "Connection failed: Connection refused"
>
> Also port 9999 is open on the firewall to my IP.
>
> Is there anything else I need to do to get JMX working?
>
> Thanks,
> Zach
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org