[
https://issues.apache.org/jira/browse/OOZIE-1734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951133#comment-13951133
]
Robert Kanter commented on OOZIE-1734:
--------------------------------------
The patch makes looks good. Though when I tested it out, you don't get any
useful information about why the request was bad. With the 500 error, you at
least get a stack trace and en exception message (e.g. "id cannot be empty).
Now, it looks like below:
Can you try to get the error message and stack trace back? Otherwise it's now
harder to figure out what was wrong with the request.
Also, can you rebase the patch against trunk ("master" branch)?
----
> [20] 10:47 : oozie (master) :: curl --request GET
> http://localhost:11000/oozie/v1/job/?show=info
<html><head><title>Apache Tomcat/6.0.37 - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 400 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The request sent by the client was
syntactically incorrect.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/6.0.37</h3></body></html>
> Oozie returned 500 Internal Server error when user passes invalid request
> -------------------------------------------------------------------------
>
> Key: OOZIE-1734
> URL: https://issues.apache.org/jira/browse/OOZIE-1734
> Project: Oozie
> Issue Type: Bug
> Components: core
> Affects Versions: 3.3.2, 4.0.0
> Reporter: Chelsey Chang
> Assignee: Chelsey Chang
> Attachments: OOZIE-182-bigwheel-GA-4.0.0-v2.patch,
> OOZIE-182-bigwheel-GA-4.0.0-v3.patch, OOZIE-182-condor-3.3.2-v2.patch,
> OOZIE-182-condor-3.3.2-v3.patch
>
>
> We should return 400 Bad request in this case since its a user error.
> C:\ServiceCode\Main\src>curl -k -g --request PUT -d user.name=hdinsightuser
> -u "<username>:<password>" "<clusterUrl>/oozie/v1/job/?action=kill"
> <html><head><title>Apache Tomcat/6.0.36 - Error report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2
> {font-family:Tahoma,Arial,sans
> -serif;color:white;background-color:#525D76;font-size:16px;}
> H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY
> {font-family:Tahoma,Arial,sans-serif;col or:black;background-color:white;}
> B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
> A
> {c olor : black;}
> A.name
> {color : black;}
> HR
> {color : #525D76;}
> --></style> </head><body><h1>HTTP Status 500 - id cannot be empty</h1><HR
> size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>
> message</b> <u>id cannot be empty</u></p><p><b>description</b> <u>The server
> encountered an internal error that prevented it from fulfilling this
> request.</u></p><p><b>exception</b> <pre>java.lang.Ill
> egalArgumentException: id cannot be empty
> org.apache.oozie.util.ParamChecker.notEmpty(ParamChecker.java:87)
> org.apache.oozie.util.ParamChecker.notEmpty(ParamChecker.java:71)
> org.apache.oozie.command.coord.CoordKillXCommand.<init>(CoordKillXCommand.java:58)
> org.apache.oozie.CoordinatorEngine.kill(CoordinatorEngine.java:174)
> org.apache.oozie.servlet.V1JobServlet.killCoordinatorJob(V1JobServlet.java:482)
> org.apache.oozie.servlet.V1JobServlet.killJob(V1JobServlet.java:152)
> org.apache.oozie.servlet.BaseJobServlet.doPut(BaseJobServlet.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
> org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:286)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:126)
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:384)
> org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:131)
> org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:84)
> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
> available in the Apache Tomcat/6.0.36 logs.</u></p><HR size="1"
> noshade="noshade"><h3>Apache Tomcat/6.0.36</h3></body></html>
--
This message was sent by Atlassian JIRA
(v6.2#6252)