Support Questions
Find answers, ask questions, and share your expertise

Getting 404 when accessing url

New Contributor

I am considering knox as a gateway for some of my custom services . I have not installed hdfs . I downloaded knox unzipped it . when trying to access the weather service or the admin services i am getting a 404. Logs from the gateway.log are below.Please help. I have followed this url https://cwiki.apache.org/confluence/display/KNOX/2015/12/17/Adding+a+service+to+Apache+Knox to configure the weather services. I wanted to check if it works with Basic authentication and hence my toplogy (sandbox.xml is below ( removed the providers )

Topology

---------------

<topology>
<service>
<role>STORM</role>
<url>http://localhost:8080</url>
</service>
<service>
<role>WEATHER</role>
<url>http://api.openweathermap.org:80</url>
</service>
</topology>

My Curl for the weather service is as follows :

curl -ku username:mypassword 'https://localhost:8443/gateway/sandbox/weather/data/2.5/forecast/daily?id=524901'

My url for admin services is as follows :

curl -ku username:mypassword 'https://localhost:8443/gateway/admin/api/v1/topologies'


For both the requests I am getting the following log entries with 404

:019-04-11 08:18:20,155 DEBUG http.HttpParser (HttpParser.java:parseNext(1232)) - parseNext s=START HeapByteBuffer@5054e4e[p=0,l=145,c=17408,r=145]={<<>>.58.0\r\nAccept: */...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00} 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - START --> SPACE1 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - SPACE1 --> URI 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - URI --> SPACE2 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - SPACE2 --> REQUEST_VERSION 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - REQUEST_VERSION --> HEADER 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER --> HEADER_VALUE 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_VALUE --> HEADER_IN_VALUE 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_IN_VALUE --> HEADER 2019-04-11 08:18:20,160 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER --> HEADER_VALUE 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_VALUE --> HEADER_IN_VALUE 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_IN_VALUE --> HEADER 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER --> HEADER_VALUE 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_VALUE --> HEADER_IN_VALUE 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_IN_VALUE --> HEADER 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER --> HEADER_IN_VALUE 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER_IN_VALUE --> HEADER 2019-04-11 08:18:20,161 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - HEADER --> END 2019-04-11 08:18:20,161 DEBUG server.HttpChannel (HttpChannel.java:messageComplete(705)) - HttpChannelOverHttp@4e934f2b{r=1,c=false,a=IDLE,uri=/gateway/admin/api/v1/version} messageComplete 2019-04-11 08:18:20,162 DEBUG server.HttpInput (HttpInput.java:messageComplete(272)) - HttpInputOverHTTP@7d80e198 EOF 2019-04-11 08:18:20,162 DEBUG server.HttpChannel (HttpChannel.java:handle(272)) - HttpChannelOverHttp@4e934f2b{r=1,c=false,a=IDLE,uri=/gateway/admin/api/v1/version} handle enter 2019-04-11 08:18:20,162 DEBUG server.HttpChannelState (HttpChannelState.java:handling(174)) - HttpChannelState@4e16c2f2{s=IDLE i=true a=null} handling IDLE 2019-04-11 08:18:20,163 DEBUG server.HttpChannel (HttpChannel.java:handle(296)) - HttpChannelOverHttp@4e934f2b{r=1,c=false,a=DISPATCHED,uri=/gateway/admin/api/v1/version} action REQUEST_DISPATCH 2019-04-11 08:18:20,163 DEBUG server.Server (Server.java:handle(488)) - REQUEST GET /gateway/admin/api/v1/version on HttpChannelOverHttp@4e934f2b{r=1,c=false,a=DISPATCHED,uri=/gateway/admin/api/v1/version} 2019-04-11 08:18:20,163 DEBUG server.Server (Server.java:handle(502)) - RESPONSE /gateway/admin/api/v1/version 200 handled=false 2019-04-11 08:18:20,163 DEBUG server.HttpChannelState (HttpChannelState.java:unhandle(289)) - HttpChannelState@4e16c2f2{s=DISPATCHED i=true a=null} unhandle DISPATCHED 2019-04-11 08:18:20,164 DEBUG server.HttpConnection (HttpConnection.java:process(657)) - org.eclipse.jetty.server.HttpConnection$SendCallback@79bf7af0[PROCESSING][i=ResponseInfo{HTTP/1.1 404 null,306,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@3cbdeba3] generate: NEED_HEADER (null,[p=0,l=306,c=2048,r=306],true)@START 2019-04-11 08:18:20,164 DEBUG server.HttpConnection (HttpConnection.java:process(657)) - org.eclipse.jetty.server.HttpConnection$SendCallback@79bf7af0[PROCESSING][i=ResponseInfo{HTTP/1.1 404 null,306,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@3cbdeba3] generate: FLUSH ([p=0,l=212,c=8192,r=212],[p=0,l=306,c=2048,r=306],true)@COMPLETING 2019-04-11 08:18:20,164 DEBUG io.WriteFlusher (WriteFlusher.java:write(295)) - write: WriteFlusher@d4b95fb{IDLE} [HeapByteBuffer@5153d75b[p=0,l=212,c=8192,r=212]={<<>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00},HeapByteBuffer@773d26a5[p=0,l=306,c=2048,r=306]={<<<\n\n\n\n>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}] 2019-04-11 08:18:20,165 DEBUG io.WriteFlusher (WriteFlusher.java:updateState(118)) - update WriteFlusher@d4b95fb{WRITING}:IDLE-->WRITING 2019-04-11 08:18:20,166 DEBUG ssl.SslConnection (SslConnection.java:flush(716)) - SslConnection@45a39bf8{NOT_HANDSHAKING,eio=-1/-1,di=-1} -> HttpConnection@25f743d3[FILLING,DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,W,69/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,14/300000,SslConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=END,0 of 0},g=HttpGenerator{s=COMPLETING},c=HttpChannelOverHttp@4e934f2b{r=1,c=true,a=COMPLETED,uri=/gateway/admin/api/v1/version}] flush enter [java.nio.HeapByteBuffer[pos=0 lim=212 cap=8192], java.nio.HeapByteBuffer[pos=0 lim=306 cap=2048]] 2019-04-11 08:18:20,166 DEBUG ssl.SslConnection (SslConnection.java:flush(747)) - SslConnection@45a39bf8{NOT_HANDSHAKING,eio=-1/547,di=-1} -> HttpConnection@25f743d3[FILLING,DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,W,70/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,15/300000,SslConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=END,0 of 0},g=HttpGenerator{s=COMPLETING},c=HttpChannelOverHttp@4e934f2b{r=1,c=true,a=COMPLETED,uri=/gateway/admin/api/v1/version}] wrap Status = OK HandshakeStatus = NOT_HANDSHAKING bytesConsumed = 518 bytesProduced = 547 2019-04-11 08:18:20,167 DEBUG ssl.SslConnection (SslConnection.java:flush(786)) - DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,W,71/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,16/300000,SslConnection}{io=0,kio=0,kro=1} OK HeapByteBuffer@53ad451[p=0,l=547,c=17408,r=547]={<<<\x17\x03\x03\x02\x1e\x00\x00\x00\x00\x00\x00\x00\x01\x9a\xE7\xB7f...\x85S\xD6\x82\xEev\xE9*\x80\x1c\x03\x9b\x98\xFc\x84>>>\x8e\rJ[\xB0\xB3\xA9\xB5\x8c\xA4\x10\xA3\xFc3\xF4\xFd\x9a...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00} 2019-04-11 08:18:20,169 DEBUG io.ChannelEndPoint (ChannelEndPoint.java:flush(188)) - flushed 547 SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,18/300000,SslConnection}{io=0,kio=0,kro=1} 2019-04-11 08:18:20,169 DEBUG ssl.SslConnection (SslConnection.java:flush(856)) - SslConnection@45a39bf8{NOT_HANDSHAKING,eio=-1/0,di=-1} -> HttpConnection@25f743d3[FILLING,DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,W,73/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,0/300000,SslConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=END,0 of 0},g=HttpGenerator{s=COMPLETING},c=HttpChannelOverHttp@4e934f2b{r=1,c=true,a=COMPLETED,uri=/gateway/admin/api/v1/version}] flush exit, consumed 518 2019-04-11 08:18:20,169 DEBUG io.WriteFlusher (WriteFlusher.java:updateState(118)) - update WriteFlusher@d4b95fb{IDLE}:WRITING-->IDLE 2019-04-11 08:18:20,169 DEBUG server.HttpConnection (HttpConnection.java:process(657)) - org.eclipse.jetty.server.HttpConnection$SendCallback@79bf7af0[PROCESSING][i=ResponseInfo{HTTP/1.1 404 null,306,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@3cbdeba3] generate: DONE ([p=212,l=212,c=8192,r=0],[p=306,l=306,c=2048,r=0],true)@END 2019-04-11 08:18:20,169 DEBUG http.HttpParser (HttpParser.java:reset(1563)) - reset HttpParser{s=END,0 of 0} 2019-04-11 08:18:20,169 DEBUG http.HttpParser (HttpParser.java:setState(1587)) - END --> START 2019-04-11 08:18:20,170 DEBUG server.HttpChannel (HttpChannel.java:handle(448)) - HttpChannelOverHttp@4e934f2b{r=1,c=false,a=IDLE,uri=} handle exit, result COMPLETE 2019-04-11 08:18:20,170 DEBUG ssl.SslConnection (SslConnection.java:fill(481)) - SslConnection@45a39bf8{NOT_HANDSHAKING,eio=-1/-1,di=-1} -> HttpConnection@25f743d3[FILLING,DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,-,74/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,1/300000,SslConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator{s=START},c=HttpChannelOverHttp@4e934f2b{r=1,c=false,a=IDLE,uri=}] fill enter 2019-04-11 08:18:20,170 DEBUG io.ChannelEndPoint (ChannelEndPoint.java:fill(142)) - filled 31 SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,1/300000,SslConnection}{io=0,kio=0,kro=1} 2019-04-11 08:18:20,170 DEBUG ssl.SslConnection (SslConnection.java:fill(509)) - SslConnection@45a39bf8{NOT_HANDSHAKING,eio=31/-1,di=-1} -> HttpConnection@25f743d3[FILLING,DecryptedEndPoint@5837007d{/127.0.0.1:47092<->8443,Open,in,out,-,-,74/300000,HttpConnection}->SelectChannelEndPoint@3dd0ae1{/127.0.0.1:47092<->8443,Open,in,out,-,-,0/300000,SslConnection}{io=0,kio=0,kro=1}][p=HttpParser{s=START,0 of -1},g=HttpGenerator{s=START},c=HttpChannelOverHttp@4e934f2b{r=1,c=false,a=IDLE,uri=}] filled 31 encrypted bytes 2019-04-11 08:18:20,171 DEBUG ssl.SslConnection (SslCon

0 REPLIES 0