Re: Monitoring: Enabling remote jmx access and logging

2012-04-20 Thread Eric Charles

Hi Paul,

Thx for the info regarding jmxremote.ssl, I will add it to the doc.
I have opened https://issues.apache.org/jira/browse/JAMES-1405 for the 
log level via JMX.


Thx,
Eric


On 04/19/2012 08:55 PM, paul.krasu...@thomsonreuters.com wrote:

OK, jmx issue is fixed. Looks like by default it was accepting SSL, I added 
-Dcom.sun.management.jmxremote.ssl=false to the list of start up options and 
jmx works.

Thanks,
-Paul

-Original Message-
From: Krasucki, Paul (FinancialRisk)
Sent: Thursday, April 19, 2012 2:37 PM
To: server-user@james.apache.org
Subject: RE: Monitoring: Enabling remote jmx access and logging

Eric,

Thanks for your help. My understanding of the documentation was that jmx is 
restricted to access from localhost only (because in the config file 
org.apache.james.util.RestrictingRMISocketFactory is used to implement 
RMISocketFactory).
I have replaced the JMX Server section withbean id=mbeanserver 
class=java.lang.management.ManagementFactory factory-method=getPlatformMBeanServer/
Still,  the server is listening on the port I have specified (9915) - I can telnet to it 
on my port, but when I try to connect using jconsole I am getting The connection... 
did not succeed I have included a snippet of my startup command.

I am not familiar with Spring, so I am not sure if I am on the right track. Any 
help will be appreciated. I don't see any error messages related to jmx in the 
logs.

About logging - Eric,  I will leave fixing the log adaptation to you; so far I 
was not compiling james on my machine and it may take me a while to set 
everything up and to understand the code well enough.

Thanks!
-Paul

NYCV12EMAIL02:/usr/java/default/bin # ps -afe | grep java
root  2463 30640  0 12:01 pts/100:01:02 /usr/bin/java -Xms128m -Xmx256m 
-Djava.system.class.loader=org.apache.james.container.spring.context.JamesClassLoader
 -Dcom.sun.management.jmxremote.port=9915 -Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.authenticate=false 

-Original Message-
From: Eric Charles [mailto:e...@apache.org]
Sent: Thursday, April 19, 2012 11:14 AM
To: James Users List
Subject: Re: Monitoring: Enabling remote jmx access and logging

Hi Paul,

jmx.properties is the place to configure the MBean server (hostname and port).
http://james.apache.org/server/3/config-system.html

You can do it via JMX console
- go to org.apache.jame, container, Operations
- you will have setLogLevel(String component, String loglevel)... which has a 
bug

I will update the documentation with this 
http://james.apache.org/server/3/monitor-logging.html

...and fix the bug (related to log4j and slf4j adaptation (unless you tell me 
you would like to fix it, it's in 
https://svn.apache.org/repos/asf/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java

Thx,

Eric

On 04/19/2012 03:57 PM, paul.krasu...@thomsonreuters.com wrote:

Two questions:

1.   How to enable remote jmx access to james?

2.   I need to be able to set up different log levels (and be able to 
change them dynamically e.g using jmx ). Is there a way to do that with the log 
provided by MailetContext?
Thanks!
-Paul

This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.


--
eric | http://about.echarles.net | @echarles

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


This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

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


This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

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



--
eric | http://about.echarles.net | @echarles

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



Monitoring: Enabling remote jmx access and logging

2012-04-19 Thread Paul.Krasucki
Two questions:

1.   How to enable remote jmx access to james?

2.   I need to be able to set up different log levels (and be able to 
change them dynamically e.g using jmx ). Is there a way to do that with the log 
provided by MailetContext?
Thanks!
-Paul

This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

Re: Monitoring: Enabling remote jmx access and logging

2012-04-19 Thread Eric Charles

Hi Paul,

jmx.properties is the place to configure the MBean server (hostname and 
port).

http://james.apache.org/server/3/config-system.html

You can do it via JMX console
- go to org.apache.jame, container, Operations
- you will have setLogLevel(String component, String loglevel)... which 
has a bug


I will update the documentation with this
http://james.apache.org/server/3/monitor-logging.html

...and fix the bug (related to log4j and slf4j adaptation (unless you 
tell me you would like to fix it, it's in 
https://svn.apache.org/repos/asf/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java


Thx,

Eric

On 04/19/2012 03:57 PM, paul.krasu...@thomsonreuters.com wrote:

Two questions:

1.   How to enable remote jmx access to james?

2.   I need to be able to set up different log levels (and be able to 
change them dynamically e.g using jmx ). Is there a way to do that with the log 
provided by MailetContext?
Thanks!
-Paul

This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.


--
eric | http://about.echarles.net | @echarles

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



RE: Monitoring: Enabling remote jmx access and logging

2012-04-19 Thread Paul.Krasucki
Eric,

Thanks for your help. My understanding of the documentation was that jmx is 
restricted to access from localhost only (because in the config file 
org.apache.james.util.RestrictingRMISocketFactory is used to implement 
RMISocketFactory).
I have replaced the JMX Server section with 
 bean id=mbeanserver class=java.lang.management.ManagementFactory 
factory-method=getPlatformMBeanServer/
Still,  the server is listening on the port I have specified (9915) - I can 
telnet to it on my port, but when I try to connect using jconsole I am getting 
The connection... did not succeed I have included a snippet of my startup 
command.

I am not familiar with Spring, so I am not sure if I am on the right track. Any 
help will be appreciated. I don't see any error messages related to jmx in the 
logs.

About logging - Eric,  I will leave fixing the log adaptation to you; so far I 
was not compiling james on my machine and it may take me a while to set 
everything up and to understand the code well enough. 

Thanks!
-Paul

NYCV12EMAIL02:/usr/java/default/bin # ps -afe | grep java
root  2463 30640  0 12:01 pts/100:01:02 /usr/bin/java -Xms128m -Xmx256m 
-Djava.system.class.loader=org.apache.james.container.spring.context.JamesClassLoader
 -Dcom.sun.management.jmxremote.port=9915 -Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.authenticate=false 

-Original Message-
From: Eric Charles [mailto:e...@apache.org] 
Sent: Thursday, April 19, 2012 11:14 AM
To: James Users List
Subject: Re: Monitoring: Enabling remote jmx access and logging

Hi Paul,

jmx.properties is the place to configure the MBean server (hostname and port).
http://james.apache.org/server/3/config-system.html

You can do it via JMX console
- go to org.apache.jame, container, Operations
- you will have setLogLevel(String component, String loglevel)... which has a 
bug

I will update the documentation with this 
http://james.apache.org/server/3/monitor-logging.html

...and fix the bug (related to log4j and slf4j adaptation (unless you tell me 
you would like to fix it, it's in 
https://svn.apache.org/repos/asf/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java

Thx,

Eric

On 04/19/2012 03:57 PM, paul.krasu...@thomsonreuters.com wrote:
 Two questions:

 1.   How to enable remote jmx access to james?

 2.   I need to be able to set up different log levels (and be able to 
 change them dynamically e.g using jmx ). Is there a way to do that with the 
 log provided by MailetContext?
 Thanks!
 -Paul

 This email was sent to you by Thomson Reuters, the global news and 
 information company. Any views expressed in this message are those of the 
 individual sender, except where the sender specifically states them to be the 
 views of Thomson Reuters.

--
eric | http://about.echarles.net | @echarles

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


This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

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



RE: Monitoring: Enabling remote jmx access and logging

2012-04-19 Thread Paul.Krasucki
OK, jmx issue is fixed. Looks like by default it was accepting SSL, I added 
-Dcom.sun.management.jmxremote.ssl=false to the list of start up options and 
jmx works.

Thanks,
-Paul

-Original Message-
From: Krasucki, Paul (FinancialRisk) 
Sent: Thursday, April 19, 2012 2:37 PM
To: server-user@james.apache.org
Subject: RE: Monitoring: Enabling remote jmx access and logging

Eric,

Thanks for your help. My understanding of the documentation was that jmx is 
restricted to access from localhost only (because in the config file 
org.apache.james.util.RestrictingRMISocketFactory is used to implement 
RMISocketFactory).
I have replaced the JMX Server section with  bean id=mbeanserver 
class=java.lang.management.ManagementFactory 
factory-method=getPlatformMBeanServer/
Still,  the server is listening on the port I have specified (9915) - I can 
telnet to it on my port, but when I try to connect using jconsole I am getting 
The connection... did not succeed I have included a snippet of my startup 
command.

I am not familiar with Spring, so I am not sure if I am on the right track. Any 
help will be appreciated. I don't see any error messages related to jmx in the 
logs.

About logging - Eric,  I will leave fixing the log adaptation to you; so far I 
was not compiling james on my machine and it may take me a while to set 
everything up and to understand the code well enough. 

Thanks!
-Paul

NYCV12EMAIL02:/usr/java/default/bin # ps -afe | grep java
root  2463 30640  0 12:01 pts/100:01:02 /usr/bin/java -Xms128m -Xmx256m 
-Djava.system.class.loader=org.apache.james.container.spring.context.JamesClassLoader
 -Dcom.sun.management.jmxremote.port=9915 -Dcom.sun.management.jmxremote=true 
-Dcom.sun.management.jmxremote.authenticate=false 

-Original Message-
From: Eric Charles [mailto:e...@apache.org]
Sent: Thursday, April 19, 2012 11:14 AM
To: James Users List
Subject: Re: Monitoring: Enabling remote jmx access and logging

Hi Paul,

jmx.properties is the place to configure the MBean server (hostname and port).
http://james.apache.org/server/3/config-system.html

You can do it via JMX console
- go to org.apache.jame, container, Operations
- you will have setLogLevel(String component, String loglevel)... which has a 
bug

I will update the documentation with this 
http://james.apache.org/server/3/monitor-logging.html

...and fix the bug (related to log4j and slf4j adaptation (unless you tell me 
you would like to fix it, it's in 
https://svn.apache.org/repos/asf/james/server/trunk/lifecycle-spring/src/main/java/org/apache/james/container/spring/lifecycle/LogProviderImpl.java

Thx,

Eric

On 04/19/2012 03:57 PM, paul.krasu...@thomsonreuters.com wrote:
 Two questions:

 1.   How to enable remote jmx access to james?

 2.   I need to be able to set up different log levels (and be able to 
 change them dynamically e.g using jmx ). Is there a way to do that with the 
 log provided by MailetContext?
 Thanks!
 -Paul

 This email was sent to you by Thomson Reuters, the global news and 
 information company. Any views expressed in this message are those of the 
 individual sender, except where the sender specifically states them to be the 
 views of Thomson Reuters.

--
eric | http://about.echarles.net | @echarles

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


This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

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


This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

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