Page 1 of 1

Routine DSSendMail did not finish OK, return code = '-21'

Posted: Mon Nov 22, 2010 5:45 pm
by GowthamSen
Hi,

I am using "Notification Activity" in a Job Sequence.

When I provide the mail server address as "my server address", getting an error message as "Routine DSSendMail did not finish OK, return code = '-21''.

Any idea, what could be the issue?

Thanks a lot in advance.

Posted: Mon Nov 22, 2010 8:03 pm
by ray.wurlod
Learn about the Search capability in DSXchange. Indeed, this very question has already been asked (and answered) this week.

Posted: Mon Nov 22, 2010 9:47 pm
by chulett
No solution yet, though.

Probably a silly question, but you don't mean you literally put the words "my server address" in the stage, do you? :?

Posted: Mon Nov 22, 2010 9:47 pm
by GowthamSen
ray.wurlod wrote:Learn about the Search capability in DSXchange. Indeed, this very question has already been asked (and answered) this week.
Hi,

I did search. But didn't find any. Even I searched again after your suggestion. But couldn't find any.

Posted: Mon Nov 22, 2010 9:56 pm
by chulett
You may have missed it since we posted simultaneously but I did link you to the post I assume Ray was mentioning.

Posted: Mon Nov 29, 2010 4:28 pm
by GowthamSen
Hi chulett ,

Sorry for late reply.

I gave the correct mail server address, which is my company's mail server address.

I verified the file dssendmai_template.txt file. Its having the default options set during installation.
* On Windows NT to run "dssmtpmail.exe", the template looks like this:
<file>
From: %from%
To: %to%
Subject: %subject%
Server: %server%

%body%
</file>
%dsdir%\bin\dssmtpmail.exe -file %file%
In addition to the above text specified lot of description available before and after this text.

Am I missing anything here. I have searched the link provided by you. But it was not helpful.

Posted: Mon Nov 29, 2010 4:38 pm
by chulett
As noted, there was no solution posted in that other link. However, there is a debugging technique mentioned by Arnd, I would advise you to attempt the same.

Posted: Mon Nov 29, 2010 4:46 pm
by GowthamSen
Yes Chulett. But my DS is installed on Windows 2003 server.

I am not sure, how can I do the similar task.

Could you please help me in this?

Posted: Mon Nov 29, 2010 5:01 pm
by chulett
OK, try googling for this rather than the UNIX flavor that Arnd posted: "debugging batch files". Also, if you have a full error message, much like was posted in the linked thread about 'error when executing command', can you post the contents of the referenced command file?

Posted: Mon Nov 29, 2010 5:31 pm
by GowthamSen
Hi,

Here is the command output:
Demo_Sequence_mail..JobControl (DSSendMail): Error when executing command: C:\IBM\InformationServer\Server\Projects\Tutorial\sendmail_Demo_Sequence_mail_58421446_12232.bat
*** Output from command was: ***
SMTPMail Looking up server...
SMTPMail Opening connection to zz.zzz.com...
SMTPMail Unknown failure!
SMTPMail Error in trying to connect
SMTPMail Network error 10051

Please check any paths in the following command file are correct, and if necessary adjust the 'dssendmail_template.txt' file in the project directory.

Contents of command file:
C:\IBM\InformationServer\Server\DSEngine\bin\dssmtpmail.exe -file sendmail_Demo_Sequence_mail_58421446_12232_file.tmp

Demo_Sequence_mail..JobControl (@Notification_Activity_36): Routine DSSendMail did not finish OK, return code = '-21'

Posted: Mon Nov 29, 2010 5:52 pm
by chulett
You need to take those SMTPMail errors to whomever administers that server and see what they think is going on.

Posted: Tue Nov 30, 2010 2:08 pm
by vinnz
Did you check the contents of the generated command file ?

Code: Select all

Please check any paths in the following command file are correct, and if necessary adjust the 'dssendmail_template.txt' file in the project directory. 
Contents of command file: 
C:\IBM\InformationServer\Server\DSEngine\bin\dssmtpmail.exe -file sendmail_Demo_Sequence_mail_58421446_12232_file.tmp 

Posted: Tue Nov 30, 2010 2:40 pm
by GowthamSen
Thanks Vinz for your reply. It helped me to realize that, the issue might be with teh SMTP server.

I tried direclty using the command. Its showing the actual error message as "Unable to locate server."

When I provided the server as "mail.google.com", its showing some issue with server.
SMTPMail Looking up server...
SMTPMail Opening connection to mail.google.com...
SMTPMail Error in trying to connect
SMTPMail Network error 10051
SMTPMail Unknown failure!

Chulett,

As you suggested, I cannot check with the server admin. As I am using my company server without prior permission, I won't be able to get the help from them. I am working on a test machine.

Posted: Tue Nov 30, 2010 3:45 pm
by asorrell
1) You may need an entry in your /etc/hosts file for the smtp server.
2) Google isn't going to like you trying to use their server to send DataStage messages
3) Even if you can "see" the system once /etc/hosts is done, you might not get email to work. Email admins have the ability to reject email requests from non-authorized systems.