nodemailer multiple email sending using SMTP causes connection close errors - smtp

I am having problems when I do a looped call to Mailer send email function.I am testing sending of over 50 emails and the most number of successfully sent were 30 so far. The rest is stopped by the following errors. I redacted the complete email address for the robot for privacy reasons.
[2018-09-03 05:18:32] INFO [0rULO04aig] User "xxx.robot#xxxxxx.com"
authenticated
[2018-09-03 05:18:32] INFO [#1] Sending message
<3299d22a-e0c8-00b8-4f7d-4d0455f85b31#xxxxx.com> using #1 to
[2018-09-03 05:18:32] DEBUG [0rULO04aig] C: MAIL FROM:
[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] S:
250 2.1.0 OK v72-v6sm36109733pfj.22 - gsmtp
[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] C: RCPT
TO:
[2018-09-03 05:18:32] DEBUG [0rULO04aig] S: 250 2.1.0 OK
v186-v6sm24113856pgd.25 - gsmtp
[2018-09-03 05:18:32] DEBUG [0rULO04aig] C: RCPT
TO:
[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] S: 250 2.1.5 OK
v72-v6sm36109733pfj.22 - gsmtp
[2018-09-03 05:18:32] DEBUG [PFhdqz3yHs] C: DATA
[2018-09-03 05:18:32] DEBUG [BlXN9zcX8Ak] S: 421 4.7.0 Temporary
System Problem. Try again later (10). x65-v6sm28504837pfk.140 - gsmtp
[2018-09-03 05:18:32] DEBUG [BlXN9zcX8Ak] Closing connection to the
server using "end"
[2018-09-03 05:18:32] INFO [#1] Connection #1 was closed
[2018-09-03 05:18:32] ERROR [#1] Pool Error for #1: Data command
failed: 421 4.7.0 Temporary System Problem. Try again later (10).
x65-v6sm28504837pfk.140 - gsmtp
[2018-09-03 05:18:32] ERROR Send Error: Data command failed: 421 4.7.0
Temporary System Problem. Try again later (10).
x65-v6sm28504837pfk.140 - gsmtp
[2018-09-03 05:18:32] DEBUG [gflzBwS1fc] S: 421 4.7.0 Temporary System
Problem. Try again later (10). b203-v6sm1382852pfb.174 - gsmtp
I am unable to post the complete code since the checker here keeps telling me that it is not properly formatted. The code follows ESLint rules.
Let me post a pseudocode:
forEach(users, key) =>
getSQL
create Users if no result found
sendEmail(user)
So the settings:
function Mailer(options) {
this.options = options;
that = this;
this.transporter = nodemailer.createTransport({
pool: true,
maxConnections: 50,
maxMessages: Infinity,
debug: true,
logger: true,
connectionTimeout: 3000,
host: config.mail.host,
port: config.mail.port,
secure: false,
auth: {
user: config.mail.username,
pass: config.mail.password,
},
});
}

Related

couchbase Re-balance failing with error - Rebalance exited with reason {badmatch,failed}

I am setting up a cluster. I tried to join 3 nodes but while re-balancing. I got below error. So i extracted some info from debug.log and unable to identify the exact issue. Appreciate any help.
=========================CRASH REPORT=========================
crasher:
initial call: service_agent:-spawn_connection_waiter/2-fun-0-/0
pid: <0.18486.7>
registered_name: []
exception exit: {no_connection,"index-service_api"}
in function service_agent:wait_for_connection_loop/3 (src/service_agent.erl, line 305)
ancestors: ['service_agent-index',service_agent_children_sup,
service_agent_sup,ns_server_sup,ns_server_nodes_sup,
<0.170.0>,ns_server_cluster_sup,<0.89.0>]
messages: []
links: [<0.18481.7>,<0.18490.7>]
dictionary: []
trap_exit: false
status: running
heap_size: 987
stack_size: 27
reductions: 1195
neighbours:
[ns_server:error,2018-02-12T13:54:43.531-05:00,ns_1#xuodf9.firebrand.com:service_agent-index<0.18481.7>:service_agent:terminate:264]Terminating abnormally
[ns_server:debug,2018-02-12T13:54:43.531-05:00,ns_1#xuodf9.firebrand.com:<0.18487.7>:ns_pubsub:do_subscribe_link:145]Parent process of subscription {ns_config_events,<0.18481.7>} exited with reason {linked_process_died,
<0.18486.7>,
{no_connection,
"index-service_api"}}
[error_logger:error,2018-02-12T13:54:43.531-05:00,ns_1#xuodf9.firebrand.com:error_logger<0.6.0>:ale_error_logger_handler:do_log:203]** Generic server 'service_agent-index' terminating
** Last message in was {'EXIT',<0.18486.7>,
{no_connection,"index-service_api"}}
** When Server state == {state,index,
{dict,6,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[[{uuid,<<"55a14ec6b06d72205b3cd956e6de60e7">>}|
'ns_1#xuodf7.firebrand.com']],
[],
[[{uuid,<<"c5e67322a74826bef8edf27d51de3257">>}|
'ns_1#xuodf8.firebrand.com']],
[],
[[{uuid,<<"3b55f7739e3fe85127dcf857a5819bdf">>}|
'ns_1#xuodf9.firebrand.com']],
[],
[[{node,'ns_1#xuodf7.firebrand.com'}|
<<"55a14ec6b06d72205b3cd956e6de60e7">>],
[{node,'ns_1#xuodf8.firebrand.com'}|
<<"c5e67322a74826bef8edf27d51de3257">>],
[{node,'ns_1#xuodf9.firebrand.com'}|
<<"3b55f7739e3fe85127dcf857a5819bdf">>]],
[],[],[],[],[],[],[],[],[]}}},
undefined,undefined,<0.18626.7>,#Ref<0.0.5.56873>,
<0.18639.7>,
{[{<0.18646.7>,#Ref<0.0.5.56891>}],[]},
undefined,undefined,undefined,undefined,undefined}
** Reason for termination ==
** {linked_process_died,<0.18486.7>,{no_connection,"index-service_api"}}
[error_logger:error,2018-02-12T13:54:43.532-05:00,ns_1#xuodf9.firebrand.com:error_logger<0.6.0>:ale_error_logger_handler:do_log:203]
=========================CRASH REPORT=========================
crasher:
initial call: service_agent:init/1
pid: <0.18481.7>
registered_name: 'service_agent-index'
exception exit: {linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}
in function gen_server:terminate/6 (gen_server.erl, line 744)
ancestors: [service_agent_children_sup,service_agent_sup,ns_server_sup,
ns_server_nodes_sup,<0.170.0>,ns_server_cluster_sup,
<0.89.0>]
messages: [{'EXIT',<0.18639.7>,
{linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}}]
links: [<0.18487.7>,<0.4805.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 28690
stack_size: 27
reductions: 6334
neighbours:
[error_logger:error,2018-02-12T13:54:43.533-05:00,ns_1#xuodf9.firebrand.com:error_logger<0.6.0>:ale_error_logger_handler:do_log:203]
=========================SUPERVISOR REPORT=========================
Supervisor: {local,service_agent_children_sup}
Context: child_terminated
Reason: {linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}
Offender: [{pid,<0.18481.7>},
{name,{service_agent,index}},
{mfargs,{service_agent,start_link,[index]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
[ns_server:error,2018-02-12T13:54:43.533-05:00,ns_1#xuodf9.firebrand.com:service_rebalancer-index<0.18626.7>:service_rebalancer:run_rebalance:80]Agent terminated during the rebalance: {'DOWN',#Ref<0.0.5.56860>,process,
<0.18481.7>,
{linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}}
[error_logger:info,2018-02-12T13:54:43.534-05:00,ns_1#xuodf9.firebrand.com:error_logger<0.6.0>:ale_error_logger_handler:do_log:203]
=========================PROGRESS REPORT=========================
supervisor: {local,service_agent_children_sup}
started: [{pid,<0.20369.7>},
{name,{service_agent,index}},
{mfargs,{service_agent,start_link,[index]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
[ns_server:error,2018-02-12T13:54:43.534-05:00,ns_1#xuodf9.firebrand.com:service_agent-index<0.20369.7>:service_agent:handle_call:186]Got rebalance-only call {if_rebalance,<0.18626.7>,unset_rebalancer} that doesn't match rebalancer pid undefined
[ns_server:error,2018-02-12T13:54:43.534-05:00,ns_1#xuodf9.firebrand.com:service_rebalancer-index<0.18626.7>:service_agent:process_bad_results:815]Service call unset_rebalancer (service index) failed on some nodes:
[{'ns_1#xuodf9.firebrand.com',nack}]
[ns_server:warn,2018-02-12T13:54:43.534-05:00,ns_1#xuodf9.firebrand.com:service_rebalancer-index<0.18626.7>:service_rebalancer:run_rebalance:89]Failed to unset rebalancer on some nodes:
{error,{bad_nodes,index,unset_rebalancer,
[{'ns_1#xuodf9.firebrand.com',nack}]}}
[error_logger:error,2018-02-12T13:54:43.535-05:00,ns_1#xuodf9.firebrand.com:error_logger<0.6.0>:ale_error_logger_handler:do_log:203]
=========================CRASH REPORT=========================
crasher:
initial call: service_rebalancer:-spawn_monitor/6-fun-0-/0
pid: <0.18626.7>
registered_name: 'service_rebalancer-index'
exception exit: {linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}
in function service_rebalancer:run_rebalance/7 (src/service_rebalancer.erl, line 92)
ancestors: [cleanup_process,ns_janitor_server,ns_orchestrator_child_sup,
ns_orchestrator_sup,mb_master_sup,mb_master,<0.4893.0>,
ns_server_sup,ns_server_nodes_sup,<0.170.0>,
ns_server_cluster_sup,<0.89.0>]
messages: [{'EXIT',<0.18640.7>,
{linked_process_died,<0.18486.7>,
{no_connection,"index-service_api"}}}]
links: []
dictionary: []
trap_exit: true
status: running
heap_size: 2586
stack_size: 27
reductions: 6359
neighbours:
[ns_server:error,2018-02-12T13:54:43.536-05:00,ns_1#xuodf9.firebrand.com:cleanup_process<0.18625.7>:service_janitor:maybe_init_topology_aware_service:84]Initial rebalance for `index` failed: {error,
{initial_rebalance_failed,index,
{linked_process_died,<0.18486.7>,
{no_connection,
"index-service_api"}}}}
[ns_server:debug,2018-02-12T13:54:43.536-05:00,ns_1#xuodf9.firebrand.com:menelaus_cbauth<0.4796.0>:menelaus_cbauth:handle_cast:95]Observed json rpc process {"projector-cbauth",<0.5099.0>} needs_update
[ns_server:debug,2018-02-12T13:54:43.538-05:00,ns_1#xuodf9.firebrand.com:menelaus_cbauth<0.4796.0>:menelaus_cbauth:handle_cast:95]Observed json rpc process {"goxdcr-cbauth",<0.479.0>} needs_update
[ns_server:debug,2018-02-12T13:54:43.539-05:00,ns_1#xuodf9.firebrand.com:menelaus_cbauth<0.4796.0>:menelaus_cbauth:handle_cast:95]Observed json rpc process {"cbq-engine-cbauth",<0.5124.0>} needs_update
[ns_server:debug,2018-02-12T13:54:43.540-05:00,ns_1#xuodf9.firebrand.com:menelaus_cbauth<0.4796.0>:menelaus_cbauth:handle_cast:95]Observed json rpc process {"fts-cbauth",<0.5129.0>} needs_update
This is a blocker for cluster creation at this point.
The rebalance error is coming due to index service. You can check indexer.log to see if there are any errors and the process is able to bootstrap correctly.
Please make sure the communication ports are open as mentioned here: https://developer.couchbase.com/documentation/server/current/install/install-ports.html
projector_port 9999 being blocked can lead to this.

Getting error during "truffle migrate" for an ethereum contract on testrpc

While trying out the ethereum contract mentioned at the tutorial: https://medium.com/#ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4#.ilmaiavg0 (source code for the tutorial: https://github.com/eshon/conference), I get the following error while doing truffle migrate:
test#test-ubuntu:~/Blockchain/Ethereum/conference$ truffle migrate
Running migration: 1_initial_migration.js
Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36
at [object Object].request.onreadystatechange (/usr/local/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:114:13)
at [object Object].dispatchEvent (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickDomainCallback (node.js:396:17)
testrpc is up and running, and I see following two lines in testrpc terminal when I run truffle migrate:
127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 718 0.001741
127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 493 0.042596
Am I missing anything in the configuration?
My Source Code is at https://github.com/manindra23/conference-contract/tree/develop
Can you just try to give network setup in truffle.js file
like this,
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*' // Match any network id
}
}

ejabberd mod_rest installation warning & crash report

I've tried to test mod_rest for my ejabberd. Received 'OK' result but with warning : "Warning: undefined callback function depends/2 (behaviour 'gen_mod')" during installation of the module. When I tried to test mod_rest that I installed using REST client, there's CRASH REPORT in log.
ejabberd version : 16.08.23
URL : http://localhost:5280/rest
ejabberd.yml
hosts:
- "localhost"
- "192.168.88.88"
- "127.0.0.1"
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
"/rest": mod_rest
web_admin: true
http_bind: true
captcha: true
modules:
mod_rest: {}
INSTALLATION INFO
$/sbin/ejabberdctl module_install mod_rest
src/mod_rest.erl:27: Warning: undefined callback function depends/2 (behaviour 'gen_mod')
ok
ejabberd.log
2016-08-24 11:14:31.516 [error] <0.3683.0> CRASH REPORT Process
<0.3683.0> with 0 neighbours crashed with reason: bad argument in call
to erlang:binary_to_list({127,0,0,1}) in str:tokens/2 line 242
crash.log
2016-08-24 14:42:20 =CRASH REPORT====
crasher:
initial call: ejabberd_http:init/2
pid: <0.3274.0>
registered_name: []
exception error: bad argument: [{erlang,binary_to_list,[{127,0,0,1}],[]},{str,tokens,2,[{file,"src/str.erl"},{line,242}]},{acl,parse_ip_netmask,1,[{file,"src/acl.erl"},{line,536}]},{mod_rest,'-ip_matches/2-fun-0-',2,[{file,"src/mod_rest.erl"},{line,144}]},{lists,any,2,[{file,"lists.erl"},{line,1225}]},{mod_rest,check_member_option,3,[{file,"src/mod_rest.erl"},{line,134}]},{mod_rest,process,2,[{file,"src/mod_rest.erl"},{line,55}]},{ejabberd_http,process,5,[{file,"src/ejabberd_http.erl"},{line,363}]}]
ancestors: [<0.3190.0>,ejabberd_listeners,ejabberd_sup,<0.2578.0>]
messages: []
links: [#Port<0.35648>]
dictionary: []
trap_exit: false
status: running
heap_size: 1598
stack_size: 27
reductions: 1894
neighbours:

javax.mail.sendfailedexception sending failed nested exception is class javax.mail.MessagingException

It give error about some problem with STARTTLS command .
it gives the error like this
javax.mail.sendfailedexception sending failed nested exception is class javax.mail.MessagingException
So please help me out of it.
Java Code
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class MailDemo {
public static void main(String[] args) {
Properties properties=new Properties();
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable","true");
properties.put("mail.smtp.host","smtp.gmail.com");
properties.put("mail.smtp.port", "587");
Scanner scn=new Scanner(System.in);
System.out.println("Username for Authentication :");
final String username=scn.nextLine();
System.out.println("Password for Authentication :");
final String password=scn.nextLine();
System.out.println("From Email..");
String fromEmailAddrs=scn.nextLine();
System.out.println("To Email..");
String toEmail=scn.nextLine();
System.out.println("Subject..");
String subject=scn.nextLine();
System.out.println("Message..");
String textMessage=scn.nextLine();
Session session=Session.getDefaultInstance(properties,new Authenticator() {
#Override
protected javax.mail.PasswordAuthentication getPasswordAuthentication(){
return new javax.mail.PasswordAuthentication(username, password);
}
});
try{
Message msg=new MimeMessage(session);
msg.setFrom(new InternetAddress(fromEmailAddrs));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));
msg.setSubject(subject);
msg.setText(textMessage);
Transport.send(msg);
System.out.println("/n Your Message Delivered Succesfully");
}
catch(MessagingException m){
throw new RuntimeException(m);
}
}
}
Console
Username for Authentication :
bijaybhaskar01
Password for Authentication :
abcdef#456789
From Email..
bijaybhaskar01#gmail.com
To Email..
bbswain1001#gmail.com
Subject..
Hello
Message..
hai
Output
Exception in thread "main" java.lang.RuntimeException: javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. fh14sm3131583pab.31 - gsmtp
at com.mail.bhaskar.MailDemo.main(MailDemo.java:52)
Caused by: javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. fh14sm3131583pab.31 - gsmtp
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at com.mail.bhaskar.MailDemo.main(MailDemo.java:48)
Debug output
DEBUG: JavaMail version 1.3.1
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_77\lib\javamail.providers (The system cannot find the file specified)
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/gimap.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/gimap.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/imap.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/imap.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/pop3.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/pop3.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.gimap.GmailSSLStore=javax.mail.Provider[STORE,gimaps,com.sun.mail.gimap.GmailSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.gimap.GmailStore=javax.mail.Provider[STORE,gimap,com.sun.mail.gimap.GmailStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], gimap=javax.mail.Provider[STORE,gimap,com.sun.mail.gimap.GmailStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], gimaps=javax.mail.Provider[STORE,gimaps,com.sun.mail.gimap.GmailSSLStore,Oracle]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.address.map
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_77\lib\javamail.address.map (The system cannot find the file specified)
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587
220 smtp.gmail.com ESMTP n6sm3627811pfa.2 - gsmtp
DEBUG SMTP: connected to host "smtp.gmail.com", port: 587
EHLO Bhaskar
250-smtp.gmail.com at your service, [119.82.116.106]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250 SMTPUTF8
DEBUG SMTP: Found extension "SIZE", arg "35882577"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SMTPUTF8", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<bijaybhaskar01#gmail.com>
530 5.7.0 Must issue a STARTTLS command first. n6sm3627811pfa.2 - gsmtp
QUIT
You're using JavaMail 1.3.1, which is ancient and does not support STARTTLS.
Upgrade to a newer version.

what this error means? [Erlang, mochiweb, MySQL]

I made a comet chat server with Erlang and Mochiweb. And I run the "./start-dev.sh" to start the server. But after about 1 month I got the following error:
=ERROR REPORT==== 26-Sep-2009::09:21:06 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
mysql: fetch "SELECT appKey FROM applications WHERE appID = 1" (id p1)
=CRASH REPORT==== 26-Sep-2009::09:21:10 ===
crasher:
initial call: mochiweb_socket_server:acceptor_loop/1
pid: <0.4271.23>
registered_name: []
exception error: no match of right hand side value
{error,[70,97,105,108,101,100,32,115,101,110,100,105,110,
103,32,100,97,116,97,32,111,110,32,115,111,99,
107,101,116,32,58,32,"closed"]}
in function moonwalker_web:loop/2
in call from mochiweb_http:headers/5
ancestors: [moonwalker_web,moonwalker_sup,<0.52.0>]
messages: []
links: [<0.54.0>,#Port<0.792854>]
dictionary: [{mochiweb_request_body,
<<"appID=1&appKey=keyy&userID=8048943&nickName=bill&buddies=N%3B&timestamp=1253928070154">>},
{mochiweb_request_recv,true},
{mochiweb_request_post,
[{"appID","1"},
{"appKey","key"},
{"userID","8048943"},
{"nickName",[143,229,167,144]},
{"buddies","N;"},
{"timestamp","1253928070154"}]},
{mochiweb_request_path,"/online"}]
trap_exit: false
status: running
heap_size: 2584
stack_size: 24
reductions: 1368
neighbours:
=ERROR REPORT==== 26-Sep-2009::09:21:10 ===
{mochiweb_socket_server,235,
{child_error,
{badmatch,
{error,
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
And if turn the following numbers into characters
[70,97,105,108,101,100,32,115,101,110,100,105,110,103,32,100,
97,116,97,32,111,110,32,115,111,99,107,101,116,32,58,32,
"closed"]}}}}
they are
Failed sending data on socket :"closed"
Does that mean I have problems with MySQL connection or socket?
I don't know if this error has something to do with my "./start-dev.sh" or I just had some wrong settings?
And what else information do I have to provide for diagnosing?
Thanks and looking forward to your reply?
It looks like somewhere in the loop/2 function you don't handle an {error,Error} return from a function call. This causes the error which crashes the process. Without the code it is difficult to say what caused the error return.