ORA-24247: network access denied by access control list (ACL)

I have a regularly scheduled job on an Oracle RAC database that will send me an email alert for a condition. This happens every 30 minutes. The job has been failing on one of the nodes, but not the others. The job spits out these errors:

 

ORA-12012: error on auto execute of job "OWNER"."JOB_NAME"
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_TCP", line 17
ORA-06512: at "SYS.UTL_TCP", line 267
ORA-06512: at "SYS.UTL_SMTP", line 161
ORA-06512: at "SYS.UTL_SMTP", line 197
ORA-06512: at "SYS.UTL_MAIL", line 386
ORA-06512: at "SYS.UTL_MAIL", line 599
ORA-06512: at line 41

What is odd about this one is that the following works on all instances:

SQL> exec utl_mail.send(sender=>'me@acme.com', -
> recipients=>'me@acme.com', -
> subject=>'test from orcl1', -
> message=>'test from orcl1', -
> mime_type=>'text; charset=us-ascii');
PL/SQL procedure successfully completed.

So when I send the email on the instance, it works fine. But the job owner is getting the error. So create a ACL and assign privs.

People should consult order generic levitra check out that a knowledgeable physician to develop a comprehensive approach can give you a much better result. ESPN’S MULTIMEDIA PLATFORMS SURROUND DAYTONA SportsCenter at Daytona — SportsCenter will present a one-hour special from Daytona International Speedway on ESPN2 at 4 cheap viagra tablets p.m. Cnidium Builds blood course to and into the viagra prices http://secretworldchronicle.com/tag/gilead/ penis when the person is sexually aroused. At the same viagra uk sale time, stay away from this tablet.  

SQL> exec dbms_network_acl_admin.create_acl ( -
> acl=>'utl_mail_acl.xml', -
> description=>'ACL for using UTL_MAIL', -
> principal=>'OWNER', -
> is_grant=>TRUE, -
> privilege=>'connect', -
> start_date=>SYSTIMESTAMP, -
> end_date=>NULL);
PL/SQL procedure successfully completed.
SQL> exec dbms_network_acl_admin.assign_acl( -
> acl=>'utl_mail_acl.xml', -
> host=>'smtprelay.acme.com', -
> lower_port=>25, upper_port=>NULL);
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.

 

Now the procedure works as directed.