Reply
Expert Contributor
Posts: 162
Registered: ‎07-29-2013

Cloudera Manager forces me to input non mandatory properties for Oozie service

I supose it's general problem, related yo any configurable service.

Hi, we are using CDH 4.4.+ SCM 4.7.2

 

We don't need any email properties in oozie-site.xml

You can inspect "vanilla" (CDH installed from RPMs) oozie-site.xml and ooozie-defaul.xml and see that there are no properties related to email server interaction.

 

Cloudera manager does provide default values for these props and there is no way to put them away.

Oozie Email Action SMTP Port 
oozie.email.smtp.port

 

Cloudera manager forces me to fill in this field (long value, >0). But I don't need it and I don't want it for my test environment.

 

The same for these proprties: They are absent in "vanilla" oozie-site.xml (CDH installed from RPMs).

 

Problem: if there are no settings for email, then oozie email action is ignored. It's ok for end-2-end tests. I don't need to test my email server infrastructure.

I do put real email server settings on production cluster and email action does send email using email server settings from oozie-site.xml

Right now Cloudera Manager forces me to setup email intercatino for test environment.

 

 <property>
    <name>oozie.email.smtp.host</name>
    <value></value>
  </property>
  <property>
    <name>oozie.email.smtp.port</name>
    <value>1</value><!-- Cloudera Manager validation forced me to input dummy value-->
  </property>
  <property>
    <name>oozie.email.from.address</name>
    <value></value>
  </property>
  <property>
    <name>oozie.email.smtp.auth</name>
    <value>false</value>
  </property>

Expert Contributor
Posts: 162
Registered: ‎07-29-2013

Re: Cloudera Manager forces me to input non mandatory properties for Oozie service

Sorry, forgot to attach logs.

Here they are:

ng action [report-email]. ErrorType [ERROR], ErrorCode [EM007], Message [EM007: Encountered an error while sending the email message over SMTP.]
org.apache.oozie.action.ActionExecutorException: EM007: Encountered an error while sending the email message over SMTP.
	at org.apache.oozie.action.email.EmailActionExecutor.email(EmailActionExecutor.java:181)
	at org.apache.oozie.action.email.EmailActionExecutor.validateAndMail(EmailActionExecutor.java:110)
	at org.apache.oozie.action.email.EmailActionExecutor.start(EmailActionExecutor.java:70)
	at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:211)
	at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:59)
	at org.apache.oozie.command.XCommand.call(XCommand.java:277)
	at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:326)
	at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:255)
	at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 1;
  nested exception is:
	java.net.ConnectException: Connection refused
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
	at javax.mail.Service.connect(Service.java:275)
	at javax.mail.Service.connect(Service.java:156)
	at javax.mail.Service.connect(Service.java:105)
	at javax.mail.Transport.send0(Transport.java:168)
	at javax.mail.Transport.send(Transport.java:98)
	at org.apache.oozie.action.email.EmailActionExecutor.email(EmailActionExecutor.java:177)
	... 11 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:529)
	at java.net.Socket.connect(Socket.java:478)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
	... 18 more

If you remove all props related to email server, than it just works and doesn't fail on email action.