[ https://issues.apache.org/jira/browse/STORM-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222564#comment-14222564 ]
ASF GitHub Bot commented on STORM-548: -------------------------------------- Github user harshach commented on the pull request: https://github.com/apache/storm/pull/307#issuecomment-64143486 +1 @caofangkun can you please upmerge this 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)