bind(2) error:Permission denied when trying to bind to '/var/run/hdfs-sockets/dn’ ——datanode

1、 datanode 起不来

2017-06-13 14:58:06,352 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: registered UNIX signal handlers for [TERM, HUP, INT]
2017-06-13 14:58:07,518 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2017-06-13 14:58:07,599 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2017-06-13 14:58:07,599 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2017-06-13 14:58:07,609 INFO org.apache.hadoop.hdfs.server.datanode.BlockScanner: Initialized block scanner with targetBytesPerSec 1048576
2017-06-13 14:58:07,611 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: File descriptor passing is enabled.
2017-06-13 14:58:07,613 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Configured hostname is Vm91
2017-06-13 14:58:07,723 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Starting DataNode with maxLockedMemory = 4294967296
2017-06-13 14:58:07,798 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Opened streaming server at localhost:50010
2017-06-13 14:58:07,801 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Balancing bandwith is 10485760 bytes/s
2017-06-13 14:58:07,804 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Number threads for balancing is 5
2017-06-13 14:58:07,807 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Shutdown complete.
2017-06-13 14:58:07,814 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
java.net.BindException: bind(2) error: Permission denied when trying to bind to '/var/run/hdfs-sockets/dn'
        at org.apache.hadoop.net.unix.DomainSocket.bind0(Native Method)
        at org.apache.hadoop.net.unix.DomainSocket.bindAndListen(DomainSocket.java:191)
        at org.apache.hadoop.hdfs.net.DomainPeerServer.<init>(DomainPeerServer.java:40)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.getDomainPeerServer(DataNode.java:970)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initDataXceiver(DataNode.java:936)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:1144)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:453)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:2402)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2289)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2336)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2513)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2537)
2017-06-13 14:58:07,837 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
***********解决办法*********

[root@Vm91 hadoop-hdfs]# chown hdfs:root -R /var/run/hdfs-sockets

启动成功
bind(2) error:Permission denied when trying to bind to '/var/run/hdfs-sockets/dn’ ——datanode_第1张图片

待续……

你可能感兴趣的:(hdfs)