{"action":"created","issue":{"url":"https://api.github.com/repos/linkedin/pinot/issues/13","labels_url":"https://api.github.com/repos/linkedin/pinot/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/13/comments","events_url":"https://api.github.com/repos/linkedin/pinot/issues/13/events","html_url":"https://github.com/linkedin/pinot/issues/13","id":89484017,"number":13,"title":"Server get wrong segment download url from zookeeper","user":{"login":"code4love","id":4800455,"avatar_url":"https://avatars.githubusercontent.com/u/4800455?v=3","gravatar_id":"","url":"https://api.github.com/users/code4love","html_url":"https://github.com/code4love","followers_url":"https://api.github.com/users/code4love/followers","following_url":"https://api.github.com/users/code4love/following{/other_user}","gists_url":"https://api.github.com/users/code4love/gists{/gist_id}","starred_url":"https://api.github.com/users/code4love/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code4love/subscriptions","organizations_url":"https://api.github.com/users/code4love/orgs","repos_url":"https://api.github.com/users/code4love/repos","events_url":"https://api.github.com/users/code4love/events{/privacy}","received_events_url":"https://api.github.com/users/code4love/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-19T06:47:07Z","updated_at":"2015-06-27T16:51:25Z","closed_at":"2015-06-27T16:51:25Z","body":"We found that pinot-server get wrong segment download url from zookeeper, like http://localhost:9999/segments/myTable/mySegment_0.tar.gz. It seems that controller set \"localhost\" as it's hostname.\r\n```\r\n[pool-2-thread-1] 2015/06/19 12:36:58.665 INFO [com.linkedin.pinot.common.utils.FileUploadUtils] [] Get file from:http://localhost:9999/segments/myTable/mySegment_0.tar.gz to local file:/tmp/PinotSegment8098/segmentTar/mySegment_0.tar.gz\r\n[pool-2-thread-1] 2015/06/19 12:36:58.666 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] I/O exception (java.net.ConnectException) caught when processing request: Connection refused\r\n[pool-2-thread-1] 2015/06/19 12:36:58.666 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] Retrying request\r\n[pool-2-thread-1] 2015/06/19 12:36:58.667 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] I/O exception (java.net.ConnectException) caught when processing request: Connection refused\r\n[pool-2-thread-1] 2015/06/19 12:36:58.667 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] Retrying request\r\n[pool-2-thread-1] 2015/06/19 12:36:58.667 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] I/O exception (java.net.ConnectException) caught when processing request: Connection refused\r\n[pool-2-thread-1] 2015/06/19 12:36:58.667 INFO [org.apache.commons.httpclient.HttpMethodDirector] [] Retrying request\r\n[pool-2-thread-1] 2015/06/19 12:36:58.667 ERROR [com.linkedin.pinot.common.utils.FileUploadUtils] [] Caught exception\r\njava.net.ConnectException: Connection refused\r\n        at java.net.PlainSocketImpl.socketConnect(Native Method)\r\n        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)\r\n        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)\r\n        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)\r\n        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)\r\n        at java.net.Socket.connect(Socket.java:589)\r\n        at java.net.Socket.connect(Socket.java:538)\r\n        at java.net.Socket.<init>(Socket.java:434)\r\n        at java.net.Socket.<init>(Socket.java:286)\r\n        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)\r\n        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)\r\n        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)\r\n        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)\r\n        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)\r\n        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)\r\n        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)\r\nat com.linkedin.pinot.common.utils.FileUploadUtils.getFile(FileUploadUtils.java:90)\r\n        at com.linkedin.pinot.server.starter.helix.SegmentOnlineOfflineStateModelFactory$SegmentOnlineOfflineStateModel.downloadSegmentToLocal(SegmentOnlineOfflineStateModelFactory.java:327)\r\n        at com.linkedin.pinot.server.starter.helix.SegmentOnlineOfflineStateModelFactory$SegmentOnlineOfflineStateModel.onBecomeOnlineFromOfflineForOfflineSegment(SegmentOnlineOfflineStateModelFactory.java:212)\r\n        at com.linkedin.pinot.server.starter.helix.SegmentOnlineOfflineStateModelFactory$SegmentOnlineOfflineStateModel.onBecomeOnlineFromOffline(SegmentOnlineOfflineStateModelFactory.java:128)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:497)\r\n        at org.apache.helix.messaging.handling.HelixStateTransitionHandler.invoke(HelixStateTransitionHandler.java:344)\r\n        at org.apache.helix.messaging.handling.HelixStateTransitionHandler.handleMessage(HelixStateTransitionHandler.java:290)\r\n        at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:93)\r\n        at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:50)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nPS: In com.linkedin.pinot.tools.admin.command.StartControllerCommand, you can find following codes:\r\n```\r\n conf.setControllerHost(\"localhost\");\r\n conf.setControllerVipHost(\"localhost\");\r\n```\r\n\r\nI think it should be \r\n```\r\nString hostname = InetAddress.getLocalHost().getHostName()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/linkedin/pinot/issues/comments/116099369","html_url":"https://github.com/linkedin/pinot/issues/13#issuecomment-116099369","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/13","id":116099369,"user":{"login":"code4love","id":4800455,"avatar_url":"https://avatars.githubusercontent.com/u/4800455?v=3","gravatar_id":"","url":"https://api.github.com/users/code4love","html_url":"https://github.com/code4love","followers_url":"https://api.github.com/users/code4love/followers","following_url":"https://api.github.com/users/code4love/following{/other_user}","gists_url":"https://api.github.com/users/code4love/gists{/gist_id}","starred_url":"https://api.github.com/users/code4love/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code4love/subscriptions","organizations_url":"https://api.github.com/users/code4love/orgs","repos_url":"https://api.github.com/users/code4love/repos","events_url":"https://api.github.com/users/code4love/events{/privacy}","received_events_url":"https://api.github.com/users/code4love/received_events","type":"User","site_admin":false},"created_at":"2015-06-27T16:51:25Z","updated_at":"2015-06-27T16:51:25Z","body":"This issue had resolved  in commit c875cc0"}}