Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002183 [Quercus] tweak always 11-17-07 02:42 11-19-07 22:18
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.4 Product Version 3.1.4
  Product Build
Summary 0002183: Log spew when fsockopen() connection is refused
Description When fsockopen() is called and there's nothing listening on the remote port, a stack trace is output (if you have logging turned up to FINE level). The stack trace is really not useful since the error is exposed to the PHP code anyway, which presumably can do its own error handling. "Connection refused" is not necessarily even an error condition depending on the application.

My patch (and even this may be more logging than the condition really warrants):

--- a/modules/quercus/src/com/caucho/quercus/lib/NetworkModule.java
+++ b/modules/quercus/src/com/caucho/quercus/lib/NetworkModule.java
@@ -47,6 +47,7 @@ import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import java.io.IOException;
+import java.net.ConnectException;
 import java.net.InetAddress;
 import java.net.Socket;
 import java.util.LinkedHashMap;
@@ -144,7 +145,10 @@ public class NetworkModule extends AbstractQuercusModule {
 
       return stream;
     } catch (IOException e) {
- log.log(Level.FINE, e.toString(), e);
+ if (e instanceof ConnectException)
+ log.log(Level.FINE, e.toString());
+ else
+ log.log(Level.FINE, e.toString(), e);
 
       if (errstr != null)
         errstr.set(env.createString(e.toString()));
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0002514)
nam
11-19-07 22:18

I think the stack trace may be useful => changed logging to FINER
 

- Issue History
Date Modified Username Field Change
11-17-07 02:42 koreth New Issue
11-19-07 22:17 nam Status new => assigned
11-19-07 22:17 nam Assigned To  => nam
11-19-07 22:18 nam Status assigned => closed
11-19-07 22:18 nam Note Added: 0002514
11-19-07 22:18 nam Resolution open => fixed
11-19-07 22:18 nam Fixed in Version  => 3.1.4


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker