Anonymous | Login | Signup for a new account | 12-17-2024 10:57 PST |
Main | My View | View Issues | Change Log | Docs |
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 | |||||||||
|
Notes | |
(0002514) nam 11-19-07 22:18 |
I think the stack trace may be useful => changed logging to FINER |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |