I am completely lost on this one.
I have a tomcat5 web application running on Fedora Core 4. It ran perfectly until a few months ago when suddenly it stopped sending email. I was using the Jakarta mail-1.1 taglib and it looked like it worked but nothing went out. I started using the mailer2 taglib and that finally gave me some errors (below). Even the examples don't work.
Initially I had this on both my development and production servers. I hacked away at the dev server replacing jar files and restarting and eventually it all went away. I then reconciled that with my production server and nothing works. I am sure it is some kind of version conflict as it showed up as quickly as it went away.
I've been beating my head on this for a couple of months now with no progress at all.
Can someone please suggest an approach to debug this? I'm at a total loss.
Thanks
Peter
The code as follows:
<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="mt" uri="http://jakarta.apache.org/taglibs/mailer2" %>
<mt:mail
from="peter.carroll@xxxxxxx.org"
to="peter.carroll@xxxxxxx.org"
subject="simple mail example using mt:send"
background="false"
>
Hello, World
</mt:mail>
HTTP Status 500 -
_____
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: mt:mail: cannot send / create message
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(java.lang.Th rowable) (/usr/lib/libjasper5-runtime-5.0.30.jar.so)
org.apache.jasper.runtime.PageContextImpl.handlePageException(java.lang.Thro wable) (/usr/lib/libjasper5-runtime-5.0.30.jar.so)
org.apache.jsp.trackreg.tmpa_jsp._jspService(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-runtime-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so)
org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so)
org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Reque st, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.jk.server.JkCoyoteHandler.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source) org.apache.jk.common.HandlerRequest.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source) org.apache.jk.common.ChannelSocket.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source)
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgC ontext) (Unknown Source) org.apache.jk.common.SocketConnection.runIt(java.lang.Object[]) (Unknown Source) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.sob9q4kk.so) java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)
root cause
javax.mail.SendFailedException: Unsupported option: SP
gnu.mail.providers.smtp.SMTPTransport.sendMessage(javax.mail.Message, javax.mail.Address[]) (Unknown Source) javax.mail.Transport.send0(javax.mail.Message, javax.mail.Address[]) (Unknown Source) javax.mail.Transport.send(javax.mail.Message) (Unknown Source) org.apache.taglibs.mailer2.MailTag.doEndTag() (Unknown Source)
org.apache.jsp.trackreg.tmpa_jsp._jspx_meth_mt_mail_0(javax.servlet.jsp.Page Context) (Unknown Source)
org.apache.jsp.trackreg.tmpa_jsp._jspService(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) (Unknown Source)
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-runtime-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so)
org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (/usr/lib/libjasper5-compiler-5.0.30.jar.so)
org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) (/usr/lib/libjasper5-compiler-5.0.30.jar.so) javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (/usr/lib/libservletapi5-5.0.30.jar.so)
org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Reque st, org.apache.catalina.Response, org.apache.catalina.ValveContext) (/usr/lib/libcatalina-5.0.30.jar.so)
org.apache.coyote.tomcat5.CoyoteAdapter.service(org.apache.coyote.Request, org.apache.coyote.Response) (/usr/lib/libcatalina-5.0.30.jar.so) org.apache.jk.server.JkCoyoteHandler.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source) org.apache.jk.common.HandlerRequest.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source) org.apache.jk.common.ChannelSocket.invoke(org.apache.jk.core.Msg, org.apache.jk.core.MsgContext) (Unknown Source)
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgC ontext) (Unknown Source) org.apache.jk.common.SocketConnection.runIt(java.lang.Object[]) (Unknown Source) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() (/tmp/libtomcat-util-5.0.30.jar.sob9q4kk.so) java.lang.Thread.run() (/usr/lib/libgcj.so.6.0.0)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0 logs.
_____
Apache Tomcat/5.0
On Sat, 2006-08-26 at 12:10 -0400, peter.carroll@bluefriday.ca wrote:
I am completely lost on this one.
I would start by figuring out what this means:
javax.mail.SendFailedException: Unsupported option: SP gnu.mail.providers.smtp.SMTPTransport.sendMessage(javax.mail.Message, javax.mail.Address[]) (Unknown Source)
The GNU Classpath list might be a good place for advice on SMTPTransport.
AG
"Anthony" == Anthony Green green@redhat.com writes:
I am completely lost on this one.
Anthony> I would start by figuring out what this means:
Anthony> javax.mail.SendFailedException: Unsupported option: SP Anthony> gnu.mail.providers.smtp.SMTPTransport.sendMessage(javax.mail.Message, javax.mail.Address[]) (Unknown Source)
From what I can see this appears to be a message received from the
SMTP server.
I see that SMTPTransport.sendMessage does not chain exceptions. You might get somewhat better info if you fixed that and rebuilt it.
Tom
Thanks. I don't think it is the SMTP server per se but this does help.
From the server that works:
Aug 29 00:27:09 w3 postfix/smtpd[24422]: connect from localhost[127.0.0.1]
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_hostname: localhost ~? 192.168.0.0/16
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_hostaddr: 127.0.0.1 ~? 192.168.0.0/16
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_hostname: localhost ~? 127.0.0.0/8
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 220 w3.bluefriday.ca ESMTP Postfix
Aug 29 00:27:09 w3 postfix/smtpd[24422]: < localhost[127.0.0.1]: EHLO w3
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250-w3.bluefriday.ca
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250-PIPELINING
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250-SIZE 10240000
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250-VRFY
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_list_match: localhost: no match
Aug 29 00:27:09 w3 postfix/smtpd[24422]: match_list_match: 127.0.0.1: no match
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250-ETRN
Aug 29 00:27:09 w3 postfix/smtpd[24422]: > localhost[127.0.0.1]: 250 8BITMIME
Aug 29 00:27:09 w3 postfix/smtpd[24422]: < localhost[127.0.0.1]: MAIL FROM:peter.carroll@pcaucr.org
Aug 29 00:27:09 w3 postfix/smtpd[24422]: extract_addr: input: peter.carroll@pcaucr.org
Aug 29 00:27:09 w3 postfix/smtpd[24422]: smtpd_check_addr: addr=peter.carroll@pcaucr.org
Aug 29 00:27:09 w3 postfix/smtpd[24422]: connect to subsystem private/rewrite
Aug 29 00:27:09 w3 postfix/smtpd[24422]: send attr request = rewrite
From the server that doesn't:
Aug 29 00:08:53 carrera postfix/smtpd[14874]: connect from localhost.localdomain[127.0.0.1]
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostname: localhost.localdomain ~? 192.168.0.0/16
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostaddr: 127.0.0.1 ~? 192.168.0.0/16
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostname: localhost.localdomain ~? 38.112.123.0/24
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostaddr: 127.0.0.1 ~? 38.112.123.0/24
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostname: localhost.localdomain ~? 66.46.233.140
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostaddr: 127.0.0.1 ~? 66.46.233.140
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostname: localhost.localdomain ~? 127.0.0.0/8
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 220 carrera.bluefriday.ca ESMTP Postfix
Aug 29 00:08:53 carrera postfix/smtpd[14874]: watchdog_pat: 0x85428f0
Aug 29 00:08:53 carrera postfix/smtpd[14874]: < localhost.localdomain[127.0.0.1]: EHLO carrera.bluefriday.ca
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250-carrera.bluefriday.ca
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250-PIPELINING
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250-SIZE 25000000
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250-VRFY
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_list_match: localhost.localdomain: no match
Aug 29 00:08:53 carrera postfix/smtpd[14874]: match_list_match: 127.0.0.1: no match
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250-ETRN
Aug 29 00:08:53 carrera postfix/smtpd[14874]: > localhost.localdomain[127.0.0.1]: 250 8BITMIME
Aug 29 00:08:53 carrera postfix/smtpd[14874]: watchdog_pat: 0x85428f0
Aug 29 00:08:53 carrera postfix/smtpd[14874]: < localhost.localdomain[127.0.0.1]: MAIL FROM:precisionpete@gmail.com SP org.jpackage.mail.inet.smtp.ParameterList@1d1ae9b9
Aug 29 00:08:53 carrera postfix/smtpd[14874]: extract_addr: input: precisionpete@gmail.com
Aug 29 00:08:53 carrera postfix/smtpd[14874]: smtpd_check_addr: addr=precisionpete@gmail.com
Aug 29 00:08:53 carrera postfix/smtpd[14874]: connect to subsystem private/rewrite
Aug 29 00:08:53 carrera postfix/smtpd[14874]: send attr request = rewrite
Aug 29 00:08:53 carrera postfix/smtpd[14874]: send attr rule = local
Aug 29 00:08:53 carrera postfix/smtpd[14874]: send attr address = precisionpete@gmail.com
Aug 29 00:08:53 carrera postfix/smtpd[14874]: private/rewrite socket: wanted attribute: flags
Aug 29 00:08:53 carrera postfix/smtpd[14874]: input attribute name: flags
-----Original Message----- From: tromey@redhat.com [mailto:tromey@redhat.com] Sent: Monday, August 28, 2006 5:05 PM To: Anthony Green Cc: peter.carroll@bluefriday.ca; fedora-devel-java-list@redhat.com Subject: Re: [fedora-java] How to debugging tomcat5 mailer problems
"Anthony" == Anthony Green green@redhat.com writes:
I am completely lost on this one.
Anthony> I would start by figuring out what this means:
Anthony> javax.mail.SendFailedException: Unsupported option: SP
Anthony> gnu.mail.providers.smtp.SMTPTransport.sendMessage(javax.mail.Message, javax.mail.Address[]) (Unknown Source)
From what I can see this appears to be a message received from the
SMTP server.
I see that SMTPTransport.sendMessage does not chain exceptions. You
might get somewhat better info if you fixed that and rebuilt it.
Tom
"Peter" == Peter Carroll peter.carroll@bluefriday.ca writes:
Peter> Thanks. I don't think it is the SMTP server per se but this does help.
Peter> Aug 29 00:08:53 carrera postfix/smtpd[14874]: < Peter> localhost.localdomain[127.0.0.1]: MAIL FROM:precisionpete@gmail.com SP Peter> org.jpackage.mail.inet.smtp.ParameterList@1d1ae9b9
This is curious, and I would guess the source of the bug. You'd have to track down where this comes from.
Tom
Hi,
Tom Tromey wrote:
"Peter" == Peter Carroll peter.carroll@bluefriday.ca writes:
Peter> Thanks. I don't think it is the SMTP server per se but this does help.
Peter> Aug 29 00:08:53 carrera postfix/smtpd[14874]: < Peter> localhost.localdomain[127.0.0.1]: MAIL FROM:precisionpete@gmail.com SP Peter> org.jpackage.mail.inet.smtp.ParameterList@1d1ae9b9
This is curious, and I would guess the source of the bug. You'd have to track down where this comes from.
This comes from the GNU Classpath inet implementation bundled with classpathx-mail: see the classpathx-mail SRPM. We needed to roll it into the main jar to be drop-compatible with Sun's javamail implementation, which has no external dependencies.
Tom
"Tom" == Thomas Fitzsimmons fitzsim@redhat.com writes:
Peter> localhost.localdomain[127.0.0.1]: MAIL FROM:precisionpete@gmail.com SP Peter> org.jpackage.mail.inet.smtp.ParameterList@1d1ae9b9
Tom> This comes from the GNU Classpath inet implementation bundled with Tom> classpathx-mail: see the classpathx-mail SRPM. We needed to roll it Tom> into the main jar to be drop-compatible with Sun's javamail Tom> implementation, which has no external dependencies.
Sorry, I meant something a little different: that output looks weird to me, as if there is a buggy toString somewhere. So I would track down where the problem data comes from. I don't know what that "SP" is about but the stuff following it just can't be what an SMTP server wants :-)
Tom
Can you suggest how I might control the configuration so as not to add the SP option? Though SP is valid in the ESMTPO RFC Postfix seems not to like it. I don't see how I can configure this.
Thanks Peter
-----Original Message----- From: Thomas Fitzsimmons [mailto:fitzsim@redhat.com] Sent: Wednesday, August 30, 2006 2:12 PM To: tromey@redhat.com Cc: Peter Carroll; fedora-devel-java-list@redhat.com Subject: Re: [fedora-java] How to debugging tomcat5 mailer problems
Hi,
Tom Tromey wrote:
"Peter" == Peter Carroll peter.carroll@bluefriday.ca writes:
Peter> Thanks. I don't think it is the SMTP server per se but this does
help.
Peter> Aug 29 00:08:53 carrera postfix/smtpd[14874]: < Peter> localhost.localdomain[127.0.0.1]: MAIL
FROM:precisionpete@gmail.com SP
Peter> org.jpackage.mail.inet.smtp.ParameterList@1d1ae9b9
This is curious, and I would guess the source of the bug. You'd have to track down where this comes from.
This comes from the GNU Classpath inet implementation bundled with classpathx-mail: see the classpathx-mail SRPM. We needed to roll it into the main jar to be drop-compatible with Sun's javamail implementation, which has no external dependencies.
Tom
java-devel@lists.fedoraproject.org