Re: JMX Access?

2019-09-26 Thread Tellier Benoit
Hi Jerry,

I'm very happy to see the community is able to make business on top of
James! That's great!

As James seems to be a non negligible part of your business, there's
things you can do not to be left behind with tight deadline in the future:

 - Join server-dev mailing list:
   - You will see vote of releases, beta-test them, and ensure they do
not break your current deployment / migration will be doable.

This is especially important for the Spring product we don't use at
Linagora.

Also, I encourage you to take part in the voting process.

 - Maybe dedicate a bit of time to James maintenance.

I'm sure committers will be delighted of showing you where and how to
fix your issues and make James a better product.

>  But when I open the zip and set all log levels to DEBUG and all the
log files are empty, I would hope someone on the developer/contributor
team would be willing to take a look and see if I'm right.

I never doubted you are right.

>  It's the total silence that is difficult when my source of income is
on the line.

You received several answers on that very topic, that's not a total silence.

I wish you the best for your deadline.

I answered your log4j issue in the dedicated thread.

Regards,

Benoit

On 26/09/2019 13:11, Jerry Malcolm wrote:
> I apologize that my posts have appeared course. I'm very frustrated and
> nervous about my client base.  I committed my business to James around
> 2004, I believe.  I upgraded from v2 to v3b5 in 2014 with relatively
> minor issues.  When I started what I thought would be an even less
> stressful migration in early August to 3.3.0, I was not prepared for
> nearly 2 months of effort and still no way of knowing how to get 3.3.0
> to work.  The date is fast approaching that my current server is going
> away.  And if I don't have 3.3.0 up and running, I get to tell a whole
> lot of people that they're not going to be getting mail and my business
> folds. This is pretty scary.  I completely understand this is
> voluntary.  I simply would like some people more knowledgeable about
> James than me to dialog about whether problems are actually release
> content problems or user error.  I can handle user errors.  I am far
> from knowledgeable about everything in James, and I make mistakes.  But
> when I open the zip and set all log levels to DEBUG and all the log
> files are empty, I would hope someone on the developer/contributor team
> would be willing to take a look and see if I'm right.  If I'm right,
> then a suggested workaround would be huge.  If I'm wrong, someone set me
> straight. Again, I'm sorry for the frustrated posts.  It's the total
> silence that is difficult when my source of income is on the line.
> 
> I'm willing to pay for support.  Please contact me privately and let me
> know the cost would be to find out why I can't see any log output for
> any loggers other than james-server.
> 
> On 9/26/2019 12:35 AM, Tellier Benoit wrote:
>> Hi Jerry
>> Well,
>>
>>   1. You are asking sometime hard questions that people can't answers
>> without significant work overhead.
>>
>>   2. This is OpenSource. This is Free. This is 'best effort' given a
>> limited time range.
>>
>> Please read again carefully the Apache foundation mailing list guide
>> lines: https://www.apache.org/foundation/policies/conduct.html
>>
>> I personally do not find the style of your previous email being
>> 'friendly' with the work contributors do. And you are also not patient
>> with the answers the community provides you for free.
>>
>> I'd like to mention that some community member will by the way be very
>> happy to offer a paid support (for example me as part of Linagora
>> company) might you be unhappy with the support provided as part of the
>> community.
>>
>> And for your information, yes, we are using James 3.3.0.
>>
>> I will answer your JMX question in an other email.
>>
>> Best regards
>>
>> On 26/09/2019 12:03, Jerry Malcolm wrote:
>>> I figure if I keep asking questions, sooner or later I'm going to hit
>>> one that SOMEBODY can help me withThe issues keep backing up.  And
>>> my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
>>> the only one having these out-of-the-box problems?  This migration has
>>> been an absolute nightmare.
>>>
>>> I still have absolutely NO way to see any logging data for the mailets,
>>> smtp, imap, etc logs.   So I decided to use JMX to see if there were any
>>> MBeans exposed that might help me figure out why there is no logging.
>>> And, of course with the way everything else has gone, I can't connect to
>>> James JMX.  JConsole will not connect.  It works fine

Re: JMX Access?

2019-09-26 Thread Saibabu Vallurupalli
 those two parameters already specified in the
> JAVA command.  So I don't think that could be what's wrong.
>
> Any idea what is causing the exception?
>
> And just out of curiosity, if you are on James 3.3.0, do any of the log
> files in the logs directory have any data in them?  Even out of the box,
> with every log level set to DEBUG, for me the only file that doesn't
> have zero bytes is james-server-log.  My bigger problem than JMX is that
> all of the logging data is being discarded.
>
> Jerry
>
> On 9/26/2019 12:21 AM, Saibabu Vallurupalli wrote:
> > Hi Jerry,
> >
> > you need to add JVM options before starting the James server. See the
> > two parameters below:
> > Edit james.sh in vi editor or whichever you are comfortable with and
> > then add  "-Dcom.sun.management.jmxremote=true" and
> > "-Dcom.sun.management.jmxremote.authenticate=false", see below the way
> > how I did.
> >
> > case "$1" in
> >  start)
> >  echo Starting James
> >  nohup java -classpath
> > "james-server-jpa-guice.jar:james-server-jpa-guice.lib/*:james-server-jpa-guice.lib"
> > -javaagent:james-server-jpa-guice.lib/openjpa-3.0.0.jar
> > -Dcom.sun.management.jmxremote=true
> > -Dcom.sun.management.jmxremote.authenticate=false
> > -Dlogback.configurationFile=conf/logback.xml -Dworking.directory=.
> > org.apache.james.JPAJamesServerMain > /dev/null 2>&1  &
> >
> > Do the same for restart) option too just in case if you restart you
> > may loose JMX option.
> >
> > Then the JMX gets enabled. The script has issues, these parameters
> > should be available by default.
> >
> > Hope this helps and you can meet your deadline now :-)
> >
> > Let me know how it goes.
> >
> > Thanks,
> > Sai
> >
> > On Thu, Sep 26, 2019 at 1:11 AM Jerry Malcolm  
> > wrote:
> >> I figure if I keep asking questions, sooner or later I'm going to hit
> >> one that SOMEBODY can help me with  The issues keep backing up.  And
> >> my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
> >> the only one having these out-of-the-box problems?  This migration has
> >> been an absolute nightmare.
> >>
> >> I still have absolutely NO way to see any logging data for the mailets,
> >> smtp, imap, etc logs.   So I decided to use JMX to see if there were any
> >> MBeans exposed that might help me figure out why there is no logging.
> >> And, of course with the way everything else has gone, I can't connect to
> >> James JMX.  JConsole will not connect.  It works fine accessing Tomcat
> >> using the same approach. But nothing with James.  I'm using a PuTTY
> >> tunnel directly to the Amazon EC2 instance.
> >>
> >> I went back to an absolute pristine install of JAMES 3.3.0 right out of
> >> the downloaded zip file.  I made absolutely zero changes to the
> >> install/config.  Just unpack and run.  No JMX access with out-of-the-box
> >> James either.  JConsole hangs for about a minute, and gives me an error
> >> that it can't connect.
> >>
> >> Then I made one change to log4j.properties and bumped everything to
> >> DEBUG.  Thankfully, the one log file that actually works in this release
> >> is James-server.log.  I see the following error when James is apparently
> >> starting up JMX.  The 172.31 IP address it's failing on is my EC2
> >> public IP.  But the jmx.properties file says to connect to
> >> 127.0.0.1:.  I never explicitly configured the 172.31... address
> >> anywhere in James.
> >>
> >> What's causing this:
> >>
> >> INFO  04:29:47,638 |
> >> org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
> >> RMI registry at port '', using custom socket factory
> >> DEBUG 04:29:47,642 |
> >> org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
> >> access threw exception
> >> java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
> >> nested exception is:
> >>   java.net.ConnectException: Connection refused (Connection 
> >> refused)
> >>   at
> >> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
> >>   at
> >> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
> >>   at
> >> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
> >>   at sun.rmi.server.Unic

Re: JMX Access?

2019-09-26 Thread Jerry Malcolm
The way I understand tunneling, with SSH tunneling, I am technically 
connecting locally.   I use PuTTY on my local machine.  But I set up a 
secure tunnel to port  on the remote host.  When I connect to 
localhost: on my machine it's the same as connecting to 
localhost: on the target machine.  As long as the tunnel is secure 
(SSL), there's no outside access to JMX.   At least that's the way the 
videos explain it for accessing remote Tomcat via a PuTTY tunnel.  And 
Tomcat access works.   Is the exception in James startup log stating 
that the connection is refused ok to ignore.  Seems that's not a good 
thing.


On 9/26/2019 12:40 AM, Tellier Benoit wrote:

Hi Jerry,

You need to be aware James restrict JMX access to localhost.

As you know, the James command line is currently using JMX.

JMX is known-to-be unsecure: read
https://www.cvedetails.com/cve/CVE-2017-12628/ for instance. Exposing
JMX only to localHost is a mitigation.

Could this be the root of your JMX problem?

On 26/09/2019 12:03, Jerry Malcolm wrote:

[...]> So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
     java.net.ConnectException: Connection refused (Connection refused)
     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
     at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
     at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
     at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

     at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

     at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)

     at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:

Re: JMX Access?

2019-09-26 Thread Jerry Malcolm
I apologize that my posts have appeared course. I'm very frustrated and 
nervous about my client base.  I committed my business to James around 
2004, I believe.  I upgraded from v2 to v3b5 in 2014 with relatively 
minor issues.  When I started what I thought would be an even less 
stressful migration in early August to 3.3.0, I was not prepared for 
nearly 2 months of effort and still no way of knowing how to get 3.3.0 
to work.  The date is fast approaching that my current server is going 
away.  And if I don't have 3.3.0 up and running, I get to tell a whole 
lot of people that they're not going to be getting mail and my business 
folds. This is pretty scary.  I completely understand this is 
voluntary.  I simply would like some people more knowledgeable about 
James than me to dialog about whether problems are actually release 
content problems or user error.  I can handle user errors.  I am far 
from knowledgeable about everything in James, and I make mistakes.  But 
when I open the zip and set all log levels to DEBUG and all the log 
files are empty, I would hope someone on the developer/contributor team 
would be willing to take a look and see if I'm right.  If I'm right, 
then a suggested workaround would be huge.  If I'm wrong, someone set me 
straight. Again, I'm sorry for the frustrated posts.  It's the total 
silence that is difficult when my source of income is on the line.


I'm willing to pay for support.  Please contact me privately and let me 
know the cost would be to find out why I can't see any log output for 
any loggers other than james-server.


On 9/26/2019 12:35 AM, Tellier Benoit wrote:

Hi Jerry
Well,

  1. You are asking sometime hard questions that people can't answers
without significant work overhead.

  2. This is OpenSource. This is Free. This is 'best effort' given a
limited time range.

Please read again carefully the Apache foundation mailing list guide
lines: https://www.apache.org/foundation/policies/conduct.html

I personally do not find the style of your previous email being
'friendly' with the work contributors do. And you are also not patient
with the answers the community provides you for free.

I'd like to mention that some community member will by the way be very
happy to offer a paid support (for example me as part of Linagora
company) might you be unhappy with the support provided as part of the
community.

And for your information, yes, we are using James 3.3.0.

I will answer your JMX question in an other email.

Best regards

On 26/09/2019 12:03, Jerry Malcolm wrote:

I figure if I keep asking questions, sooner or later I'm going to hit
one that SOMEBODY can help me withThe issues keep backing up.  And
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
the only one having these out-of-the-box problems?  This migration has
been an absolute nightmare.

I still have absolutely NO way to see any logging data for the mailets,
smtp, imap, etc logs.   So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
     java.net.ConnectException: Connection refused (Connection refused)
     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
     at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
     at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
     at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85

Re: JMX Access?

2019-09-25 Thread Tellier Benoit
Thanks for the very instructive email.

Wouldn't you mind stating in
http://james.apache.org/server/monitor-jmx.html that these system
properties might be setted for a remote JMX usage?

https://github.com/apache/james-project/blob/master/src/site/xdoc/server/monitor-jmx.xml
is the corresponding source file.

And by the way, as I stated in a previous email, there is very good
reasons not to enable JMX remotely, namely
https://www.cvedetails.com/cve/CVE-2017-12628/ ... We need to warn about
security implication of remote JMX usage as well.

Best regards,

Benoit Tellier

On 26/09/2019 12:21, Saibabu Vallurupalli wrote:
> Hi Jerry,
> 
> you need to add JVM options before starting the James server. See the
> two parameters below:
> Edit james.sh in vi editor or whichever you are comfortable with and
> then add  "-Dcom.sun.management.jmxremote=true" and
> "-Dcom.sun.management.jmxremote.authenticate=false", see below the way
> how I did.
> 
> case "$1" in
> start)
> echo Starting James
> nohup java -classpath
> "james-server-jpa-guice.jar:james-server-jpa-guice.lib/*:james-server-jpa-guice.lib"
> -javaagent:james-server-jpa-guice.lib/openjpa-3.0.0.jar
> -Dcom.sun.management.jmxremote=true
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dlogback.configurationFile=conf/logback.xml -Dworking.directory=.
> org.apache.james.JPAJamesServerMain > /dev/null 2>&1  &
> 
> Do the same for restart) option too just in case if you restart you
> may loose JMX option.
> 
> Then the JMX gets enabled. The script has issues, these parameters
> should be available by default.
> 
> Hope this helps and you can meet your deadline now :-)
> 
> Let me know how it goes.
> 
> Thanks,
> Sai
> 
> On Thu, Sep 26, 2019 at 1:11 AM Jerry Malcolm  wrote:
>>
>> I figure if I keep asking questions, sooner or later I'm going to hit
>> one that SOMEBODY can help me with  The issues keep backing up.  And
>> my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
>> the only one having these out-of-the-box problems?  This migration has
>> been an absolute nightmare.
>>
>> I still have absolutely NO way to see any logging data for the mailets,
>> smtp, imap, etc logs.   So I decided to use JMX to see if there were any
>> MBeans exposed that might help me figure out why there is no logging.
>> And, of course with the way everything else has gone, I can't connect to
>> James JMX.  JConsole will not connect.  It works fine accessing Tomcat
>> using the same approach. But nothing with James.  I'm using a PuTTY
>> tunnel directly to the Amazon EC2 instance.
>>
>> I went back to an absolute pristine install of JAMES 3.3.0 right out of
>> the downloaded zip file.  I made absolutely zero changes to the
>> install/config.  Just unpack and run.  No JMX access with out-of-the-box
>> James either.  JConsole hangs for about a minute, and gives me an error
>> that it can't connect.
>>
>> Then I made one change to log4j.properties and bumped everything to
>> DEBUG.  Thankfully, the one log file that actually works in this release
>> is James-server.log.  I see the following error when James is apparently
>> starting up JMX.  The 172.31 IP address it's failing on is my EC2
>> public IP.  But the jmx.properties file says to connect to
>> 127.0.0.1:.  I never explicitly configured the 172.31... address
>> anywhere in James.
>>
>> What's causing this:
>>
>> INFO  04:29:47,638 |
>> org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
>> RMI registry at port '', using custom socket factory
>> DEBUG 04:29:47,642 |
>> org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
>> access threw exception
>> java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
>> nested exception is:
>>  java.net.ConnectException: Connection refused (Connection refused)
>>  at
>> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
>>  at
>> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>>  at
>> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>>  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
>>  at
>> sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
>>  at
>> org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
>>  at
>> org.springframework.remoting.

Re: JMX Access?

2019-09-25 Thread Tellier Benoit
Hi Jerry,

You need to be aware James restrict JMX access to localhost.

As you know, the James command line is currently using JMX.

JMX is known-to-be unsecure: read
https://www.cvedetails.com/cve/CVE-2017-12628/ for instance. Exposing
JMX only to localHost is a mitigation.

Could this be the root of your JMX problem?

On 26/09/2019 12:03, Jerry Malcolm wrote:
> [...]> So I decided to use JMX to see if there were any
> MBeans exposed that might help me figure out why there is no logging.  
> And, of course with the way everything else has gone, I can't connect to
> James JMX.  JConsole will not connect.  It works fine accessing Tomcat
> using the same approach. But nothing with James.  I'm using a PuTTY
> tunnel directly to the Amazon EC2 instance.
> 
> I went back to an absolute pristine install of JAMES 3.3.0 right out of
> the downloaded zip file.  I made absolutely zero changes to the
> install/config.  Just unpack and run.  No JMX access with out-of-the-box
> James either.  JConsole hangs for about a minute, and gives me an error
> that it can't connect.
> 
> Then I made one change to log4j.properties and bumped everything to
> DEBUG.  Thankfully, the one log file that actually works in this release
> is James-server.log.  I see the following error when James is apparently
> starting up JMX.  The 172.31 IP address it's failing on is my EC2
> public IP.  But the jmx.properties file says to connect to
> 127.0.0.1:.  I never explicitly configured the 172.31... address
> anywhere in James.
> 
> What's causing this:
> 
> INFO  04:29:47,638 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
> RMI registry at port '', using custom socket factory
> DEBUG 04:29:47,642 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
> access threw exception
> java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
> nested exception is:
>     java.net.ConnectException: Connection refused (Connection refused)
>     at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
>     at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>     at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
>     at
> sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
> 
>     at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
> 
>     at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:620)
> 
>     at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
> 
>     at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractAppl

Re: JMX Access?

2019-09-25 Thread Tellier Benoit
Hi Jerry
Well,

 1. You are asking sometime hard questions that people can't answers
without significant work overhead.

 2. This is OpenSource. This is Free. This is 'best effort' given a
limited time range.

Please read again carefully the Apache foundation mailing list guide
lines: https://www.apache.org/foundation/policies/conduct.html

I personally do not find the style of your previous email being
'friendly' with the work contributors do. And you are also not patient
with the answers the community provides you for free.

I'd like to mention that some community member will by the way be very
happy to offer a paid support (for example me as part of Linagora
company) might you be unhappy with the support provided as part of the
community.

And for your information, yes, we are using James 3.3.0.

I will answer your JMX question in an other email.

Best regards

On 26/09/2019 12:03, Jerry Malcolm wrote:
> I figure if I keep asking questions, sooner or later I'm going to hit
> one that SOMEBODY can help me withThe issues keep backing up.  And
> my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
> the only one having these out-of-the-box problems?  This migration has
> been an absolute nightmare.
> 
> I still have absolutely NO way to see any logging data for the mailets,
> smtp, imap, etc logs.   So I decided to use JMX to see if there were any
> MBeans exposed that might help me figure out why there is no logging.  
> And, of course with the way everything else has gone, I can't connect to
> James JMX.  JConsole will not connect.  It works fine accessing Tomcat
> using the same approach. But nothing with James.  I'm using a PuTTY
> tunnel directly to the Amazon EC2 instance.
> 
> I went back to an absolute pristine install of JAMES 3.3.0 right out of
> the downloaded zip file.  I made absolutely zero changes to the
> install/config.  Just unpack and run.  No JMX access with out-of-the-box
> James either.  JConsole hangs for about a minute, and gives me an error
> that it can't connect.
> 
> Then I made one change to log4j.properties and bumped everything to
> DEBUG.  Thankfully, the one log file that actually works in this release
> is James-server.log.  I see the following error when James is apparently
> starting up JMX.  The 172.31 IP address it's failing on is my EC2
> public IP.  But the jmx.properties file says to connect to
> 127.0.0.1:.  I never explicitly configured the 172.31... address
> anywhere in James.
> 
> What's causing this:
> 
> INFO  04:29:47,638 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
> RMI registry at port '', using custom socket factory
> DEBUG 04:29:47,642 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
> access threw exception
> java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
> nested exception is:
>     java.net.ConnectException: Connection refused (Connection refused)
>     at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
>     at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>     at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
>     at
> sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
> 
>     at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> 
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> 
>     at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
> 
>     at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
> 

Re: JMX Access?

2019-09-25 Thread Jerry Malcolm

Sai,

Thanks for the quick response.  But in the latest 3.3.0 download, there 
is not a james.sh file.  I've been using run.sh.  There is a 
james-cli.sh.  But I have not been using it.  But both the run.sh and 
james-cli.sh files have those two parameters already specified in the 
JAVA command.  So I don't think that could be what's wrong.


Any idea what is causing the exception?

And just out of curiosity, if you are on James 3.3.0, do any of the log 
files in the logs directory have any data in them?  Even out of the box, 
with every log level set to DEBUG, for me the only file that doesn't 
have zero bytes is james-server-log.  My bigger problem than JMX is that 
all of the logging data is being discarded.


Jerry

On 9/26/2019 12:21 AM, Saibabu Vallurupalli wrote:

Hi Jerry,

you need to add JVM options before starting the James server. See the
two parameters below:
Edit james.sh in vi editor or whichever you are comfortable with and
then add  "-Dcom.sun.management.jmxremote=true" and
"-Dcom.sun.management.jmxremote.authenticate=false", see below the way
how I did.

case "$1" in
 start)
 echo Starting James
 nohup java -classpath
"james-server-jpa-guice.jar:james-server-jpa-guice.lib/*:james-server-jpa-guice.lib"
-javaagent:james-server-jpa-guice.lib/openjpa-3.0.0.jar
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dlogback.configurationFile=conf/logback.xml -Dworking.directory=.
org.apache.james.JPAJamesServerMain > /dev/null 2>&1  &

Do the same for restart) option too just in case if you restart you
may loose JMX option.

Then the JMX gets enabled. The script has issues, these parameters
should be available by default.

Hope this helps and you can meet your deadline now :-)

Let me know how it goes.

Thanks,
Sai

On Thu, Sep 26, 2019 at 1:11 AM Jerry Malcolm  wrote:

I figure if I keep asking questions, sooner or later I'm going to hit
one that SOMEBODY can help me with  The issues keep backing up.  And
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
the only one having these out-of-the-box problems?  This migration has
been an absolute nightmare.

I still have absolutely NO way to see any logging data for the mailets,
smtp, imap, etc logs.   So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
  java.net.ConnectException: Connection refused (Connection refused)
  at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
  at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
  at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
  at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.

Re: JMX Access?

2019-09-25 Thread Saibabu Vallurupalli
Hi Jerry,

you need to add JVM options before starting the James server. See the
two parameters below:
Edit james.sh in vi editor or whichever you are comfortable with and
then add  "-Dcom.sun.management.jmxremote=true" and
"-Dcom.sun.management.jmxremote.authenticate=false", see below the way
how I did.

case "$1" in
start)
echo Starting James
nohup java -classpath
"james-server-jpa-guice.jar:james-server-jpa-guice.lib/*:james-server-jpa-guice.lib"
-javaagent:james-server-jpa-guice.lib/openjpa-3.0.0.jar
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dlogback.configurationFile=conf/logback.xml -Dworking.directory=.
org.apache.james.JPAJamesServerMain > /dev/null 2>&1  &

Do the same for restart) option too just in case if you restart you
may loose JMX option.

Then the JMX gets enabled. The script has issues, these parameters
should be available by default.

Hope this helps and you can meet your deadline now :-)

Let me know how it goes.

Thanks,
Sai

On Thu, Sep 26, 2019 at 1:11 AM Jerry Malcolm  wrote:
>
> I figure if I keep asking questions, sooner or later I'm going to hit
> one that SOMEBODY can help me with  The issues keep backing up.  And
> my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
> the only one having these out-of-the-box problems?  This migration has
> been an absolute nightmare.
>
> I still have absolutely NO way to see any logging data for the mailets,
> smtp, imap, etc logs.   So I decided to use JMX to see if there were any
> MBeans exposed that might help me figure out why there is no logging.
> And, of course with the way everything else has gone, I can't connect to
> James JMX.  JConsole will not connect.  It works fine accessing Tomcat
> using the same approach. But nothing with James.  I'm using a PuTTY
> tunnel directly to the Amazon EC2 instance.
>
> I went back to an absolute pristine install of JAMES 3.3.0 right out of
> the downloaded zip file.  I made absolutely zero changes to the
> install/config.  Just unpack and run.  No JMX access with out-of-the-box
> James either.  JConsole hangs for about a minute, and gives me an error
> that it can't connect.
>
> Then I made one change to log4j.properties and bumped everything to
> DEBUG.  Thankfully, the one log file that actually works in this release
> is James-server.log.  I see the following error when James is apparently
> starting up JMX.  The 172.31 IP address it's failing on is my EC2
> public IP.  But the jmx.properties file says to connect to
> 127.0.0.1:.  I never explicitly configured the 172.31... address
> anywhere in James.
>
> What's causing this:
>
> INFO  04:29:47,638 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
> RMI registry at port '', using custom socket factory
> DEBUG 04:29:47,642 |
> org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
> access threw exception
> java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
> nested exception is:
>  java.net.ConnectException: Connection refused (Connection refused)
>  at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
>  at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
>  at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
>  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
>  at
> sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
>  at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
>  at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
>  at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
>  at
> org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
>  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
>  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
>  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>  at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

JMX Access?

2019-09-25 Thread Jerry Malcolm
I figure if I keep asking questions, sooner or later I'm going to hit 
one that SOMEBODY can help me with  The issues keep backing up.  And 
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm 
the only one having these out-of-the-box problems?  This migration has 
been an absolute nightmare.


I still have absolutely NO way to see any logging data for the mailets, 
smtp, imap, etc logs.   So I decided to use JMX to see if there were any 
MBeans exposed that might help me figure out why there is no logging.   
And, of course with the way everything else has gone, I can't connect to 
James JMX.  JConsole will not connect.  It works fine accessing Tomcat 
using the same approach. But nothing with James.  I'm using a PuTTY 
tunnel directly to the Amazon EC2 instance.


I went back to an absolute pristine install of JAMES 3.3.0 right out of 
the downloaded zip file.  I made absolutely zero changes to the 
install/config.  Just unpack and run.  No JMX access with out-of-the-box 
James either.  JConsole hangs for about a minute, and gives me an error 
that it can't connect.


Then I made one change to log4j.properties and bumped everything to 
DEBUG.  Thankfully, the one log file that actually works in this release 
is James-server.log.  I see the following error when James is apparently 
starting up JMX.  The 172.31 IP address it's failing on is my EC2 
public IP.  But the jmx.properties file says to connect to 
127.0.0.1:.  I never explicitly configured the 172.31... address 
anywhere in James.


What's causing this:

INFO  04:29:47,638 | 
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for 
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 | 
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry 
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236; 
nested exception is:

    java.net.ConnectException: Connection refused (Connection refused)
    at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at 
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)

    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
    at 
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:620)
    at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
    at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
    at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
    at 
org.apache.james.container.spring.context.JamesServerApplicationContext.(JamesServerApplicationContext.java:40)
    at 
org.apache.james.app.spring.JamesAppSpringMain.init

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