Home » SQL & PL/SQL » SQL & PL/SQL » ORA-29278: SMTP transient error: 421 Service not available
ORA-29278: SMTP transient error: 421 Service not available [message #318191] Tue, 06 May 2008 01:23 Go to next message
musman
Messages: 147
Registered: July 2007
Location: Lahore
Senior Member

i am trying to send mail using utl_smtp.
but this error occurs. even smtp is installed on server.
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 97
ORA-06512: at "SYS.UTL_SMTP", line 139
ORA-06512: at "TEST.DEMO_MAIL", line 235
ORA-06512: at "TEST.DEMO_MAIL", line 113
ORA-06512: at "TEST.DEMO_MAIL", line 99
ORA-06512: at line 2


database 10.2.0
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318193 is a reply to message #318191] Tue, 06 May 2008 01:29 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
This is a message generated by the mailserver.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318194 is a reply to message #318193] Tue, 06 May 2008 01:31 Go to previous messageGo to next message
musman
Messages: 147
Registered: July 2007
Location: Lahore
Senior Member

u mean to say that mail server does not support smtp.
oracle server doing fine but not mail server.
is that??

[Updated on: Tue, 06 May 2008 01:34]

Report message to a moderator

Re: ORA-29278: SMTP transient error: 421 Service not available [message #318202 is a reply to message #318194] Tue, 06 May 2008 01:47 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
The mailserver says "421 Service not available"
This could be caused by many reasons: greylisting, server busy, maybe even a faulty HELO handshake.
Ask your systems administrator.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318480 is a reply to message #318202] Wed, 07 May 2008 00:26 Go to previous messageGo to next message
bloodhound
Messages: 9
Registered: May 2008
Junior Member
This error is not at all related to your code... this is a problem with the SMTP service... i also get this error many times but when i try after smetime it works fine...

so dat is actually a problem with the mail server...
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318490 is a reply to message #318480] Wed, 07 May 2008 00:49 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


Disable your virus-scan and then try to execute your script.

Babu
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318494 is a reply to message #318490] Wed, 07 May 2008 00:54 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
And what would that do?
The error clearly shows that the code is able to connect to the mailserver. The mailserver answers that it's busy.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318527 is a reply to message #318494] Wed, 07 May 2008 02:03 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


Dear Frank,

Some time virus-scan block mail's from smtp server. That's why i suggest need to check virus-scan disabled or enabled.

PS: Make sure your SMTP server running.

Babu
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318531 is a reply to message #318527] Wed, 07 May 2008 02:10 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
The 421-error is a response from the SMTP-server AFTER the HELO, which means that
- the smtp server is running (otherwise there would be no response on port 25)
- my local machine/server is able to reach the smtp server (indicating that my virus-scanner has nothing to do with it)
Re: ORA-29278: SMTP transient error: 421 Service not available [message #318539 is a reply to message #318531] Wed, 07 May 2008 02:27 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Dear Frank,

Thanks for update.

Actually some months before i was faced same issue. I thought the problem is

1. McAfee Scaner
2. SMTP server down.

Check Here

Now i understood.

Thanks,
Babu
Re: ORA-29278: SMTP transient error: 421 Service not available [message #575557 is a reply to message #318539] Thu, 24 January 2013 01:56 Go to previous messageGo to next message
sss111ind
Messages: 634
Registered: April 2012
Location: India
Senior Member

Hi All,

I am getting the same above error while trying to send an email,What could be the reason.

Regards,
Nathan
Re: ORA-29278: SMTP transient error: 421 Service not available [message #575558 is a reply to message #575557] Thu, 24 January 2013 02:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
One of those given above, why don't you read and check them?

Regards
Michel
Re: ORA-29278: SMTP transient error: 421 Service not available [message #587927 is a reply to message #318191] Wed, 19 June 2013 06:42 Go to previous messageGo to next message
raunaqsharma@yahoo.com
Messages: 1
Registered: June 2013
Junior Member
I am getting the same error , but this case does not fall in any of the scenario's mentioned above.

I have two procedures one to create message body and setup information and the other to just attach files as attachment.

Now , i am passing the connection variable from one procedure to another procedure and then it is giving me this error. Any suggestions please?
Re: ORA-29278: SMTP transient error: 421 Service not available [message #587935 is a reply to message #587927] Wed, 19 June 2013 07:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And what do you expect from us with what you have posted, I summarize: "I have an error and all what has been said before is useless".

I have a suggestion, copy and paste your code and what you do when you get the error.

Regards
Michel
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652801 is a reply to message #318191] Mon, 20 June 2016 03:21 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member

SQL> exec utl_mail.send(sender => 'abc@xyz.com', recipients => 'abc@xyz.com' , subject => 'test' , message => 'test');
BEGIN utl_mail.send(sender => 'abc@xyz.com', recipients => 'abc@xyz.com' , subject => 'test' , message => 'test'); END;

*
ERROR at line 1:
ORA-29278: SMTP ?????: 421 Service not available
ORA-06512: ? "SYS.UTL_MAIL", line 654
ORA-06512: ? "SYS.UTL_MAIL", line 671
ORA-06512: ? line 1

I made the changes in init.ora as well.

Package also installed:
SQL> @%ORACLE_HOME%\RDBMS\ADMIN\utlmail.sql

Package created.


Synonym created.

SQL> @%ORACLE_HOME%\RDBMS\ADMIN\prvtmail.plb

Package created.


Package body created.


Grant succeeded.


Package body created.

No errors.
SQL> alter system set smtp_out_server = 'smtp.exmail.qq.com' scope=both;

System altered.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652802 is a reply to message #652801] Mon, 20 June 2016 03:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

The problem is not in Oracle, it is that the mail server you gave (smtp.exmail.qq.com) does not exist or is not reachable.
First can you ping the server at OS level as Oracle account:
ping smtp.exmail.qq.com


Re: ORA-29278: SMTP transient error: 421 Service not available [message #652804 is a reply to message #652802] Mon, 20 June 2016 03:55 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member
C:\WINDOWS\system32>ping smtp.exmail.qq.com

Pinging smtp.exmail.qq.com [163.177.72.143] with 32 bytes of data:
Reply from 163.177.72.143: bytes=32 time=341ms TTL=50
Reply from 163.177.72.143: bytes=32 time=335ms TTL=50
Reply from 163.177.72.143: bytes=32 time=348ms TTL=50
Reply from 163.177.72.143: bytes=32 time=350ms TTL=50

Ping statistics for 163.177.72.143:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 335ms, Maximum = 350ms, Average = 343ms

Ping is working fine.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652805 is a reply to message #652804] Mon, 20 June 2016 04:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

SMTP server generally works on port 25, try to connect to this port.
telnet smtp.exmail.qq.com:25

Then have you any firewall between (and including) the database and the mail servers?

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652808 is a reply to message #652805] Mon, 20 June 2016 04:14 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member
I'm using VPN, will that be causing any problem? But, even if I turn off the VPN; same error.

Can you please tell me all the files where I need to add SMTP.

[Updated on: Mon, 20 June 2016 04:16]

Report message to a moderator

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652809 is a reply to message #652808] Mon, 20 June 2016 04:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

No, your PL/SQL block is executed on the database server.
This makes me think that you did not execute your "ping" on the database server, didn't you?

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652810 is a reply to message #652809] Mon, 20 June 2016 04:19 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member
I am not using ay other server, working on localhost.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652811 is a reply to message #652810] Mon, 20 June 2016 04:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So you mean your localhost is the database host and your database in on Windows server?

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652812 is a reply to message #652811] Mon, 20 June 2016 04:23 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member
Yes. Exactly
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652813 is a reply to message #652812] Mon, 20 June 2016 04:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Did you try the telnet command?
Have you a firewall between the 2 servers?

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652818 is a reply to message #652813] Mon, 20 June 2016 04:53 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member

telnet smtp.exmail.qq.com

220 smtp.qq.com Esmtp QQ Mail Server


I think it got connected. I disabled the firewall, closed off the VPN as well. But still if I run the command for mail execution, I'm facing the same issue.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #652821 is a reply to message #652818] Mon, 20 June 2016 06:25 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
Your SMTP server is using ESMTP, which means you need to open the conversation with EHLO, not with HELO. If I telnet to it, this works:
220 smtp.qq.com Esmtp QQ Mail Server
ehlo example.com
250-smtp.qq.com
250-PIPELINING
250-SIZE 73400320
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN
250-MAILCOMPRESS
250 8BITMIME
but if I give it helo instead of ehlo, it doesn't. If I'm right, either you have to write your own esmtp compliant code, or you need to ask your mail administrators to permit smtp.

Re: ORA-29278: SMTP transient error: 421 Service not available [message #652848 is a reply to message #652821] Tue, 21 June 2016 01:17 Go to previous messageGo to next message
vasundhra.teotia@hrone.co
Messages: 8
Registered: June 2016
Junior Member
Thanks Michel & John,

I asked my mail administrator to permit SMTP.

[Updated on: Tue, 21 June 2016 01:18]

Report message to a moderator

Re: ORA-29278: SMTP transient error: 421 Service not available [message #653001 is a reply to message #652848] Thu, 23 June 2016 07:41 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
He will also need to enable relay if you are sending to an external email address. However he needs to restrict the relay to internal IP's only.
Re: ORA-29278: SMTP transient error: 421 Service not available [message #653002 is a reply to message #653001] Thu, 23 June 2016 07:51 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
In general, I have made had good experiences with running a local mail-forwarder on the database server ( postfix / sendmail ), and set up forwarding to the "real" mail server.

That way, when glitches/hangs/network problems/planned downtimes that prevent the "real" mail server of the organisation to accept the mail, the mails that are send by my applications don't get lost, but end up in the local mail queue and get send when the problem on the mail server side is fixed.

( Of course that only works when you are not only the DBA but also the administrator of the underlying OS. )

Re: ORA-29278: SMTP transient error: 421 Service not available [message #653005 is a reply to message #653002] Thu, 23 June 2016 08:12 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
+1
Previous Topic: Need Help to convert rows into column
Next Topic: Analytic Report query
Goto Forum:
  


Current Time: Fri Apr 26 08:46:02 CDT 2024