[ 
https://issues.apache.org/jira/browse/STORM-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14110381#comment-14110381
 ] 

Parth Brahmbhatt commented on STORM-439:
----------------------------------------

I have opened up an issue https://github.com/allmarkedup/purl/issues/86 for 
fixing the purl.js bug in the purl.js repo.  

In the mean time I have started using an alternative library, jquery's url 
plugin http://plugins.jquery.com/url/.

I found a bug on the server side code due to which we were double decoding the 
url params. Once during clout.core's CompiledRoute method and then in our 
ui/core.clj in all the Get and Post methods. This bug again results in the same 
effect as the bug in purl.js. I have removed the decoding from core.clj. Please 
let me know if you want me to open a separate issue for the bug.

As we are using mustache templates with anchor tags there is no way to encode 
topologyids on client side without either moving away from mustache or 
replacing all anchor tags with some jquery onclick binding. If we just send the 
encoded id's back to client then both, the anchor tag and the user's display 
text, appears encoded. To overcome this I had to update the response on the 
server side to include both the encoded and normal ids. 

I have tested the ui locally with topology name = 
destination%@#$^*-_=+backfill. I will send a pull request shortly. 


> UI unable to view topologies with percent encoded values in id
> --------------------------------------------------------------
>
>                 Key: STORM-439
>                 URL: https://issues.apache.org/jira/browse/STORM-439
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>            Reporter: Bryan Baugher
>            Assignee: Sriharsha Chintalapani
>
> We recently upgraded to 0.9.2 from 0.8.2 or so. One of our topologies had a 
> percent encoded value in the id 'destination%F5backfill' (or interpreted 
> 'destination_backfill'). The UI is unable to view this topology giving us the 
> error,
> {code}
> NotAliveException(msg:destination_backfill-2-1407261676)
> at 
> backtype.storm.generated.Nimbus$getTopologyInfo_result.read(Nimbus.java:11347)
>       at org.apache.thrift7.TServiceClient.receiveBase(TServiceClient.java:78)
>       at 
> backtype.storm.generated.Nimbus$Client.recv_getTopologyInfo(Nimbus.java:491)
>       at 
> backtype.storm.generated.Nimbus$Client.getTopologyInfo(Nimbus.java:478)
>       at backtype.storm.ui.core$topology_page.invoke(core.clj:587)
>       at backtype.storm.ui.core$fn__8229.invoke(core.clj:796)
>       at compojure.core$make_route$fn__3365.invoke(core.clj:93)
>       at compojure.core$if_route$fn__3353.invoke(core.clj:39)
>       at compojure.core$if_method$fn__3346.invoke(core.clj:24)
>       at compojure.core$routing$fn__3371.invoke(core.clj:106)
>       at clojure.core$some.invoke(core.clj:2443)
>       at compojure.core$routing.doInvoke(core.clj:106)
>       at clojure.lang.RestFn.applyTo(RestFn.java:139)
>       at clojure.core$apply.invoke(core.clj:619)
>       at compojure.core$routes$fn__3375.invoke(core.clj:111)
>       at ring.middleware.reload$wrap_reload$fn__7540.invoke(reload.clj:14)
>       at backtype.storm.ui.core$catch_errors$fn__8268.invoke(core.clj:858)
>       at 
> ring.middleware.keyword_params$wrap_keyword_params$fn__4029.invoke(keyword_params.clj:27)
>       at 
> ring.middleware.nested_params$wrap_nested_params$fn__4068.invoke(nested_params.clj:65)
>       at ring.middleware.params$wrap_params$fn__4001.invoke(params.clj:55)
>       at 
> ring.middleware.multipart_params$wrap_multipart_params$fn__4096.invoke(multipart_params.clj:103)
>       at ring.middleware.flash$wrap_flash$fn__4277.invoke(flash.clj:14)
>       at ring.middleware.session$wrap_session$fn__4266.invoke(session.clj:43)
>       at ring.middleware.cookies$wrap_cookies$fn__4197.invoke(cookies.clj:160)
>       at ring.adapter.jetty$proxy_handler$fn__7179.invoke(jetty.clj:16)
>       at 
> ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle(Unknown
>  Source)
>       at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>       at org.mortbay.jetty.Server.handle(Server.java:326)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>       at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>       at 
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>       at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> {code}
> So it seems the UI is translating the percent encoded value which causes this 
> issue. We shouldn't be putting these values in our topologies id in the first 
> place but thought I would log this to see if you wanted to try to limit what 
> characters are allowed in a topology id.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to