SpacyNG / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

Possible connection leak in log4j #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start Tomcat service (with PWM deployed)
2. Stop Tomcat service
3. Look in catalina.log : you will find SEVERE errors

Do you have any idea why we get this error / how we can fix it ?
It seems to be due to log4j...

What version of the product are you using?
TOMCAT 6.0.24
JDK 6u18
PWM v1.4.3 b922 

Please provide any additional information below.

catalina.log gives :
Mar 11, 2010 2:20:03 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Mar 11, 2010 2:20:05 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesJdbc
SEVERE: A web application registered the JBDC driver 
[org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when 
the web application was stopped. To prevent a memory leak, the JDBC Driver 
has been forcibly unregistered.
Mar 11, 2010 2:20:05 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Thread-
3] but has failed to stop it. This is very likely to create a memory leak.

Thread dump gives :
"Thread-3" daemon prio=6 tid=0x02fadc00 nid=0xfc0 waiting on condition 
[0x00d1f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:104)

Original issue reported on code.google.com by jason.br...@gmail.com on 11 Mar 2010 at 1:24

GoogleCodeExporter commented 9 years ago
I haven't seen this.  The thread listed is the thread that watches for changes 
to
log4jconfig.xml and reads changes dynamically.  The log4j library shipped with 
pwm is
v1.2.15, which appears to be the latest log4j.  You might try looking in your
tomcat/lib directory to see if there is another log4j*.jar file causing 
problems.

What operating system is this on?

Is the pwm servlet hosted on something other than the local file system?  (nfs,
samba, etc?)

Are you starting and stopping the pwm application repeatedly without stopping 
tomcat?

What is the value of web.xml setting 'pwmDbImplementation'?

Original comment by jrivard on 12 Mar 2010 at 1:22

GoogleCodeExporter commented 9 years ago

Original comment by jrivard on 12 Mar 2010 at 1:27

GoogleCodeExporter commented 9 years ago
Hi,

there is no log4j library included with my tomcat.
I'm working on W2003 Server, and PWM is hosted on the local file system.

I do not use Tomcat web interfaces to start / stop pwm.
I receive the error when I stop tomcat service...

pwmDbImplementation :
        <param-value>password.pwm.util.db.Berkeley_PwmDb</param-value>

So far i have no idea how to fix that error...

Original comment by jason.br...@gmail.com on 12 Mar 2010 at 1:50

GoogleCodeExporter commented 9 years ago
As of b945, PWM has been changed to not use Log4j's config file watcher.  This 
means 
that any log4jconfig.xml changes will not be applied until the servlet is 
restarted, 
however it should resolve this error.

Original comment by jrivard on 1 Jun 2010 at 8:48