Hi,

I am new to Knox. I am trying add a simple application service to my default 
Knox topology. Here’s what my service definition looks like:

<service role=“TESTAPP" name=“testapp" version="0.0.1">

    <routes>

        <route path="/app/**">

        </route>

        <route path="/app/api2">

        </route>

    </routes>

    <dispatch 
classname="org.apache.hadoop.gateway.dispatch.PassAllHeadersDispatch"/>

</service>


Rewrite.xml has rules:

<rules>

    <rule dir="IN" name=“TESTAPP/testapp/inbound/path" 
pattern="*://*:*/**/app/{**}">

        <rewrite template="{$serviceUrl[TESTAPP]}/app/{**}"/>

    </rule>

</rules>


I have added my service definition in Knox default topology:
<service>
                <role>TESTAPP</role>
                <url>http://19.2.168.154.194:8080</url>
            </service>

Now when I try to access my service through Knox gateway on web browser, using 
url:
https://192.168.154.194:8443/gateway/default/app/api1#/visualize?_g=<https://192.168.154.194:8443/gateway/default/app/testapp#/visualize?_g=>()

Its not working. Knox gateway.log says: 2018-05-22 18:59:42,056 WARN  
hadoop.gateway (GatewayFilter.java:doFilter(162)) - Failed to match path 
/app/api1

Can someone tell me whats the issue here?

Thanks,
Rajat

Reply via email to