You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by 知猪侠 <38...@qq.com> on 2018/10/12 06:55:32 UTC
回复:答复: kylin.job.notification-mail-port is not yet effective
Thanks, your answer has solved my question.
BTW, kylin.job.notification-mail-port is 587, is not 465, or other errors will be reported, like this:
2018-10-12 10:06:56,738 ERROR [Scheduler 270429562 Job 70965db4-24fc-8d68-b978-0fd10bce1781-1166] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:465
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.mxhichina.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2106)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
------------------ 原始邮件 ------------------
发件人: "Na Zhai"<na...@kyligence.io>;
发送时间: 2018年10月12日(星期五) 上午9:44
收件人: "user@kylin.apache.org"<us...@kylin.apache.org>;
主题: 答复: kylin.job.notification-mail-port is not yet effective
Hi,
You can set kylin.job.notification-mail-enable-starttls to false, then the port will be change.
发送自 Windows 10 版邮件应用
发件人: 知猪侠 <38...@qq.com>
发送时间: Thursday, October 11, 2018 11:10:34 AM
收件人: user
主题: kylin.job.notification-mail-port is not yet effective
My kylin version is 2.5.0 cdh57, I wanted to use email notify function, my configuration is: kylin.job.notification-enabled=true
kylin.job.notification-mail-enable-starttls=true
kylin.job.notification-mail-host=smtp.mxhichina.com
kylin.job.notification-mail-port=465
But when the job was finished, the email was not sent out, so I went to check the logs, I encountered the following error:
2018-10-11 10:08:01,482 ERROR [Scheduler 717511469 Job 4bbef30e-7a51-0c79-54c4-72bf61857cd5-582] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:25
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.mxhichina.com, 25; timeout 60000;
nested exception is:
java.net.SocketTimeoutException: connect timed out
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2118)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:329)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2084)
... 22 more
I don't know why I have configured kylin.job.notification-mail-port 465, but the program is still 25?
Thank you!
回复:答复: 回复:答复: kylin.job.notification-mail-port is not yet effective
Posted by 知猪侠 <38...@qq.com>.
Hi, Na Zhai
When I changed port 465 to 587, the email was sent successfully, thank you.
Maybe my last email wasn't clear enough, I mean the port I started with was 465, it can't send email.
But I changed port to 587, it can send email.
My english is not very good, so the expression is not very clear.
------------------ 原始邮件 ------------------
发件人: "Na Zhai"<na...@kyligence.io>;
发送时间: 2018年10月12日(星期五) 下午5:50
收件人: "user@kylin.apache.org"<us...@kylin.apache.org>;
主题: 答复: 回复:答复: kylin.job.notification-mail-port is not yet effective
Hi, 知猪侠
I can send email successful with smtp.126.com or smtp.sina.com. Can you provide more information? I do some search about this. You can use the following command to check if Port 587 is blocked or not.
telnet smtp.mxhichina.com 587
发送自 Windows 10 版邮件应用
发件人: 知猪侠
发送时间: 2018年10月12日 14:56
主题: 回复:答复: kylin.job.notification-mail-port is not yet effective
Thanks, your answer has solved my question.
BTW, kylin.job.notification-mail-port is 587, is not 465, or other errors will be reported, like this:
2018-10-12 10:06:56,738 ERROR [Scheduler 270429562 Job 70965db4-24fc-8d68-b978-0fd10bce1781-1166] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:465
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.mxhichina.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2106)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
------------------ 原始邮件 ------------------
发件人: "Na Zhai"<na...@kyligence.io>;
发送时间: 2018年10月12日(星期五) 上午9:44
收件人: "user@kylin.apache.org"<us...@kylin.apache.org>;
主题: 答复: kylin.job.notification-mail-port is not yet effective
Hi,
You can set kylin.job.notification-mail-enable-starttls to false, then the port will be change.
发送自 Windows 10 版邮件应用
发件人: 知猪侠 <38...@qq.com>
发送时间: Thursday, October 11, 2018 11:10:34 AM
收件人: user
主题: kylin.job.notification-mail-port is not yet effective
My kylin version is 2.5.0 cdh57, I wanted to use email notify function, my configuration is:
kylin.job.notification-enabled=true
kylin.job.notification-mail-enable-starttls=true
kylin.job.notification-mail-host=smtp.mxhichina.com
kylin.job.notification-mail-port=465
But when the job was finished, the email was not sent out, so I went to check the logs, I encountered the following error:
2018-10-11 10:08:01,482 ERROR [Scheduler 717511469 Job 4bbef30e-7a51-0c79-54c4-72bf61857cd5-582] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:25
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.mxhichina.com, 25; timeout 60000;
nested exception is:
java.net.SocketTimeoutException: connect timed out
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2118)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:329)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2084)
... 22 more
I don't know why I have configured kylin.job.notification-mail-port 465, but the program is still 25?
Thank you!
答复: 回复:答复: kylin.job.notification-mail-port is not yet effective
Posted by Na Zhai <na...@kyligence.io>.
Hi, 知猪侠
I can send email successful with smtp.126.com or smtp.sina.com. Can you provide more information? I do some search about this. You can use the following command to check if Port 587 is blocked or not.
telnet smtp.mxhichina.com 587
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
发件人: 知猪侠<ma...@qq.com>
发送时间: 2018年10月12日 14:56
主题: 回复:答复: kylin.job.notification-mail-port is not yet effective
Thanks, your answer has solved my question.
BTW, kylin.job.notification-mail-port is 587, is not 465, or other errors will be reported, like this:
2018-10-12 10:06:56,738 ERROR [Scheduler 270429562 Job 70965db4-24fc-8d68-b978-0fd10bce1781-1166] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:465
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.mxhichina.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2106)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
------------------ 原始邮件 ------------------
发件人: "Na Zhai"<na...@kyligence.io>;
发送时间: 2018年10月12日(星期五) 上午9:44
收件人: "user@kylin.apache.org"<us...@kylin.apache.org>;
主题: 答复: kylin.job.notification-mail-port is not yet effective
Hi,
You can set kylin.job.notification-mail-enable-starttls to false, then the port will be change.
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
发件人: 知猪侠 <38...@qq.com>
发送时间: Thursday, October 11, 2018 11:10:34 AM
收件人: user
主题: kylin.job.notification-mail-port is not yet effective
My kylin version is 2.5.0 cdh57, I wanted to use email notify function, my configuration is:
kylin.job.notification-enabled=true
kylin.job.notification-mail-enable-starttls=true
kylin.job.notification-mail-host=smtp.mxhichina.com
kylin.job.notification-mail-port=465
But when the job was finished, the email was not sent out, so I went to check the logs, I encountered the following error:
2018-10-11 10:08:01,482 ERROR [Scheduler 717511469 Job 4bbef30e-7a51-0c79-54c4-72bf61857cd5-582] util.MailService:121 : Sending the email to the following server failed : smtp.mxhichina.com:25
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.mxhichina.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:117)
at org.apache.kylin.common.util.MailService.sendMail(MailService.java:72)
at org.apache.kylin.job.execution.AbstractExecutable.doSendMail(AbstractExecutable.java:347)
at org.apache.kylin.job.execution.AbstractExecutable.notifyUserStatusChange(AbstractExecutable.java:320)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onStatusChange(DefaultChainedExecutable.java:153)
at org.apache.kylin.engine.mr.CubingJob.onStatusChange(CubingJob.java:268)
at org.apache.kylin.job.execution.DefaultChainedExecutable.onExecuteFinished(DefaultChainedExecutable.java:134)
at org.apache.kylin.engine.mr.CubingJob.onExecuteFinished(CubingJob.java:264)
at org.apache.kylin.job.execution.AbstractExecutable.onExecuteFinishedWithRetry(AbstractExecutable.java:98)
at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:181)
at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.mxhichina.com, 25; timeout 60000;
nested exception is:
java.net.SocketTimeoutException: connect timed out
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2118)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 15 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:329)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2084)
... 22 more
I don't know why I have configured kylin.job.notification-mail-port 465, but the program is still 25?
Thank you!