You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Mukul Kumar Singh (JIRA)" <ji...@apache.org> on 2017/03/15 17:54:41 UTC

[jira] [Created] (HDFS-11533) reuseAddress option should be used for child channels in Portmap and SimpleTcpServer

Mukul Kumar Singh created HDFS-11533:
----------------------------------------

             Summary: reuseAddress option should be used for child channels in Portmap and SimpleTcpServer
                 Key: HDFS-11533
                 URL: https://issues.apache.org/jira/browse/HDFS-11533
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: nfs
            Reporter: Mukul Kumar Singh
            Assignee: Mukul Kumar Singh


Bind can fail in SimpleTcpServer because reuseAddress option is not used for child channels. Binding to the port for child channels can fail because this option is currently only set for parent channel.

This options is not needed in SimpleUdpServer, Portmap(udpServer)
as they use ConnectionlessBootstrap, where the child option is not needed
https://docs.jboss.org/netty/3.2/api/org/jboss/netty/bootstrap/ConnectionlessBootstrap.html

However Portmap(tcpServer) and SimpleTcpServer
uses ServerBootstrap, where the child option is needed
https://docs.jboss.org/netty/3.2/api/org/jboss/netty/bootstrap/ServerBootstrap.html


{noformat}
Started listening to UDP requests at port 4242 for Rpc program: mountd at localhost:4242 with workerCount 1\n2017-03-13 07:11:52,970 FATAL mount.MountdBase (MountdBase.java:startTCPServer(85)) - Failed to start the TCP server.\norg.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:4242\n\tat org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)\n\tat org.apache.hadoop.oncrpc.SimpleTcpServer.run(SimpleTcpServer.java:87)\n\tat org.apache.hadoop.mount.MountdBase.startTCPServer(MountdBase.java:83)\n\tat org.apache.hadoop.mount.MountdBase.start(MountdBase.java:98)\n\tat org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.startServiceInternal(Nfs3.java:56)\n\tat org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.startService(Nfs3.java:69)\n\tat org.apache.hadoop.hdfs.nfs.nfs3.PrivilegedNfsGatewayStarter.start(PrivilegedNfsGatewayStarter.java:71)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243)\nCaused by: java.net.BindException: Address already in use\n\tat sun.nio.ch.Net.bind0(Native Method)\n\tat sun.nio.ch.Net.bind(Net.java:433)\n\tat sun.nio.ch.Net.bind(Net.java:425)\n\tat sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)\n\tat sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)\n\tat org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366)\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)\n\tat org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\n2017-03-13 07:11:52,984 INFO  util.ExitUtil (ExitUtil.java:terminate(124)) - Exiting with status 1\n2017-03-13 07:11:52,987 INFO  nfs3.Nfs3Base (LogAdapter.java:info(45)) - SHUTDOWN_MSG: 
{noformat}




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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org