You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/12/16 03:57:13 UTC

[jira] [Commented] (STORM-548) Receive Thread Shutdown hook should connect to local hostname but not "localhost"

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

ASF GitHub Bot commented on STORM-548:
--------------------------------------

Github user harshach commented on the pull request:

    https://github.com/apache/storm/pull/307#issuecomment-67105369
  
    @caofangkun  I am trying to merge this into master but looks like your PR contains additional file loader.clj~ . can you please remove and update the PR. Thanks.


> Receive Thread Shutdown hook should connect to local hostname but not "localhost" 
> ----------------------------------------------------------------------------------
>
>                 Key: STORM-548
>                 URL: https://issues.apache.org/jira/browse/STORM-548
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 0.9.3-rc2
>            Reporter: caofangkun
>            Priority: Minor
>
> backtype.storm.messaging.loader#launch-receive-thread!
> kill-socket should connect to local hostname but not "localhost"
> See Code Line 72:
> https://github.com/apache/storm/blob/master/storm-core/src/clj/backtype/storm/messaging/loader.clj#L72
> {code:title=loader.clj|borderStyle=solid}
> Index: src/clj/backtype/storm/messaging/loader.clj
> ===================================================================
> --- src/clj/backtype/storm/messaging/loader.clj	(revision 4017)
> +++ src/clj/backtype/storm/messaging/loader.clj	(working copy)
> @@ -65,11 +65,12 @@
>     :kill-fn (fn [t] (System/exit 1))
>     :priority Thread/NORM_PRIORITY]
>    (let [max-buffer-size (int max-buffer-size)
> +        local-hostname (memoized-local-hostname)
>          socket (.bind ^IContext context storm-id port)
>          thread-count (if receiver-thread-count receiver-thread-count 1)
>          vthreads (mk-receive-threads context storm-id port transfer-local-fn daemon kill-fn priority socket max-buffer-size thread-count)]
>      (fn []
> -      (let [kill-socket (.connect ^IContext context storm-id "localhost" port)]
> +      (let [kill-socket (.connect ^IContext context storm-id local-hostname port)]
>          (log-message "Shutting down receiving-thread: [" storm-id ", " port "]")
>          (.send ^IConnection kill-socket
>                    -1 (byte-array []))
>  {code}  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)