Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11479

Socket re-use address option should be used in SimpleUdpServer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4
    • nfs
    • None
    • Reviewed

    Description

      Nfs gateway restart can fail because of bind error in SimpleUdpServer.

      re-use address option should be used in SimpleUdpServer to so that socket bind can happen when it is in TIME_WAIT state

      2017-02-28 04:19:53,495 FATAL mount.MountdBase (MountdBase.java:startUDPServer(66)) - Failed to start the UDP server.
      org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:4242
              at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:204)
              at org.apache.hadoop.oncrpc.SimpleUdpServer.run(SimpleUdpServer.java:68)
              at org.apache.hadoop.mount.MountdBase.startUDPServer(MountdBase.java:64)
              at org.apache.hadoop.mount.MountdBase.start(MountdBase.java:97)
              at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.startServiceInternal(Nfs3.java:56)
              at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.startService(Nfs3.java:69)
              at org.apache.hadoop.hdfs.nfs.nfs3.PrivilegedNfsGatewayStarter.start(PrivilegedNfsGatewayStarter.java:71)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243)
      Caused by: java.net.BindException: Address already in use
              at sun.nio.ch.Net.bind0(Native Method)
              at sun.nio.ch.Net.bind(Net.java:433)
              at sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:691)
              at sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:91)
              at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.bind(NioDatagramPipelineSink.java:129)
              at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.eventSunk(NioDatagramPipelineSink.java:77)
              at org.jboss.netty.channel.Channels.bind(Channels.java:561)
              at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:189)
              at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:198)
              ... 11 more
      

      Attachments

        1. HDFS-11479.001.patch
          0.7 kB
          Mukul Kumar Singh

        Activity

          People

            msingh Mukul Kumar Singh
            msingh Mukul Kumar Singh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: