Six Stars

[resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi all,
I am using Enterprise Data Integration 5.2.2.r99271. I am working locally on my Windows development PC.
I have a job (which works) and I am trying to add a tSendMail as the last step in the job flow. I am using my correct mail server and port (25) in the tSendMail component. I am able to ping/telnet to the SMTP server.
When I run my job in basic mode I get the following error and no email is sent:
javax.mail.MessagingException: Could not connect to SMTP host: mailhost.points.com, port: 25;
nested exception is:
java.net.SocketException: Network is unreachable: connect

When I run the SAME job in Java Debug mode, it works - no error and email is received!
I have closed and re-opened Talend Studio. I have deleted and re-created the tSendMail component. Same problem.
Does anyone have any suggestions for me? TIA
Sue
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

OK, we found the issue - see http://www.talendforge.org/forum/viewtopic.php?id=30075
When I downgraded to Java runtime 1.6 from 1.7, the problem was resolved.
11 REPLIES
Community Manager

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi
From the message printed on the console, I see the tSendMail component still works although there displays some error message, try the following two aspects for testing:
1. Check the 'die on error' option on tSendMail to see if the job stop and throw the java exception on tSendmail if it really has a network problem.
2. Download the latest version of TOS for DI and test again.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi,
I creating some jobs in sand box project. But when iam updating , I got SVN update error.
Here I attached screen shots regarding this error. I w?d be greatful for any help.
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi,
I creating some jobs in sand box project. But when iam updating , I got SVN update error.

Here I attached screen shots regrading this error. I w?d be greatful for any help.
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

I creating some jobs in sand box project. But when iam updating , I got SVN update error.

Here I attached screen shots regrading this error. I w?d be greatful for any help.
Seventeen Stars

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

hi gowthami,
first , open your own post for your request.
second , your screenshot show us a error from Visual SVN not from Talend studio.
regards
laurent
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi,

I creating some jobs in sand box project. But when iam updating , I got SVN update error.
Here I attached Document.PFA. I w?d be greatful for any help.
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi,
I creating some jobs in sand box project. But when iam updating , I got SVN update error.
Here I attached Document.PFA. I w?d be greatful for any help.
One Star

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

Hi,
I creating some jobs in sand box project. But when iam updating , I got SVN update error.
Here I attached Document.PFA. I w?d be greatful for any help.
Six Stars

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

@shong - what in the console makes you think that the tSendMail was successful? If it is my first image, it was because that *was* the success case (ie running in Debug mode works). When I run it in non-debug mode, it fails and does not send an email.
I did as you suggested and added the "Die on error" and got a more verbose error message. Does this help anyone understand why tSendMail works in debug mode and otherwise fails? (I have greyed out the output that is not relevant)
Starting job j_SVM_Flow at 16:13 06/09/2013.

connecting to socket on port 3567
connected
moment="2013-09-06 16:13:00", job="j_SVM_Flow", origin="tWarn_4", description="j_SVM_Flow -- initial context.SuccessFlag value = false"
moment="2013-09-06 16:13:00", job="j_SVM_Flow", origin="tWarn_4", description="j_SVM_Flow -- initial context.SuccessFlag value = false"
file downloaded successfully.
moment="2013-09-06 16:13:02", job="j_SVM_FTP", origin="tAssert_4", status="Ok", substatus="--", description="Number of SVM files downloaded from FTP is greater than 0"
4368|4368
moment="2013-09-06 16:13:02", job="j_SVM_FTP", origin="tAssert_3", status="Ok", substatus="--", description="Sum of the file sizes locally (in bytes) matches the sum of the file sizes on the FTP server"
moment="2013-09-06 16:13:02", job="j_SVM_FTP", origin="tWarn_3", description="WARNING - SVM Invoice file H:\DEVBI-3443\incoming\20130822_svm_invoice.csv already existed in directory File will be overwritten."
moment="2013-09-06 16:13:02", job="j_SVM_FTP", origin="tAssert_6", status="Ok", substatus="--", description="Successfully processed all received SVM files -- 1 file(s)"

Exception in component tSendMail_1
javax.mail.MessagingException: Could not connect to SMTP host: mailhost.points.com, port: 25;
nested exception is:
java.net.SocketException: Network is unreachable: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tSendMail_1Process(j_SVM_Flow.java:3811)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tLoop_1Process(j_SVM_Flow.java:3386)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tWarn_4Process(j_SVM_Flow.java:2515)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tJava_2Process(j_SVM_Flow.java:2411)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow$2.run(j_SVM_Flow.java:7230)
moment="2013-09-06 16:13:03", job="j_SVM_Flow", origin="", status="Failed", substatus="Job execution error", description="Could not connect to SMTP host: mailhost.points.com, port: 25"
disconnected
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 11 more
Test Failed
javax.mail.MessagingException: Could not connect to SMTP host: mailhost.points.com, port: 25;
nested exception is:
java.net.SocketException: Network is unreachable: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tSendMail_1Process(j_SVM_Flow.java:3811)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tLoop_1Process(j_SVM_Flow.java:3386)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tWarn_4Process(j_SVM_Flow.java:2515)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow.tJava_2Process(j_SVM_Flow.java:2411)
at pdwserver_local_aug23.j_svm_flow_3_0.j_SVM_Flow$2.run(j_SVM_Flow.java:7230)
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 11 more
Job j_SVM_Flow ended at 16:13 06/09/2013.
Six Stars

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!

OK, we found the issue - see http://www.talendforge.org/forum/viewtopic.php?id=30075
When I downgraded to Java runtime 1.6 from 1.7, the problem was resolved.
Employee

Re: [resolved] error with tSendMail (Network is unreachable) but works in debug mode!