[ 
https://issues.apache.org/jira/browse/HDFS-11479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890551#comment-15890551
 ] 

Mukul Kumar Singh commented on HDFS-11479:
------------------------------------------

1)
Restarted the nfs gateway multiple times to check the fix.
Also verified that nfs gateway restarts successfully in the logs.

2)
changed the code to set the reuse address option as in :-
https://docs.jboss.org/netty/3.2/api/org/jboss/netty/bootstrap/ServerBootstrap.html

> Socket re-use address option should be used in SimpleUdpServer
> --------------------------------------------------------------
>
>                 Key: HDFS-11479
>                 URL: https://issues.apache.org/jira/browse/HDFS-11479
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: nfs
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>         Attachments: HDFS-11479.001.patch
>
>
> 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
> {noformat}
> 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
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to