Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-6414

java.net.PortUnreachableException: null when using DatagramChannelSender (UDP)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9.2
    • 1.14.0
    • Extensions
    • None
    • CentOS 7 with NiFi 1.9.2
    • Patch

    Description

      I get "java.net.PortUnreachableException: null" when I use PutSyslog using UDP. I have no issues with TCP. The issue only occurs when you try to use the connection multiple times.

      I found a similar issue here: http://www.java-gaming.org/index.php?PHPSESSID=u7ufav5hekdirj9991jll36e81&topic=1751.msg16721#msg16721

      So I tried to modify DatagramChannelSender.java of the nifi-processor-utils:

      if (!channel.isConnected()) {
      channel.socket().bind(newInetSocketAddress(InetAddress.getByName(host), port));
      channel.connect(newInetSocketAddress(InetAddress.getByName(host), port));
      }
       
      And with the added line I have no more issues but it seems that with that extra line the NiFi tests fail. I need to spend more time to debug why.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              solhuebner Sol Huebner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h