You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by wenxing zheng <we...@gmail.com> on 2016/12/20 09:37:29 UTC

Failed to create a Link by REST API

Dear all,

I tried to POST to the /sqoop/v1/link with the data in JSON attached, but I
met with an issue in trying to create a Link via the REST API, please
advice what's the problem here with the call stack below:

org.apache.sqoop.common.SqoopException: SERVER_0003:Invalid HTTP request -
> Detected incorrect link config structure
>         at
> org.apache.sqoop.handler.LinkRequestHandler.createUpdateLink(LinkRequestHandler.java:143)
>         at
> org.apache.sqoop.handler.LinkRequestHandler.handleEvent(LinkRequestHandler.java:65)
>         at
> org.apache.sqoop.server.v1.LinkServlet.handlePostRequest(LinkServlet.java:71)
>         at
> org.apache.sqoop.server.SqoopProtocolServlet.doPost(SqoopProtocolServlet.java:65)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>         at
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:615)
>         at
> org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:277)
>         at
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>         at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>         at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>         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)


Another question is about the password for the Link, since it's in
sensitive, then how to pass the password to the REST API?

Thanks for any advice
Regards, Wenxing

Re: Failed to create a Link by REST API

Posted by wenxing zheng <we...@gmail.com>.
Sorry for missing the Sqoop2 version: 1.99.7

On Tue, Dec 20, 2016 at 5:37 PM, wenxing zheng <we...@gmail.com>
wrote:

> Dear all,
>
> I tried to POST to the /sqoop/v1/link with the data in JSON attached, but
> I met with an issue in trying to create a Link via the REST API, please
> advice what's the problem here with the call stack below:
>
> org.apache.sqoop.common.SqoopException: SERVER_0003:Invalid HTTP request
>> - Detected incorrect link config structure
>>         at org.apache.sqoop.handler.LinkRequestHandler.createUpdateLink(
>> LinkRequestHandler.java:143)
>>         at org.apache.sqoop.handler.LinkRequestHandler.handleEvent(
>> LinkRequestHandler.java:65)
>>         at org.apache.sqoop.server.v1.LinkServlet.handlePostRequest(
>> LinkServlet.java:71)
>>         at org.apache.sqoop.server.SqoopProtocolServlet.doPost(
>> SqoopProtocolServlet.java:65)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>         at org.eclipse.jetty.servlet.ServletHolder.handle(
>> ServletHolder.java:808)
>>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>> doFilter(ServletHandler.java:1669)
>>         at org.apache.hadoop.security.authentication.server.
>> AuthenticationFilter.doFilter(AuthenticationFilter.java:615)
>>         at org.apache.hadoop.security.token.delegation.web.
>> DelegationTokenAuthenticationFilter.doFilter(
>> DelegationTokenAuthenticationFilter.java:277)
>>         at org.apache.hadoop.security.authentication.server.
>> AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
>>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>> doFilter(ServletHandler.java:1652)
>>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> ServletHandler.java:585)
>>         at org.eclipse.jetty.server.handler.ContextHandler.
>> doHandle(ContextHandler.java:1127)
>>         at org.eclipse.jetty.servlet.ServletHandler.doScope(
>> ServletHandler.java:515)
>>         at org.eclipse.jetty.server.handler.ContextHandler.
>> doScope(ContextHandler.java:1061)
>>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:141)
>>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>         at org.eclipse.jetty.server.HttpChannel.handle(
>> HttpChannel.java:310)
>>         at org.eclipse.jetty.server.HttpConnection.onFillable(
>> HttpConnection.java:257)
>>         at org.eclipse.jetty.io.AbstractConnection$2.run(
>> AbstractConnection.java:540)
>>         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)
>
>
> Another question is about the password for the Link, since it's in
> sensitive, then how to pass the password to the REST API?
>
> Thanks for any advice
> Regards, Wenxing
>