In the last week, we have a server that has been giving up on sending
emails. It’ll send for an hour or two, then pile up emails in the
WEB-INF/lucee/remote-client/open directory. A restart of the Tomcat service
will clear the backlog. Neither catalina nor mail logs give any indication
of anything happening.
We use Windows Server 2012 R2, Java 8, Tomcat 7 and Lucee 4.5.0.23. This
behaviour appeared around the time we upgraded from 4.5.0.22.
Any suggestions what might cause this backlog and what we might be able to
change to prevent it?
I noticed that before each occurrence, there is an email that fails to send
because a file attachment is not found. I’m convinced this file attachment
is being created because the code that creates it hasn’t changed and has
been working. It sounds to me like Andrew’s “File upload issue” at https://groups.google.com/forum/#!topic/lucee/B06_IVEVieg
In the remoteclient.log file I get the line java.io.FileNotFoundException:
C:\Website\WEB-INF\lucee\temp\cc743.dat (The system cannot find the file
specified)
I noticed that before each occurrence, there is an email that fails to
send because a file attachment is not found. I’m convinced this file
attachment is being created because the code that creates it hasn’t changed
and has been working. It sounds to me like Andrew’s “File upload issue” at Redirecting to Google Groups
In the remoteclient.log file I get the line java.io.FileNotFoundException:
C:\Website\WEB-INF\lucee\temp\cc743.dat (The system cannot find the file
specified)
The code boils down to:
See data file attached
and the file C:\Logs\cc.dat does exist
–
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your
ticket NOW - http://www.cfcamp.org/
the next time this happens try to send a test mail with <cfmail …
async=“false”>. see if that email goes through while emails that are
sent asynchronously (default) do not.
if the synchronous email fails please post the exception and stack trace.
if it goes through, then possibly the failed email is stuck there and
causes the spooler to hang. if that’s the case, look in
{your-app}/WEB-INF/lucee/remote-client/open and delete the .tsk files
(or better yet, move them to a different folder in case we want to
inspect them later), then try to send an email again.
the task system has much room for improvement but that’s another issue…
On 15 August 2015 at 21:45, Simon Goldschmidt <@Simon_Goldschmidt mailto:Simon_Goldschmidt> wrote:
I noticed that before each occurrence, there is an email that
fails to send because a file attachment is not found. I'm
convinced this file attachment is being created because the code
that creates it hasn't changed and has been working. It sounds to
me like Andrew's "File upload issue" at
https://groups.google.com/forum/#!topic/lucee/B06_IVEVieg
<https://groups.google.com/forum/#%21topic/lucee/B06_IVEVieg>
In the remoteclient.log file I get the
line java.io.FileNotFoundException:
C:\Website\WEB-INF\lucee\temp\cc743.dat (The system cannot find
the file specified)
The code boils down to:
<cfset filename="#gettempdirectory()#cc#randrange(100,999)#.dat">
<cffile action="copy" source="C:\Logs\cc.dat"
destination="#filename#">
<cfmail to="#to#" from="#from#" subject="#subject#">
<cfmailparam file="#filename#" remove="true">
See data file attached
</cfmail>
and the file C:\Logs\cc.dat does exist
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany -
Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google
Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to lucee+unsubscribe@googlegroups.com
<mailto:lucee+unsubscribe@googlegroups.com>.
To post to this group, send email to lucee@googlegroups.com
<mailto:lucee@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/342f3c07-c640-42b1-9d5c-cd3dd3a57f9b%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/342f3c07-c640-42b1-9d5c-cd3dd3a57f9b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
–
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get
your ticket NOW - http://www.cfcamp.org/
@Andrew: file is system generated in a logging directory, then copied to
the temp directory before attaching to an email… I did some tests and
the file don’t appear to be the issue.
@Igal: I removed the spool enable option in the administrator… trust this
is the same thing as adding the async=“false” parameter. I’ll monitor the
logs.
I noticed the errors in the attached thread.log file, followed by a repeat
of the “could not stop the thread” and “Thread.stop(Throwable) is not
supported by this JVM” messages repeated 10 times each in the space of a
few seconds. The code creating this error is below, with the error being
called on the line with the cfftp “open”:
<cffile…>
<cfmail…>
The file copying and attaching to an email described previously are done in
the tags. Would this be an explanation for the mail spooler
stopping?
Without mail spooling, I’m getting a timeout error when emails in the
block when the FTP process fails. The error occurs on the
line.
“ERROR”,“ajp-bio-8009-exec-4”,“08/16/2015”,“15:42:07”,“”,";request (path:
C:\Website\tennis\interfaces\lock.cfm:5) has run into a timeout (120
seconds) and has been stopped.;request (path:
C:\Website\tennis\interfaces\lock.cfm:5) has run into a timeout (120
seconds) and has been stopped.
at java.lang.Object.wait(Native Method):-2
at java.lang.Object.wait(Object.java:502):502
at lucee.commons.lang.lock.KeyLock.start(KeyLock.java:50):50
at lucee.runtime.net.proxy.Proxy.start(Proxy.java:40):40
at lucee.runtime.net.proxy.Proxy.start(Proxy.java:34):34
at lucee.runtime.net.smtp.SMTPClient._send(SMTPClient.java:668):668
at lucee.runtime.net.smtp.SMTPClient.send(SMTPClient.java:658):658
at lucee.runtime.tag.Mail.doEndTag(Mail.java:533):533
at
tennis.interfaces.lock_cfm$cf.call(C:\Website\tennis\interfaces\lock.cfm:57):57
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:921):921
at
lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:56):56
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:36):36
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2257):2257
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2224):2224
at
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456
at lucee.loader.servlet.CFMLServlet.service(Unknown Source):-1
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727):727
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303):303
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241):241
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220):220
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122):122
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504):504
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170):170
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103):103
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116):116
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421):421
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190):190
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611):611
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314):314
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61
at java.lang.Thread.run(Thread.java:745):745
"
Looks to me like CFFTP doesn’t manage the timeout correctly when a host is
not online and this breaks any subsequent use of CFMAIL, which throws
exception like the following:
“ERROR”,“ajp-bio-8009-exec-4”,“08/16/2015”,“16:59:37”,“”,";request (path:
C:\Website\tennis\account.cfm (C:\Website\tennis\include\je\receipt.txt):6)
has run into a timeout (50 seconds) and has been stopped.;request (path:
C:\Website\tennis\account.cfm (C:\Website\tennis\include\je\receipt.txt):6)
has run into a timeout (50 seconds) and has been stopped.
at java.lang.Object.wait(Native Method):-2
at java.lang.Object.wait(Object.java:502):502
at lucee.commons.lang.lock.KeyLock.start(KeyLock.java:50):50
at lucee.runtime.net.proxy.Proxy.start(Proxy.java:40):40
at lucee.runtime.net.proxy.Proxy.start(Proxy.java:34):34
at lucee.runtime.net.smtp.SMTPClient._send(SMTPClient.java:668):668
at lucee.runtime.net.smtp.SMTPClient.send(SMTPClient.java:658):658
at lucee.runtime.tag.Mail.doEndTag(Mail.java:533):533
at
tennis.include.je.receipt_txt$cf.call(C:\Website\tennis\include\je\receipt.txt:39):39
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:921):921
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:854):854
at tennis.admin.account_cfm$cf.call(C:\Website\tennis\account.cfm:212):212
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:921):921
at
lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:56):56
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:36):36
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2257):2257
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2224):2224
at
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456
at lucee.loader.servlet.CFMLServlet.service(Unknown Source):-1
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727):727
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303):303
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241):241
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220):220
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122):122
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504):504
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170):170
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103):103
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116):116
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421):421
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190):190
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611):611
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314):314
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61
at java.lang.Thread.run(Thread.java:745):745
"
If you identify that emails are stacking up
in {your-app}/WEB-INF/lucee/remote-client/open, is there a way to start up
the spooler (if that’s what you need to do to get the emails to send)
without restarting the Lucee server?
Simon