[
https://issues.apache.org/jira/browse/OOZIE-3397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722177#comment-16722177
]
Andras Salamon commented on OOZIE-3397:
---------------------------------------
I've tested several errors using the amend patch:
Invalid protocol
{noformat}
2018-12-15 13:45:53,467 WARN WorkflowNotificationXCommand:523 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000001-181215133935787-oozie-andr-W] ACTION[] Notification sending to URL
[invalidproto://invalidproto] failed
java.net.MalformedURLException: unknown protocol: invalidproto
at java.net.URL.<init>(URL.java:600)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at
org.apache.oozie.command.NotificationXCommand.sendNotification(NotificationXCommand.java:112)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:61)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:29)
at org.apache.oozie.command.XCommand.call(XCommand.java:291)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:210)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}
Unknown host:
{noformat}
2018-12-15 13:45:05,507 WARN WorkflowNotificationXCommand:523 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000000-181215133935787-oozie-andr-W] ACTION[] Notification sending to URL
[http://thisisawrongurl] failed
java.net.UnknownHostException: thisisawrongurl
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at
org.apache.oozie.command.NotificationXCommand.sendNotification(NotificationXCommand.java:118)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:61)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:29)
at org.apache.oozie.command.XCommand.call(XCommand.java:291)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:210)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}
Working URL, which gives us response code 403 (instead of the expected 200):
{noformat}
2018-12-15 13:46:38,606 WARN WorkflowNotificationXCommand:523 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000002-181215133935787-oozie-andr-W] ACTION[] Notification sending to URL
[https://httpstat.us/403]
failed. response code: [403], response message: [Forbidden]
{noformat}
Good URL, which gives us a correct response code after 30 seconds, which is
greater than the 10 seconds timeout:
{noformat}
2018-12-15 14:00:33,902 WARN WorkflowNotificationXCommand:523 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000003-181215135150667-oozie-andr-W] ACTION[] Notification sending to URL
[https://httpstat.us/200?sleep=30000] failed
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
at
org.apache.oozie.command.NotificationXCommand.sendNotification(NotificationXCommand.java:118)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:61)
at
org.apache.oozie.command.NotificationXCommand.execute(NotificationXCommand.java:29)
at org.apache.oozie.command.XCommand.call(XCommand.java:291)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:210)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}
Finally, two working notifications:
A good (and fast) notification:
{noformat}
2018-12-15 13:53:08,511 DEBUG WorkflowNotificationXCommand:526 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000001-181215135150667-oozie-andr-W] ACTION[] Notification sent to
[https://httpstat.us/200]
{noformat}
A good (slow, but faster than the 10 seconds timeout) notification:
{noformat}
2018-12-15 14:18:15,490 DEBUG WorkflowNotificationXCommand:526 -
SERVER[SalamonAndras-MBP15.local] USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000004-181215135150667-oozie-andr-W] ACTION[] Notification sent to
[https://httpstat.us/200?sleep=4000]
{noformat}
[~kmarton] [~andras.piros] Any other ideas for notification URLs to test?
> Improve logging in NotificationXCommand
> ---------------------------------------
>
> Key: OOZIE-3397
> URL: https://issues.apache.org/jira/browse/OOZIE-3397
> Project: Oozie
> Issue Type: Improvement
> Components: core
> Affects Versions: trunk
> Reporter: Julia Kinga Marton
> Assignee: Andras Salamon
> Priority: Major
> Fix For: 5.2.0
>
> Attachments: OOZIE-3397-amend-01-01.patch, OOZIE-3397.001.patch,
> OOZIE-3397.002.patch
>
>
> Around the notification sending (NotificationXCommand) there is not so much
> logging. For example if the HTTP call fails, the error is suppressed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)