[JIRA] Created: (LBCLASSIC-323) SMTPAppender does not send messages

SMTPAppender does not send messages ----------------------------------- Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Logback dev list After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Alex Glass commented on LBCLASSIC-323: -------------------------------------- I also have experienced this issue as a new user to logback its very confusing. The problem is that SMTPAppender appears to accept the message but nothing occurs. There is no error message indicating there was no message sent. Verified this was the case with Wireshark (protocol analyzer). I am using Java 1.6 x64 on WIndows 7 with Logback classic 1.0.0. Addiontal details here: http://mailman.qos.ch/pipermail/logback-user/2012-March/003025.html
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Logback dev list
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-323: -------------------------------------- Alex, I have successfully sent an email using the following config file: <configuration> <!-- dump status message on the console as they arrive --> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender"> <smtpHost>smtp.gmail.com</smtpHost> <smtpPort>465</smtpPort> <SSL>true</SSL> <username>name@gmail.com</username> <password>xxx</password> <to>name@gmail.com</to> <from>name@gmail.com</from> <subject>Testing %logger{20} - %m</subject> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1}-%msg%n</pattern> </layout> </appender> <root level="info"> <appender-ref ref="EMAIL" /> </root> </configuration> I am using the EMail sample application to send the messages. See [1]. [1] http://logback.qos.ch/xref/chapters/appenders/mail/EMail.html
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Logback dev list
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-323: -------------------------------------- Lutz, I am unable to reproduce this issue. Could you please provide a test case?
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Logback dev list
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu reassigned LBCLASSIC-323: ------------------------------------ Assignee: Ceki Gulcu (was: Logback dev list)
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Alex Glass updated LBCLASSIC-323: --------------------------------- Attachment: SmtpTest.java logback-smtp-copy.xml pom.xml I have just tested this with logback 1.0.1. If you run the junit test method smtpWithPause test, the mail is sent properly. If you run the smtpTest junit test method, the application exits before the mail is sent. I consider this a bug especially in the case where the last thing done is to log a fatal error via email and terminate via System.exit.
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Lutz Huehnken commented on LBCLASSIC-323: ----------------------------------------- I haven't found the time yet to isolate the code where the error occurs from the bigger project it is contained in, but I'll post code and config snippets. Maybe something is so obviously wrong in there that it is sufficient. The config - in this application, a separate logger category - "myproject.notifications" is used just to send e-mail notifications. In logback.xml: <!-- smtp appenders for e-mail notifications --> <appender name="notifications" class="ch.qos.logback.classic.net.SMTPAppender"> <smtpHost>localhost</smtpHost> <to>deletedforlogbackjira@mailinator.com</to> <subject>Wichtige Meldung - Bearbeitung erforderlich</subject> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%m%n</pattern> </layout> <cyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTrackerImpl"> <!-- send just one log entry per email --> <bufferSize>1</bufferSize> </cyclicBufferTracker> </appender> <!-- setup loggers --> <logger name="myproject.notifications" additivity="false" level="INFO"> <appender-ref ref="notifications" /> </logger> In the java code: ... private static final Logger notifier = LoggerFactory.getLogger("myproject.notifications"); ... in some method ... /* not really an error, but error level is necessary to trigger mail sending */ notifier.error("some message"); ...
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-323: -------------------------------------- The problem is JDK 1.5 specific. If ThreadPoolExecutor's corePoolSize parameter is set to 0, no threads are created. It follows that no email messages can be sent out. Now that the problem affecting JDK 1.5 has been identified a fix is on the way.
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-323. ---------------------------------- Fix Version/s: 1.0.3 Resolution: Fixed Fixed in https://github.com/ceki/logback/commit/56add24c8e14fe9
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Fix For: 1.0.3
Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Patrick Houk commented on LBCLASSIC-323: ---------------------------------------- I also experienced lost emails after upgrading from 0.9.30 to 1.0.0, but I think the reason is different (I use Java 6). I think the problem in my case is that SMTPAppender was changed in 1.0 to send emails asynchronously. I often use SMTPAppender to send alert emails when there is a fatal error, and then exit the application. My theory is that the sending thread simply doesn't have time to process the message before the process dies. Perhaps a configuration option can be added to specify synchronous sending?
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Fix For: 1.0.3
Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-323: -------------------------------------- Patrick, thank you for describing your scenario. I'll add a switch for synchronous sending.
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Fix For: 1.0.3
Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-323?page=com.atlassian.jira.plugin.syste... ] Patrick Houk commented on LBCLASSIC-323: ---------------------------------------- Excellent, thank you!
SMTPAppender does not send messages -----------------------------------
Key: LBCLASSIC-323 URL: http://jira.qos.ch/browse/LBCLASSIC-323 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 1.0.0 Environment: JDK 1.5 FreeBSD 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Apr 15 17:37:45 CEST 2008 amd64 Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) Reporter: Lutz Huehnken Assignee: Ceki Gulcu Fix For: 1.0.3
Attachments: logback-smtp-copy.xml, pom.xml, SmtpTest.java
After upgrading from 0.9.30 to 1.0.0, the ch.qos.logback.classic.net.SMTPAppender seizes to work. It just does not send any messages anymore. This behaviour has apparently been observed by others as well and is also described in this thread: http://old.nabble.com/SMTPAppender-mail-not-sent-%28logback-1.0.0%2C-JDK-1.5... It resumes working when - while making no other changes - logback is downgraded to version 0.9.30
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (4)
-
Alex Glass (JIRA)
-
Ceki Gulcu (JIRA)
-
Lutz Huehnken (JIRA)
-
Patrick Houk (JIRA)