Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5669

flink-streaming-contrib DataStreamUtils.collect in local environment mode fails when offline

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.1, 1.3.0
    • flink-contrib
    • None

    Description

      DataStreamUtils.collect() needs to obtain the local machine's IP so that the job can send the results back. In the case of local StreamEnvironments, it uses InetAddress.getLocalHost(), which attempts to resolve the local hostname using DNS.

      If DNS is not available (for example, when offline) or if DNS is available but cannot resolve the hostname (for example, if the hostname is an intranet name but the machine is not currently on that network), an UnknownHostException will be thrown (and wrapped in an IOException).
      If the resolved IP is not reachable for some reason, streaming results will fail.

      Since this case is for local execution only, it seems that using InetAddress.getLoopbackAddress() would work just as well, and avoid the assumptions made by getLocalHost().

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rickcox Rick Cox
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: