Flume
  1. Flume
  2. FLUME-796

Master fails to start if does not have a resolveable hostname

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: v0.9.4
    • Fix Version/s: v0.9.5
    • Component/s: None
    • Labels:
      None

      Description

      To duplicate:

      • As root, run 'hostname foobar'
      • Attempt to start the flume master.

      You will see this error message:

      2011-10-13 14:31:17,554 [main] ERROR util.NetUtils: Unable to get canonical host name! foobar: foobar
      java.net.UnknownHostException: foobar: foobar
      at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
      at com.cloudera.util.NetUtils.<clinit>(NetUtils.java:43)
      at com.cloudera.flume.master.FlumeMaster.inferMasterHostID(FlumeMaster.java:464)
      at com.cloudera.flume.master.FlumeMaster.main(FlumeMaster.java:533)
      2011-10-13 14:31:17,560 [main] INFO master.FlumeMaster: Inferred master server index 0

      Later you may see:

      2011-10-13 14:31:19,629 [main] INFO master.ZKInProcessServer: server 0.0.0.0:3181 not up yet

        Activity

        Hide
        Ashish Paliwal added a comment -

        Won't fix. 0.X branch not maintained anymore

        Show
        Ashish Paliwal added a comment - Won't fix. 0.X branch not maintained anymore
        Hide
        Jonathan Hsieh added a comment -

        Alternate set of instructions.

        Steps:
        1) Install Flume from CDHu2
        2) Edit /etc/flume/conf/flume-site.xml:
        flume.master.servers=<IP of some remote host>
        3) Run 'flume master'

        The flume master node apparently reads flume-site.xml's "flume.master.servers" prop and doesn't start the local master unless the hostname (of the machine running the local master) is included in the local flume-site.xml file.

        An example use case would be to run a master on a remote host, and set the local flume-site.xml to point to the remote master. Then start a flume-node locally, which heartbeats with the remote master. But if you also want a remote node to heartbeat with your local master, you apparently can't do that.. why does the local master need to query the flume.master.servers prop during startup?

        2011-10-13 18:27:04,666 [main] ERROR master.FlumeMaster: Attempted to start a master 'localhost' that is not in the master servers list: '[172.29.12.152]'
        2011-10-13 18:27:04,780 [main] INFO watchdog.Watchdog: Subprocess exited with value 1
        2011-10-13 18:27:04,781 [main] WARN watchdog.Watchdog: too many attempts failed per minute – waiting for 55s

        Show
        Jonathan Hsieh added a comment - Alternate set of instructions. Steps: 1) Install Flume from CDHu2 2) Edit /etc/flume/conf/flume-site.xml: flume.master.servers=<IP of some remote host> 3) Run 'flume master' The flume master node apparently reads flume-site.xml's "flume.master.servers" prop and doesn't start the local master unless the hostname (of the machine running the local master) is included in the local flume-site.xml file. An example use case would be to run a master on a remote host, and set the local flume-site.xml to point to the remote master. Then start a flume-node locally, which heartbeats with the remote master. But if you also want a remote node to heartbeat with your local master, you apparently can't do that.. why does the local master need to query the flume.master.servers prop during startup? 2011-10-13 18:27:04,666 [main] ERROR master.FlumeMaster: Attempted to start a master 'localhost' that is not in the master servers list: ' [172.29.12.152] ' 2011-10-13 18:27:04,780 [main] INFO watchdog.Watchdog: Subprocess exited with value 1 2011-10-13 18:27:04,781 [main] WARN watchdog.Watchdog: too many attempts failed per minute – waiting for 55s
        Hide
        Jonathan Hsieh added a comment -

        if you then set hostname to 'localhost' or something that can be resolved in /etc/hosts or via dns, it should work.

        Show
        Jonathan Hsieh added a comment - if you then set hostname to 'localhost' or something that can be resolved in /etc/hosts or via dns, it should work.

          People

          • Assignee:
            Unassigned
            Reporter:
            Will McQueen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development