Thanks Larry! On Wednesday, November 30, 2016 3:45 PM, larry mccay <lmc...@apache.org> wrote:
I see what's going on.This is going to take some time to debug and get a fix in place. Thanks for reporting this Mohammad! On Tue, Nov 29, 2016 at 10:07 PM, larry mccay <lmc...@apache.org> wrote: Thanks for the note, Mohammad. Let me play around with it and see what is going on there.Will probably get back to you tomorrow about it. On Tue, Nov 29, 2016 at 8:02 PM, Mohammad Islam <misla...@yahoo.com> wrote: Hi, I set "default.app.topology.name" in gateway-site.xml to "uber" (my default topology name). It worked fine if I gave the full URL. The command looks like this "curl http://<KNOX_GW_URL>/gateway/ uber/webhdfs/v1/?op=GETHOMEDIR ECTORY'". However, when I tried with command "curl http://<KNOX_GW_URL>/webhdfs/ v1/?op=GETHOMEDIRECTORY'". I got the HTTP error code 500. I looked into gateway.log file and found quite a few error related to rewrite. The exact error messages are shown below: Error message 2016-11-30 00:39:51,565 ERROR hadoop.gateway (UrlRewriteProcessor.java:rewr ite(169)) - Failed to rewrite URL: http://<KNOX_GW_URL>/webhdfs/v 1/?op=GETHOMEDIRECTORY, direction: IN via rule: WEBHDFS/webhdfs/inbound/nameno de/root, status: FAILURE2016-11-30 00:39:51,565 ERROR hadoop.gateway (UrlRewriteProcessor.java:rewr ite(169)) - Failed to rewrite URL: http://<KNOX_GW_URL>/webhdfs/v 1/?op=GETHOMEDIRECTORY, direction: IN via rule: WEBHDFS/webhdfs/inbound/nameno de/root, status: FAILURE After that, I modified the webhdfs/2.4.0/rewrite.xml by rewriting the following pattern and it worked for short URL but long URL faces the same issue. Original: <rule dir="IN" name="WEBHDFS/webhdfs/inbound/ namenode/root" pattern="*://*:*/**/webhdfs/{v ersion}/?{**}"> <rewrite template="{$serviceUrl[WEBHDFS ]}/{version}/?{**}"/> </rule> Modified : <rule dir="IN" name="WEBHDFS/webhdfs/inbound/ namenode/root" pattern="*://*:*/webhdfs/{vers ion}/?{**}"> <rewrite template="{$serviceUrl[WEBHDFS ]}/{version}/?{**}"/> </rule> Overall, the rewrite pattern may be the issue. We will need to support for both short and long URL. May be, we can add multiple rewrite rules for each route in service.xml.Is there any other cleaner way which may work for all cases such as webhdfs, yarn, hive, UIs etc? Regards,Mohammad