Raymond did you resolve it?
If not, did you use tomcats JNDI... or did you use JavaMail directly.
Did you write the code?.... or can you get at the relevant code?
If so, can you show me the code....
You see if for example the mail routine is in a thread, and thats started
when the servlet starts... well that will explain why tomcat needs a
restart.
If its crap code... and doesnt allow for a transient network problem... well
then it just takes one glitch and you dead.
Dont bout you but I find I occasionally have to give the old email program
another click... no big deal, but to this program it may be fatal.
The DNS is on my mind because I had a weirdo error that took some detective
work... my mail smtp (provider) has a reverse lookup on their server... I
think its for spam, so it checks that the FROM domain name is actual from
the mail program sending it... I found if the DNS goes down... it rudely
rejects otherwise perfectly valid emails.
The other thing is that System properties are set for Javamail.... but I
think if those are been set in 20 different servlet threads at the same
time... you could also get a weirdo... dont think it can handle multiple
threads....
Tomcat really doesnt do (if the programmer used it) much more than give you
a session object, it basicly says...here is JavaMail..do as u will.. so the
programmer still had to write code somewhere.
Anyway... I smell a threading issue... like its starting to send a mail...
and another request is tail ending it... something like the one mail is
trying to go, and the next request is busy setting up the mail again....
bang!
If you desperate for help... please show us the code, thanks
----- Original Message -----
From: "Raymond Holguin" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Friday, May 04, 2007 9:37 PM
Subject: Tomcat randomly cannot connect to SMTP host
Hello,
I have tomcat 5.0.28 running on my Linux machine, and all my
applications running under this tomcat experience the same problem at the
same time which is why I believe it to be a tomcat issue.
When my applications attempt to send out an email I get this error
message
(Mail server connection failed; nested exception is
javax.mail.MessagingException: Could not connect to SMTP host: xxxxxx,
port: 25; nested exception is: java.net.ConnectException: Connection
refused)
The SMTP server is fine, because I can use it from other applications not
on that tomcat server. I can also telnet into the SMTP server just fine
from that same machine, so i don't believe its a server/port blocking
issue on the OS or hardware level. The only way I am able to resolve the
problem is to restart Tomcat. Once Tomcat is restarted, then all
operation with emailing works fine again. I cannot seem to force the
issue to happen so i don't know how reproduce it on demand, even though I
know that would help in solving the issue. This problem just seems to
come up randomly and wont go away until I restart tomcat.
If anyone can please help me solve this issue that would be greatly
appreciated. I have important applications running on this machine and
its a great inconvenience to those using the applications when this
problem comes up.
Thank you
-Ray
--
------------------------------------------------------------------------
Raymond Holguin
Programmer Analyst
College of Humanities, Arts, and Social Sciences
Tel: (951) 827-6212
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]