Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

Ever come across below error while starting HDFS datanode in unsecure cluster ?

016-12-22 09:00:41,045 INFO  mortbay.log (Slf4jLog.java:info(67)) - Stopped HttpServer2$SelectChannelConnectorWithSafeStartup@localhost:0

2016-12-22 09:00:41,152 INFO  datanode.DataNode (DataNode.java:shutdown(1915)) - Shutdown complete.

2016-12-22 09:00:41,153 ERROR datanode.DataNode (DataNode.java:secureMain(2630)) - Exception in secureMain

java.net.SocketException: Permission denied

        at sun.nio.ch.Net.bind0(Native Method)

        at sun.nio.ch.Net.bind(Net.java:463)

        at sun.nio.ch.Net.bind(Net.java:455)

        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)

        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:475)

        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1021)

        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:455)

        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:440)

        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:844)

        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:194)

        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:340)

        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)

        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)

        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)

        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)

        at java.lang.Thread.run(Thread.java:745)

2016-12-22 09:00:41,157 INFO  util.ExitUtil (ExitUtil.java:terminate(124)) - Exiting with status 1

2016-12-22 09:00:41,159 INFO  datanode.DataNode (LogAdapter.java:info(47)) - SHUTDOWN_MSG:

This error means DataNode is unable to bind to provided socket.

Reason ? This is most like because the http port or other port of DataNode are listening on port < 1024. For e.x http port property is set to as below.

dfs.datanode.http.address=1022

Solution: Change the port something as 50075 which is greater than 1024. DataNode should be able to start with this solution.

1,126 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎12-22-2016 10:59 AM
Updated by:
 
Contributors
Top Kudoed Authors